Skip to content

Commit

Permalink
VLAN_DEVAT() requires epochification in ipoib after r353292.
Browse files Browse the repository at this point in the history
Sponsored by:	Mellanox Technologies
  • Loading branch information
hselasky committed Oct 16, 2019
1 parent 5f53fd3 commit a8aff28
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions sys/ofed/drivers/infiniband/ulp/ipoib/ipoib_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -1315,13 +1315,16 @@ ipoib_config_vlan(void *arg, struct ifnet *ifp, u_int16_t vtag)
{
struct ipoib_dev_priv *parent;
struct ipoib_dev_priv *priv;
struct epoch_tracker et;
struct ifnet *dev;
uint16_t pkey;
int error;

if (ifp->if_type != IFT_INFINIBAND)
return;
NET_EPOCH_ENTER(et);
dev = VLAN_DEVAT(ifp, vtag);
NET_EPOCH_EXIT(et);
if (dev == NULL)
return;
priv = NULL;
Expand Down Expand Up @@ -1383,13 +1386,16 @@ ipoib_unconfig_vlan(void *arg, struct ifnet *ifp, u_int16_t vtag)
{
struct ipoib_dev_priv *parent;
struct ipoib_dev_priv *priv;
struct epoch_tracker et;
struct ifnet *dev;
uint16_t pkey;

if (ifp->if_type != IFT_INFINIBAND)
return;

NET_EPOCH_ENTER(et);
dev = VLAN_DEVAT(ifp, vtag);
NET_EPOCH_EXIT(et);
if (dev)
VLAN_SETCOOKIE(dev, NULL);
pkey = vtag | 0x8000;
Expand Down

0 comments on commit a8aff28

Please sign in to comment.