svn commit: r354440 - stable/12/sys/dev/mlx5/mlx5_en

Hans Petter Selasky hselasky at FreeBSD.org
Thu Nov 7 13:12:39 UTC 2019


Author: hselasky
Date: Thu Nov  7 13:12:38 2019
New Revision: 354440
URL: https://svnweb.freebsd.org/changeset/base/354440

Log:
  Check CSUM_SND_TAG flag before classifying packet has having a send
  tag in mlx5en(4). This fixes an issue with packets being dropped when
  doing packet forwarding, because the rcvif field is still set. The
  send tag pointer and rcvif field share the same memory location.
  
  This is a direct commit.
  
  Reported by:	olivier@
  Sponsored by:	Mellanox Technologies

Modified:
  stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c

Modified: stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c
==============================================================================
--- stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c	Thu Nov  7 13:01:09 2019	(r354439)
+++ stable/12/sys/dev/mlx5/mlx5_en/mlx5_en_tx.c	Thu Nov  7 13:12:38 2019	(r354440)
@@ -609,7 +609,8 @@ mlx5e_xmit(struct ifnet *ifp, struct mbuf *mb)
 	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 */


More information about the svn-src-all mailing list