Author: np Date: Thu Apr 19 18:10:44 2018 New Revision: 332787 URL: https://svnweb.freebsd.org/changeset/base/332787
Log: cxgbe(4): Fix bugs in the handling of COP rules that match on VLAN tag. Retrieve the tag from the correct ifnet and use the provided tag (instead of hardcoded 0xffff, implying no tag) in the routines that process offload policy. Submitted by: Krishnamraju Eraparaju @ Chelsio Sponsored by: Chelsio Communications Modified: head/sys/dev/cxgbe/tom/t4_connect.c head/sys/dev/cxgbe/tom/t4_tom.c Modified: head/sys/dev/cxgbe/tom/t4_connect.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_connect.c Thu Apr 19 18:08:46 2018 (r332786) +++ head/sys/dev/cxgbe/tom/t4_connect.c Thu Apr 19 18:10:44 2018 (r332787) @@ -405,7 +405,7 @@ t4_connect(struct toedev *tod, struct socket *so, stru struct ifnet *ifp = VLAN_COOKIE(rt_ifp); vi = ifp->if_softc; - VLAN_TAG(ifp, &vid); + VLAN_TAG(rt_ifp, &vid); } else if (rt_ifp->if_type == IFT_IEEE8023ADLAG) DONT_OFFLOAD_ACTIVE_OPEN(ENOSYS); /* XXX: implement lagg+TOE */ else Modified: head/sys/dev/cxgbe/tom/t4_tom.c ============================================================================== --- head/sys/dev/cxgbe/tom/t4_tom.c Thu Apr 19 18:08:46 2018 (r332786) +++ head/sys/dev/cxgbe/tom/t4_tom.c Thu Apr 19 18:10:44 2018 (r332787) @@ -1234,7 +1234,7 @@ lookup_offload_policy(struct adapter *sc, int open_typ switch (open_type) { case OPEN_TYPE_ACTIVE: case OPEN_TYPE_LISTEN: - pkt = prepare_pkt(open_type, 0xffff, inp, &pktlen, &buflen); + pkt = prepare_pkt(open_type, vtag, inp, &pktlen, &buflen); break; case OPEN_TYPE_PASSIVE: MPASS(m != NULL); _______________________________________________ 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"