patches for DPDK stable branches
 help / color / mirror / Atom feed
From: luca.boccassi@gmail.com
To: Wei Zhao <wei.zhao1@intel.com>
Cc: Wenzhuo Lu <wenzhuo.lu@intel.com>, dpdk stable <stable@dpdk.org>
Subject: [dpdk-stable] patch 'net/ixgbe: fix tunnel type set error for FDIR' has been queued to LTS release 16.11.8
Date: Tue, 24 Jul 2018 17:07:29 +0100	[thread overview]
Message-ID: <20180724160752.20287-11-luca.boccassi@gmail.com> (raw)
In-Reply-To: <20180724160752.20287-1-luca.boccassi@gmail.com>

Hi,

FYI, your patch has been queued to LTS release 16.11.8

Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/26/18. So please
shout if anyone has objections.

Thanks.

Luca Boccassi

---
>From 5ec767e444ef4fd4a96aa2dd0ec2efcf5d735eaa Mon Sep 17 00:00:00 2001
From: Wei Zhao <wei.zhao1@intel.com>
Date: Thu, 14 Jun 2018 16:17:28 +0800
Subject: [PATCH] net/ixgbe: fix tunnel type set error for FDIR

[ upstream commit 876b450ed99d2c96c5b71360cc84f7b0b8f506f4 ]

Tunnel type format should be translated to ixgbe required format
before register set in FDIR cloud mode, Ans also some register
not useful in cloud mode but only useful in IP mode should be set
to zero as datasheet request.

Fixes: 82fb702077f6 ("ixgbe: support new flow director modes for X550")
Fixes: 11777435c727 ("net/ixgbe: parse flow director filter")

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
---
 drivers/net/ixgbe/ixgbe_ethdev.h |  5 +++++
 drivers/net/ixgbe/ixgbe_fdir.c   | 19 +++++++++++++++----
 2 files changed, 20 insertions(+), 4 deletions(-)

diff --git a/drivers/net/ixgbe/ixgbe_ethdev.h b/drivers/net/ixgbe/ixgbe_ethdev.h
index a4e2996a4..e1a97ea37 100644
--- a/drivers/net/ixgbe/ixgbe_ethdev.h
+++ b/drivers/net/ixgbe/ixgbe_ethdev.h
@@ -113,6 +113,11 @@
 #define IXGBE_5TUPLE_MAX_PRI            7
 #define IXGBE_5TUPLE_MIN_PRI            1
 
+/* bit of VXLAN tunnel type | 7 bits of zeros  | 8 bits of zeros*/
+#define IXGBE_FDIR_VXLAN_TUNNEL_TYPE    0x8000
+/* bit of NVGRE tunnel type | 7 bits of zeros  | 8 bits of zeros*/
+#define IXGBE_FDIR_NVGRE_TUNNEL_TYPE    0x0
+
 #define IXGBE_RSS_OFFLOAD_ALL ( \
 	ETH_RSS_IPV4 | \
 	ETH_RSS_NONFRAG_IPV4_TCP | \
diff --git a/drivers/net/ixgbe/ixgbe_fdir.c b/drivers/net/ixgbe/ixgbe_fdir.c
index 351167a64..62955bb75 100644
--- a/drivers/net/ixgbe/ixgbe_fdir.c
+++ b/drivers/net/ixgbe/ixgbe_fdir.c
@@ -720,8 +720,17 @@ ixgbe_fdir_filter_to_atr_input(const struct rte_eth_fdir_filter *fdir_filter,
 			input->formatted.inner_mac,
 			fdir_filter->input.flow.tunnel_flow.mac_addr.addr_bytes,
 			sizeof(input->formatted.inner_mac));
-		input->formatted.tunnel_type =
-			fdir_filter->input.flow.tunnel_flow.tunnel_type;
+		if (fdir_filter->input.flow.tunnel_flow.tunnel_type ==
+				RTE_FDIR_TUNNEL_TYPE_VXLAN)
+			input->formatted.tunnel_type =
+					IXGBE_FDIR_VXLAN_TUNNEL_TYPE;
+		else if (fdir_filter->input.flow.tunnel_flow.tunnel_type ==
+				RTE_FDIR_TUNNEL_TYPE_NVGRE)
+			input->formatted.tunnel_type =
+					IXGBE_FDIR_NVGRE_TUNNEL_TYPE;
+		else
+			PMD_DRV_LOG(ERR, " invalid tunnel type arguments.");
+
 		input->formatted.tni_vni =
 			fdir_filter->input.flow.tunnel_flow.tunnel_id >> 8;
 	}
