diff options
author | Erez Shitrit <erezsh@mellanox.com> | 2017-04-10 11:22:30 +0300 |
---|---|---|
committer | Doug Ledford <dledford@redhat.com> | 2017-04-20 22:19:44 +0300 |
commit | cd565b4b51e5fe258d6ce9ddc167ee51f3044ba5 (patch) | |
tree | 1bb4672f458dd50a4ebd63ba321b1eb63ba8cdf6 /drivers/infiniband/ulp/ipoib/ipoib_vlan.c | |
parent | c1048aff7e62bc561603fd14ad84b975ad7085b6 (diff) | |
download | linux-cd565b4b51e5fe258d6ce9ddc167ee51f3044ba5.tar.xz |
IB/IPoIB: Support acceleration options callbacks
IPoIB driver now uses the new set of callback functions.
If the hardware provider supports the new ipoib_options implementation,
the driver uses the callbacks in its data path flows, otherwise it uses the
driver default implementation for all data flows in its code.
The default implementation wasn't change and it is exactly as it was before
introduction of acceleration support.
Signed-off-by: Erez Shitrit <erezsh@mellanox.com>
Reviewed-by: Alex Vesker <valex@mellanox.com>
Signed-off-by: Leon Romanovsky <leon@kernel.org>
Signed-off-by: Doug Ledford <dledford@redhat.com>
Diffstat (limited to 'drivers/infiniband/ulp/ipoib/ipoib_vlan.c')
-rw-r--r-- | drivers/infiniband/ulp/ipoib/ipoib_vlan.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/drivers/infiniband/ulp/ipoib/ipoib_vlan.c b/drivers/infiniband/ulp/ipoib/ipoib_vlan.c index c53e7f3c57f0..36dc4fcaa3cd 100644 --- a/drivers/infiniband/ulp/ipoib/ipoib_vlan.c +++ b/drivers/infiniband/ulp/ipoib/ipoib_vlan.c @@ -125,14 +125,15 @@ int ipoib_vlan_add(struct net_device *pdev, unsigned short pkey) if (!capable(CAP_NET_ADMIN)) return -EPERM; - ppriv = netdev_priv(pdev); + ppriv = ipoib_priv(pdev); if (test_bit(IPOIB_FLAG_GOING_DOWN, &ppriv->flags)) return -EPERM; snprintf(intf_name, sizeof intf_name, "%s.%04x", ppriv->dev->name, pkey); - priv = ipoib_intf_alloc(intf_name); + + priv = ipoib_intf_alloc(ppriv->ca, ppriv->port, intf_name); if (!priv) return -ENOMEM; |