aboutsummaryrefslogtreecommitdiff
path: root/website/static/security/patches/EN-20:05/mlx5en.patch
blob: 4d5e5ce7bb567b957d4bf550d43b0c2e06d21ad7 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
--- sys/dev/mlx5/mlx5_en/mlx5_en_tx.c.orig
+++ sys/dev/mlx5/mlx5_en/mlx5_en_tx.c
@@ -609,7 +609,8 @@
 	struct mlx5e_sq *sq;
 	int ret;
 
-	if (mb->m_pkthdr.snd_tag != NULL) {
+	if ((mb->m_pkthdr.csum_flags & CSUM_SND_TAG) != 0 &&
+	    (mb->m_pkthdr.snd_tag != NULL)) {
 		sq = mlx5e_select_queue_by_send_tag(ifp, mb);
 		if (unlikely(sq == NULL)) {
 			/* Check for route change */
--- sys/netinet/ip_output.c.orig
+++ sys/netinet/ip_output.c
@@ -653,6 +653,7 @@
 				in_pcboutput_txrtlmt(inp, ifp, m);
 			/* stamp send tag on mbuf */
 			m->m_pkthdr.snd_tag = inp->inp_snd_tag;
+			m->m_pkthdr.csum_flags |= CSUM_SND_TAG;
 		} else {
 			m->m_pkthdr.snd_tag = NULL;
 		}
@@ -705,6 +706,7 @@
 					in_pcboutput_txrtlmt(inp, ifp, m);
 				/* stamp send tag on mbuf */
 				m->m_pkthdr.snd_tag = inp->inp_snd_tag;
+				m->m_pkthdr.csum_flags |= CSUM_SND_TAG;
 			} else {
 				m->m_pkthdr.snd_tag = NULL;
 			}
--- sys/netinet6/ip6_output.c.orig
+++ sys/netinet6/ip6_output.c
@@ -966,6 +966,7 @@
 				in_pcboutput_txrtlmt(inp, ifp, m);
 			/* stamp send tag on mbuf */
 			m->m_pkthdr.snd_tag = inp->inp_snd_tag;
+			m->m_pkthdr.csum_flags |= CSUM_SND_TAG;
 		} else {
 			m->m_pkthdr.snd_tag = NULL;
 		}
@@ -1081,6 +1082,7 @@
 					in_pcboutput_txrtlmt(inp, ifp, m);
 				/* stamp send tag on mbuf */
 				m->m_pkthdr.snd_tag = inp->inp_snd_tag;
+				m->m_pkthdr.csum_flags |= CSUM_SND_TAG;
 			} else {
 				m->m_pkthdr.snd_tag = NULL;
 			}
--- sys/sys/mbuf.h.orig
+++ sys/sys/mbuf.h
@@ -519,6 +519,8 @@
 #define	CSUM_L5_VALID		0x20000000	/* checksum is correct */
 #define	CSUM_COALESCED		0x40000000	/* contains merged segments */
 
+#define	CSUM_SND_TAG		0x80000000	/* Packet header has send tag */
+
 /*
  * CSUM flag description for use with printf(9) %b identifier.
  */
@@ -528,7 +530,7 @@
     "\12CSUM_IP6_UDP\13CSUM_IP6_TCP\14CSUM_IP6_SCTP\15CSUM_IP6_TSO" \
     "\16CSUM_IP6_ISCSI" \
     "\31CSUM_L3_CALC\32CSUM_L3_VALID\33CSUM_L4_CALC\34CSUM_L4_VALID" \
-    "\35CSUM_L5_CALC\36CSUM_L5_VALID\37CSUM_COALESCED"
+    "\35CSUM_L5_CALC\36CSUM_L5_VALID\37CSUM_COALESCED\40CSUM_SND_TAG"
 
 /* CSUM flags compatibility mappings. */
 #define	CSUM_IP_CHECKED		CSUM_L3_CALC