Skip to content

Commit

Permalink
VLAN_TRUNKDEV() requires epochification in ibcore 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 ae1053f commit 12434b0
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions sys/ofed/include/rdma/ib_addr.h
Original file line number Diff line number Diff line change
Expand Up @@ -354,9 +354,13 @@ static inline u16 rdma_get_vlan_id(union ib_gid *dgid)

static inline struct net_device *rdma_vlan_dev_real_dev(struct net_device *dev)
{
if (dev->if_type == IFT_ETHER && dev->if_pcp != IFNET_PCP_NONE)
return dev; /* prio-tagged traffic */
return VLAN_TRUNKDEV(__DECONST(struct ifnet *, dev));
struct epoch_tracker et;

NET_EPOCH_ENTER(et);
if (dev->if_type != IFT_ETHER || dev->if_pcp == IFNET_PCP_NONE)
dev = VLAN_TRUNKDEV(dev); /* non prio-tagged traffic */
NET_EPOCH_EXIT(et);
return (dev);
}

#endif /* IB_ADDR_H */

0 comments on commit 12434b0

Please sign in to comment.