Message ID | bc0e7e5d-45c2-453f-ba7c-c81a1b1d1d94@CMEXHTCAS2.ad.emulex.com (mailing list archive) |
---|---|
State | Accepted, archived |
Headers | show |
On Mon, Feb 3, 2014 at 10:40 PM, Devesh Sharma <devesh.sharma@emulex.com> wrote: > > driver should use rdma_vlan_dev_real_dev() instead of using vlan_dev_real_dev() > while building GID table for a vlan interface. > > Signed-off-by: Devesh Sharma <devesh.sharma@emulex.com> > --- > drivers/infiniband/hw/ocrdma/ocrdma_main.c | 6 ++++-- > 1 files changed, 4 insertions(+), 2 deletions(-) > > diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_main.c b/drivers/infiniband/hw/ocrdma/ocrdma_main.c > index 91443bc..f7b1b27 100644 > --- a/drivers/infiniband/hw/ocrdma/ocrdma_main.c > +++ b/drivers/infiniband/hw/ocrdma/ocrdma_main.c > @@ -161,7 +161,9 @@ static void ocrdma_add_vlan_sgids(struct ocrdma_dev *dev) > > rcu_read_lock(); > for_each_netdev_rcu(&init_net, tmp) { > - if (netdev == tmp || vlan_dev_real_dev(tmp) == netdev) { > + if ( > + netdev && (netdev == tmp || > + rdma_vlan_dev_real_dev(tmp) == netdev)) { > if (!netif_running(tmp) || !netif_oper_up(tmp)) > continue; > if (netdev != tmp) { > @@ -208,7 +210,7 @@ static int ocrdma_inet6addr_event(struct notifier_block *notifier, > is_vlan = netdev->priv_flags & IFF_802_1Q_VLAN; > if (is_vlan) { > vid = vlan_dev_vlan_id(netdev); > - netdev = vlan_dev_real_dev(netdev); > + netdev = rdma_vlan_dev_real_dev(netdev); > } > > rcu_read_lock(); I applied this for my next pull request to go into 3.14, but I had to massage it quite a bit to get it to apply. There was only one call to vlan_dev_real_dev(), and the context was a bit different. I guess this is on top of some other patch set? But I'm assuming we need the fix for 3.14 even without those other patches. - R. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Roland, The patch was cut before Or's IP based GID changes in master, and is expected as a bug fix for 3.13 .x. I think I am late for this to happen. Yes, this needs a fix even in 3.14. After Or's IP based GID changes the context has been changed _from_ ocrdma_inet6addr_event() and ocrdma_add_vlan_sgids() _to_ ocrdma_addr_event() causing only one call to rdma_vlan_dev_real_dev. -Regards Devesh -----Original Message----- From: roland.dreier@gmail.com [mailto:roland.dreier@gmail.com] On Behalf Of Roland Dreier Sent: Friday, February 14, 2014 4:33 AM To: Devesh Sharma Cc: linux-rdma@vger.kernel.org; Selvin Xavier Subject: Re: [PATCH master] RDMA/ocrdma: Fix load time panic during GID table init On Mon, Feb 3, 2014 at 10:40 PM, Devesh Sharma <devesh.sharma@emulex.com> wrote: > > driver should use rdma_vlan_dev_real_dev() instead of using > vlan_dev_real_dev() while building GID table for a vlan interface. > > Signed-off-by: Devesh Sharma <devesh.sharma@emulex.com> > --- > drivers/infiniband/hw/ocrdma/ocrdma_main.c | 6 ++++-- > 1 files changed, 4 insertions(+), 2 deletions(-) > > diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_main.c > b/drivers/infiniband/hw/ocrdma/ocrdma_main.c > index 91443bc..f7b1b27 100644 > --- a/drivers/infiniband/hw/ocrdma/ocrdma_main.c > +++ b/drivers/infiniband/hw/ocrdma/ocrdma_main.c > @@ -161,7 +161,9 @@ static void ocrdma_add_vlan_sgids(struct > ocrdma_dev *dev) > > rcu_read_lock(); > for_each_netdev_rcu(&init_net, tmp) { > - if (netdev == tmp || vlan_dev_real_dev(tmp) == netdev) { > + if ( > + netdev && (netdev == tmp || > + rdma_vlan_dev_real_dev(tmp) == > + netdev)) { > if (!netif_running(tmp) || !netif_oper_up(tmp)) > continue; > if (netdev != tmp) { @@ -208,7 +210,7 @@ > static int ocrdma_inet6addr_event(struct notifier_block *notifier, > is_vlan = netdev->priv_flags & IFF_802_1Q_VLAN; > if (is_vlan) { > vid = vlan_dev_vlan_id(netdev); > - netdev = vlan_dev_real_dev(netdev); > + netdev = rdma_vlan_dev_real_dev(netdev); > } > > rcu_read_lock(); I applied this for my next pull request to go into 3.14, but I had to massage it quite a bit to get it to apply. There was only one call to vlan_dev_real_dev(), and the context was a bit different. I guess this is on top of some other patch set? But I'm assuming we need the fix for 3.14 even without those other patches. - R. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/infiniband/hw/ocrdma/ocrdma_main.c b/drivers/infiniband/hw/ocrdma/ocrdma_main.c index 91443bc..f7b1b27 100644 --- a/drivers/infiniband/hw/ocrdma/ocrdma_main.c +++ b/drivers/infiniband/hw/ocrdma/ocrdma_main.c @@ -161,7 +161,9 @@ static void ocrdma_add_vlan_sgids(struct ocrdma_dev *dev) rcu_read_lock(); for_each_netdev_rcu(&init_net, tmp) { - if (netdev == tmp || vlan_dev_real_dev(tmp) == netdev) { + if ( + netdev && (netdev == tmp || + rdma_vlan_dev_real_dev(tmp) == netdev)) { if (!netif_running(tmp) || !netif_oper_up(tmp)) continue; if (netdev != tmp) { @@ -208,7 +210,7 @@ static int ocrdma_inet6addr_event(struct notifier_block *notifier, is_vlan = netdev->priv_flags & IFF_802_1Q_VLAN; if (is_vlan) { vid = vlan_dev_vlan_id(netdev); - netdev = vlan_dev_real_dev(netdev); + netdev = rdma_vlan_dev_real_dev(netdev); } rcu_read_lock();
driver should use rdma_vlan_dev_real_dev() instead of using vlan_dev_real_dev() while building GID table for a vlan interface. Signed-off-by: Devesh Sharma <devesh.sharma@emulex.com> --- drivers/infiniband/hw/ocrdma/ocrdma_main.c | 6 ++++-- 1 files changed, 4 insertions(+), 2 deletions(-)