@@ -950,8 +959,7 @@ fdir_write_perfect_filter_82599(struct ixgbe_hw *hw,
 			IXGBE_WRITE_REG(hw, IXGBE_FDIRSIPv6(2), 0);
 		} else {
 			/* tunnel mode */
-			if (input->formatted.tunnel_type !=
-				RTE_FDIR_TUNNEL_TYPE_NVGRE)
+			if (input->formatted.tunnel_type)
 				tunnel_type = 0x80000000;
 			tunnel_type |= addr_high;
 			IXGBE_WRITE_REG(hw, IXGBE_FDIRSIPv6(0), addr_low);
@@ -959,6 +967,9 @@ fdir_write_perfect_filter_82599(struct ixgbe_hw *hw,
 			IXGBE_WRITE_REG(hw, IXGBE_FDIRSIPv6(2),
 					input->formatted.tni_vni);
 		}
+		IXGBE_WRITE_REG(hw, IXGBE_FDIRIPSA, 0);
+		IXGBE_WRITE_REG(hw, IXGBE_FDIRIPDA, 0);
+		IXGBE_WRITE_REG(hw, IXGBE_FDIRPORT, 0);
 	}
 
 	/* record vlan (little-endian) and flex_bytes(big-endian) */
-- 
2.18.0

  parent reply	other threads:[~2018-07-24 16:08 UTC|newest]

