On Mon, Feb 3, 2014 at 10:40 PM, Devesh Sharma <[email protected]> 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 <[email protected]>
> ---
>  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 [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Reply via email to