Author: slavash Date: Thu Sep 6 12:26:57 2018 New Revision: 338491 URL: https://svnweb.freebsd.org/changeset/base/338491
Log: ibcore: Fix endless loop in searching for matching VLAN device In r337943 ifnet's if_pcp was set to the PCP value in use instead of IFNET_PCP_NONE. Current ibcore code assumes that if_pcp is IFNET_PCP_NONE with VLAN interfaces so it can identify prio-tagged traffic. Fix that by explicitly verifying that that the if_type is IFT_ETHER and not IFT_L2VLAN. MFC after: 3 days Approved by: re (Marius), hselasky (mentor), kib (mentor) Sponsored by: Mellanox Technologies Modified: head/sys/ofed/include/rdma/ib_addr.h Modified: head/sys/ofed/include/rdma/ib_addr.h ============================================================================== --- head/sys/ofed/include/rdma/ib_addr.h Thu Sep 6 12:19:36 2018 (r338490) +++ head/sys/ofed/include/rdma/ib_addr.h Thu Sep 6 12:26:57 2018 (r338491) @@ -167,7 +167,7 @@ static inline u16 rdma_vlan_dev_vlan_id(const struct n { uint16_t tag; - if (dev->if_pcp != IFNET_PCP_NONE) + if (dev->if_type == IFT_ETHER && dev->if_pcp != IFNET_PCP_NONE) return 0x0000; /* prio-tagged traffic */ if (VLAN_TAG(__DECONST(struct ifnet *, dev), &tag) != 0) return 0xffff; @@ -350,7 +350,7 @@ 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_pcp != IFNET_PCP_NONE) + if (dev->if_type == IFT_ETHER && dev->if_pcp != IFNET_PCP_NONE) return dev; /* prio-tagged traffic */ return VLAN_TRUNKDEV(__DECONST(struct ifnet *, dev)); } _______________________________________________ svn-src-head@freebsd.org mailing list https://lists.freebsd.org/mailman/listinfo/svn-src-head To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"