Thread overview: 66+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-24 16:07 [dpdk-stable] patch 'net/ena: check pointer before memset' " luca.boccassi
2018-07-24 16:07 ` [dpdk-stable] patch 'net/ena: change memory type' " luca.boccassi
2018-07-24 16:07 ` [dpdk-stable] patch 'net/ena: fix GENMASK_ULL macro' " luca.boccassi
2018-07-24 16:07 ` [dpdk-stable] patch 'net/ena: set link speed as none' " luca.boccassi
2018-07-24 16:07 ` [dpdk-stable] patch 'net/nfp: fix field initialization in Tx descriptor' " luca.boccassi
2018-07-24 16:07 ` [dpdk-stable] patch 'net/bonding: fix MAC address reset' " luca.boccassi
2018-07-24 16:07 ` [dpdk-stable] patch 'mbuf: fix typo in IPv6 macro comment' " luca.boccassi
2018-07-24 16:07 ` [dpdk-stable] patch 'kni: fix build with gcc 8.1' " luca.boccassi
2018-07-24 16:07 ` [dpdk-stable] patch 'net: rename u16 to fix shadowed declaration' " luca.boccassi
2018-07-24 16:07 ` [dpdk-stable] patch 'net/ixgbe: fix tunnel id format error for FDIR' " luca.boccassi
2018-07-24 16:07 ` luca.boccassi [this message]
2018-07-24 16:07 ` [dpdk-stable] patch 'net/ixgbe: fix mask bits register set " luca.boccassi
2018-07-24 16:07 ` [dpdk-stable] patch 'net/i40e: fix shifts of 32-bit value' " luca.boccassi
2018-07-24 16:07 ` [dpdk-stable] patch 'app/testpmd: fix VLAN TCI mask set error for FDIR' " luca.boccassi
2018-07-24 16:07 ` [dpdk-stable] patch 'net/i40e: workaround performance degradation' " luca.boccassi
2018-07-24 16:07 ` [dpdk-stable] patch 'net/i40e: do not reset device info data' " luca.boccassi
2018-07-24 16:07 ` [dpdk-stable] patch 'net/pcap: fix multiple queues' " luca.boccassi
2018-07-24 16:07 ` [dpdk-stable] patch 'net/thunderx: fix build with gcc optimization on' " luca.boccassi
2018-07-24 16:07 ` [dpdk-stable] patch 'net/ena: fix SIGFPE with 0 Rx queue' " luca.boccassi
2018-07-24 16:07 ` [dpdk-stable] patch 'net/qede: fix default extended VLAN offload config' " luca.boccassi
2018-07-24 16:07 ` [dpdk-stable] patch 'net/bnxt: fix HW Tx checksum offload check' " luca.boccassi
2018-07-24 16:07 ` [dpdk-stable] patch 'net/bnxt: fix Tx with multiple mbuf' " luca.boccassi
2018-07-24 16:07 ` [dpdk-stable] patch 'net/bnxt: fix incorrect IO address handling in Tx' " luca.boccassi
2018-07-24 16:07 ` [dpdk-stable] patch 'net/bnxt: fix Rx ring count limitation' " luca.boccassi
2018-07-24 16:07 ` [dpdk-stable] patch 'net/bonding: do not clear active slave count' " luca.boccassi
2018-07-24 16:07 ` [dpdk-stable] patch 'test/crypto: fix device id when stopping port' " luca.boccassi
2018-07-24 16:07 ` [dpdk-stable] patch 'maintainers: update for Mellanox PMDs' " luca.boccassi
2018-07-24 16:07 ` [dpdk-stable] patch 'examples/multi_process: build l2fwd_fork app' " luca.boccassi
2018-07-24 16:07 ` [dpdk-stable] patch 'hash: fix multiwriter lock memory allocation' " luca.boccassi
2018-07-24 16:07 ` [dpdk-stable] patch 'hash: fix a multi-writer race condition' " luca.boccassi
2018-07-24 16:07 ` [dpdk-stable] patch 'hash: fix key slot size accuracy' " luca.boccassi
2018-07-24 16:07 ` [dpdk-stable] patch 'eal: fix return codes on thread naming failure' " luca.boccassi
2018-07-24 16:07 ` [dpdk-stable] patch 'eal/linux: fix invalid syntax in interrupts' " luca.boccassi
2018-07-24 16:07 ` [dpdk-stable] patch 'ethdev: check queue stats mapping input arguments' " luca.boccassi
2018-07-27 10:17   ` [dpdk-stable] patch 'examples/ipsec-secgw: fix IPv4 checksum at Tx' " luca.boccassi
2018-07-27 10:17     ` [dpdk-stable] patch 'examples/ipsec-secgw: fix bypass rule processing' " luca.boccassi
2018-07-27 10:17     ` [dpdk-stable] patch 'net/i40e: fix link speed' " luca.boccassi
2018-07-27 10:17     ` [dpdk-stable] patch 'net/i40e: fix check of flow director programming status' " luca.boccassi
2018-07-27 10:17     ` [dpdk-stable] patch 'ethdev: fix queue statistics mapping documentation' " luca.boccassi
2018-07-27 10:17     ` [dpdk-stable] patch 'net/thunderx: avoid sq door bell write on zero packet' " luca.boccassi
2018-07-27 10:17     ` [dpdk-stable] patch 'examples/exception_path: fix out-of-bounds read' " luca.boccassi
2018-07-27 10:17     ` [dpdk-stable] patch 'examples/l3fwd: remove useless include' " luca.boccassi
2018-07-27 10:17     ` [dpdk-stable] patch 'test: fix EAL flags autotest on FreeBSD' " luca.boccassi
2018-07-27 10:17     ` [dpdk-stable] patch 'test/hash: fix multiwriter with non consecutive cores' " luca.boccassi
2018-07-27 10:17     ` [dpdk-stable] patch 'test/hash: fix potential memory leak' " luca.boccassi
2018-07-27 10:17     ` [dpdk-stable] patch 'doc: fix bonding command in testpmd' " luca.boccassi
2018-08-06 10:56     ` [dpdk-stable] patch 'test: fix uninitialized port configuration' " luca.boccassi
2018-08-06 10:56       ` [dpdk-stable] patch 'app/testpmd: fix DCB config' " luca.boccassi
2018-08-06 10:56       ` [dpdk-stable] patch 'net/bnxt: check access denied for HWRM commands' " luca.boccassi
2018-08-06 10:56       ` [dpdk-stable] patch 'net/bnxt: fix RETA size' " luca.boccassi
2018-08-06 10:56       ` [dpdk-stable] patch 'net/qede/base: fix GRC attention callback' " luca.boccassi
2018-08-06 10:56       ` [dpdk-stable] patch 'net/qede: fix MAC address removal failure message' " luca.boccassi
2018-08-06 10:56       ` [dpdk-stable] patch 'net/bnx2x: fix FW command timeout during stop' " luca.boccassi
2018-08-06 10:56       ` [dpdk-stable] patch 'net/i40e: revert fix of flow director check' " luca.boccassi
2018-08-06 10:56       ` [dpdk-stable] patch 'net/bonding: fix race condition' " luca.boccassi
2018-08-06 10:56       ` [dpdk-stable] patch 'eal: fix bitmap documentation' " luca.boccassi
2018-08-10  9:06       ` [dpdk-stable] patch 'hash: fix doxygen of return values' " luca.boccassi
2018-08-10  9:06         ` [dpdk-stable] patch 'kni: fix crash with null name' " luca.boccassi
2018-08-10  9:06         ` [dpdk-stable] patch 'kni: fix build on RHEL 7.5' " luca.boccassi
2018-08-10  9:06         ` [dpdk-stable] patch 'ethdev: fix a doxygen comment for port allocation' " luca.boccassi
2018-08-10  9:06         ` [dpdk-stable] patch 'mk: fix permissions when using make install' " luca.boccassi
2018-08-10  9:06         ` [dpdk-stable] patch 'maintainers: claim maintainership for ARM v7 and v8' " luca.boccassi
2018-08-28 10:25         ` [dpdk-stable] patch 'net/null: add MAC address setting fake operation' " Luca Boccassi
2018-08-28 10:25           ` [dpdk-stable] patch 'test/virtual_pmd: add MAC address setting fake op' " Luca Boccassi
2018-08-28 10:25           ` [dpdk-stable] patch 'test/bonding: assign non-zero MAC to null devices' " Luca Boccassi
2018-08-28 10:25           ` [dpdk-stable] patch 'Revert "net/i40e: fix packet count for PF"' " Luca Boccassi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180724160752.20287-11-luca.boccassi@gmail.com \
    --to=luca.boccassi@gmail.com \
    --cc=stable@dpdk.org \
    --cc=wei.zhao1@intel.com \
    --cc=wenzhuo.lu@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).