From 0d5a0472c72c816ac11f3f8a489fd007a3301f03 Mon Sep 17 00:00:00 2001 From: Steve Wise Date: Thu, 5 Jun 2014 14:42:50 -0500 Subject: [PATCH] iw_cxgb4: RDMA/cxgb4: Fix vlan support Pull in: commit 11b8e22d4d0979d8201cbdf0b5fffdbe2d5bcedf Author: Steve Wise Date: Fri May 16 12:42:46 2014 -0500 RDMA/cxgb4: Fix vlan support RDMA connections over a vlan interface don't work due to import_ep() not using the correct egress device. - use the real device in import_ep() - use rdma_vlan_dev_real_dev() in get_real_dev(). Signed-off-by: Steve Wise Signed-off-by: Roland Dreier Signed-off-by: Steve Wise --- .../0063-RDMA-cxgb4--Fix-vlan-support.patch | 62 +++++++++++++++++++ 1 file changed, 62 insertions(+) create mode 100644 linux-next-pending/0063-RDMA-cxgb4--Fix-vlan-support.patch diff --git a/linux-next-pending/0063-RDMA-cxgb4--Fix-vlan-support.patch b/linux-next-pending/0063-RDMA-cxgb4--Fix-vlan-support.patch new file mode 100644 index 0000000..19297e4 --- /dev/null +++ b/linux-next-pending/0063-RDMA-cxgb4--Fix-vlan-support.patch @@ -0,0 +1,62 @@ +commit 11b8e22d4d0979d8201cbdf0b5fffdbe2d5bcedf +Author: Steve Wise +Date: Fri May 16 12:42:46 2014 -0500 + + RDMA/cxgb4: Fix vlan support + + RDMA connections over a vlan interface don't work due to + import_ep() not using the correct egress device. + + - use the real device in import_ep() + - use rdma_vlan_dev_real_dev() in get_real_dev(). + + Signed-off-by: Steve Wise + Signed-off-by: Roland Dreier + +diff --git a/drivers/infiniband/hw/cxgb4/cm.c b/drivers/infiniband/hw/cxgb4/cm.c +index 1f863a9..28114e6 100644 +--- a/drivers/infiniband/hw/cxgb4/cm.c ++++ b/drivers/infiniband/hw/cxgb4/cm.c +@@ -47,6 +47,8 @@ + #include + #include + ++#include ++ + #include "iw_cxgb4.h" + + static char *states[] = { +@@ -341,10 +343,7 @@ static struct sk_buff *get_skb(struct sk_buff *skb, int len, gfp_t gfp) + + static struct net_device *get_real_dev(struct net_device *egress_dev) + { +- struct net_device *phys_dev = egress_dev; +- if (egress_dev->priv_flags & IFF_802_1Q_VLAN) +- phys_dev = vlan_dev_real_dev(egress_dev); +- return phys_dev; ++ return rdma_vlan_dev_real_dev(egress_dev) ? : egress_dev; + } + + static int our_interface(struct c4iw_dev *dev, struct net_device *egress_dev) +@@ -1746,16 +1745,16 @@ static int import_ep(struct c4iw_ep *ep, int iptype, __u8 *peer_ip, + if (!ep->l2t) + goto out; + ep->mtu = dst_mtu(dst); +- ep->tx_chan = cxgb4_port_chan(n->dev); +- ep->smac_idx = (cxgb4_port_viid(n->dev) & 0x7F) << 1; ++ ep->tx_chan = cxgb4_port_chan(pdev); ++ ep->smac_idx = (cxgb4_port_viid(pdev) & 0x7F) << 1; + step = cdev->rdev.lldi.ntxq / + cdev->rdev.lldi.nchan; +- ep->txq_idx = cxgb4_port_idx(n->dev) * step; +- ep->ctrlq_idx = cxgb4_port_idx(n->dev); ++ ep->txq_idx = cxgb4_port_idx(pdev) * step; ++ ep->ctrlq_idx = cxgb4_port_idx(pdev); + step = cdev->rdev.lldi.nrxq / + cdev->rdev.lldi.nchan; + ep->rss_qid = cdev->rdev.lldi.rxq_ids[ +- cxgb4_port_idx(n->dev) * step]; ++ cxgb4_port_idx(pdev) * step]; + + if (clear_mpa_v1) { + ep->retry_with_mpa_v1 = 0; -- 2.41.0