diff options
| author | Hans Petter Selasky <hselasky@FreeBSD.org> | 2018-07-17 09:11:53 +0000 |
|---|---|---|
| committer | Hans Petter Selasky <hselasky@FreeBSD.org> | 2018-07-17 09:11:53 +0000 |
| commit | f4546fa37616d09cf24d23c02ce46d34670d63d6 (patch) | |
| tree | d80161a30062a68e3f1a73d052851781b30550d7 /sys/ofed/include | |
| parent | 682bd3fe128aaf31957f45351861a0e517aef9ba (diff) | |
Notes
Diffstat (limited to 'sys/ofed/include')
| -rw-r--r-- | sys/ofed/include/rdma/ib_addr.h | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/sys/ofed/include/rdma/ib_addr.h b/sys/ofed/include/rdma/ib_addr.h index ab8fcc219fcb..c64980305817 100644 --- a/sys/ofed/include/rdma/ib_addr.h +++ b/sys/ofed/include/rdma/ib_addr.h @@ -166,6 +166,8 @@ static inline u16 rdma_vlan_dev_vlan_id(const struct net_device *dev) { uint16_t tag; + if (dev->if_pcp != IFNET_PCP_NONE) + return 0x0000; /* prio-tagged traffic */ if (VLAN_TAG(__DECONST(struct ifnet *, dev), &tag) != 0) return 0xffff; return tag; @@ -345,8 +347,10 @@ static inline u16 rdma_get_vlan_id(union ib_gid *dgid) return vid < 0x1000 ? vid : 0xffff; } -static inline struct net_device *rdma_vlan_dev_real_dev(const struct net_device *dev) +static inline struct net_device *rdma_vlan_dev_real_dev(struct net_device *dev) { + if (dev->if_pcp != IFNET_PCP_NONE) + return dev; /* prio-tagged traffic */ return VLAN_TRUNKDEV(__DECONST(struct ifnet *, dev)); } |
