svn commit: r353156 - in head/sys: netinet sys

Randall Stewart rrs at FreeBSD.org
Sun Oct 6 22:29:03 UTC 2019


Author: rrs
Date: Sun Oct  6 22:29:02 2019
New Revision: 353156
URL: https://svnweb.freebsd.org/changeset/base/353156

Log:
  Brad Davis identified a problem with the new LRO code, VLAN's
  no longer worked. The problem was that the defines used the
  same space as the VLAN id. This commit does three things.
  1) Move the LRO used fields to the PH_per fields. This is
     safe since the entire PH_per is used for IP reassembly
     which LRO code will not hit.
  2) Remove old unused pace fields that are not used in mbuf.h
  3) The VLAN processing is not in the mbuf queueing code. Consequently
     if a VLAN submits to Rack or BBR we need to bypass the mbuf queueing
     for now until rack_bbr_common is updated to handle the VLAN properly.
  
  Reported by:	Brad Davis

Modified:
  head/sys/netinet/tcp_lro.c
  head/sys/sys/mbuf.h

Modified: head/sys/netinet/tcp_lro.c
==============================================================================
--- head/sys/netinet/tcp_lro.c	Sun Oct  6 22:18:03 2019	(r353155)
+++ head/sys/netinet/tcp_lro.c	Sun Oct  6 22:29:02 2019	(r353156)
@@ -875,7 +875,14 @@ tcp_lro_flush(struct lro_ctrl *lc, struct lro_entry *l
 
 	/* Now lets lookup the inp first */
 	CURVNET_SET(lc->ifp->if_vnet);
-	if (tcplro_stacks_wanting_mbufq == 0)
+	/*
+	 * XXXRRS Currently the common input handler for
+	 * mbuf queuing cannot handle VLAN Tagged. This needs
+	 * to be fixed and the or condition removed (i.e. the 
+	 * common code should do the right lookup for the vlan
+	 * tag and anything else that the vlan_input() does).
+	 */
+	if ((tcplro_stacks_wanting_mbufq == 0) || (le->m_head->m_flags & M_VLANTAG))
 		goto skip_lookup;
 	INP_INFO_RLOCK_ET(&V_tcbinfo, et);
 	switch (le->eh_type) {

Modified: head/sys/sys/mbuf.h
==============================================================================
--- head/sys/sys/mbuf.h	Sun Oct  6 22:18:03 2019	(r353155)
+++ head/sys/sys/mbuf.h	Sun Oct  6 22:29:02 2019	(r353156)
@@ -194,18 +194,13 @@ struct pkthdr {
 };
 #define	ether_vtag	PH_per.sixteen[0]
 #define	PH_vt		PH_per
-#define	vt_nrecs	sixteen[0]
-#define	tso_segsz	PH_per.sixteen[1]
-#define	lro_nsegs	tso_segsz
-#define	csum_phsum	PH_per.sixteen[2]
-#define	csum_data	PH_per.thirtytwo[1]
-#define lro_len		PH_per.sixteen[0] /* inbound during LRO */
-#define lro_csum	PH_per.sixteen[1] /* inbound during LRO */
-#define pace_thoff	PH_loc.sixteen[0]
-#define pace_tlen	PH_loc.sixteen[1]
-#define pace_drphdrlen	PH_loc.sixteen[2]
-#define pace_tos	PH_loc.eight[6]
-#define pace_lock	PH_loc.eight[7]
+#define	vt_nrecs	sixteen[0]	  /* mld and v6-ND */
+#define	tso_segsz	PH_per.sixteen[1] /* inbound after LRO */
+#define	lro_nsegs	tso_segsz	  /* inbound after LRO */
+#define	csum_data	PH_per.thirtytwo[1] /* inbound from hardware up */
+#define lro_len		PH_loc.sixteen[0] /* inbound during LRO (no reassembly) */
+#define lro_csum	PH_loc.sixteen[1] /* inbound during LRO (no reassembly) */
+/* Note PH_loc is used during IP reassembly (all 8 bytes as a ptr) */
 
 /*
  * Description of external storage mapped into mbuf; valid only if M_EXT is


More information about the svn-src-all mailing list