Thread (1 message) 1 message, 1 author, 2015-02-22

Re: [PATCH 09/30] IB/core: Modify ib_verbs and cma in order to use roce_gid_cache

From: Haggai Eran <hidden>
Date: 2015-02-22 07:37:43

Possibly related (same subject, not in this thread)

On 19/02/2015 17:24, Matan Barak wrote:

On 2/19/2015 4:37 PM, Haggai Eran wrote:
quoted
On 20/02/2015 00:02, Somnath Kotur wrote:
quoted
@@ -203,21 +235,30 @@ int ib_init_ah_from_wc(struct ib_device
*device, u8 port_num, struct ib_wc *wc,

      memset(ah_attr, 0, sizeof *ah_attr);
      if (is_eth) {
+        u16 vlan_id = wc->wc_flags & IB_WC_WITH_VLAN ?
+                wc->vlan_id : 0xffff;
+
          if (!(wc->wc_flags & IB_WC_GRH))
              return -EPROTOTYPE;

-        if (wc->wc_flags & IB_WC_WITH_SMAC &&
-            wc->wc_flags & IB_WC_WITH_VLAN) {
-            memcpy(ah_attr->dmac, wc->smac, ETH_ALEN);
-            ah_attr->vlan_id = wc->vlan_id;
-        } else {
+        if (!(wc->wc_flags & IB_WC_WITH_SMAC) ||
+            !(wc->wc_flags & IB_WC_WITH_VLAN)) {
              ret = rdma_addr_find_dmac_by_grh(&grh->dgid, &grh->sgid,
-                    ah_attr->dmac, &ah_attr->vlan_id);
+                             ah_attr->dmac,
+                             wc->wc_flags & IB_WC_WITH_VLAN ?
+                             NULL : &vlan_id,
+                             0);
              if (ret)
                  return ret;
          }
-    } else {
-        ah_attr->vlan_id = 0xffff;
Previously vlan_id would get set to 0xffff on non-Ethernet link-layer,
and now it is left as zero. Wouldn't that break things for non-Ethernet
protocols?
On non-Ethernet link-later, vlan_id was ignored. This field was deleted
in this patchset.
Ah, okay. I missed that :)

Haggai

--
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help