DPDK patches and discussions
 help / color / mirror / Atom feed
From: Qi Zhang <qi.z.zhang@intel.com>
To: ferruh.yigit@intel.com, qi.z.zhang@intel.com,
	bernard.iremonger@intel.com
Cc: dev@dpdk.org, Qiming Yang <qiming.yang@intel.com>
Subject: [dpdk-dev] [PATCH v5 2/5] net/i40e: add support for VXLAN-GPE
Date: Fri,  5 Apr 2019 17:05:32 +0800	[thread overview]
Message-ID: <20190405090535.7604-3-qi.z.zhang@intel.com> (raw)
Message-ID: <20190405090532.mrWNmG0EkIQntHNPAertaqaTX84fFdIiCwhvRQoN05g@z> (raw)
In-Reply-To: <20190405090535.7604-1-qi.z.zhang@intel.com>

From: Qiming Yang <qiming.yang@intel.com>

Add new protocol type VXLAN-GPE support for UDP tunnel.
inner IP/TCP/UDP checksum and RSS configuration shared
the same implementation of VXLAN.

Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acke-by: Qi Zhang <qi.z.zhang@intel.com>
---
 drivers/net/i40e/i40e_ethdev.c | 13 +++++++++----
 1 file changed, 9 insertions(+), 4 deletions(-)

diff --git a/drivers/net/i40e/i40e_ethdev.c b/drivers/net/i40e/i40e_ethdev.c
index b031bf4c6..f382013c4 100644
--- a/drivers/net/i40e/i40e_ethdev.c
+++ b/drivers/net/i40e/i40e_ethdev.c
@@ -8370,7 +8370,7 @@ i40e_get_vxlan_port_idx(struct i40e_pf *pf, uint16_t port)
 }
 
 static int
-i40e_add_vxlan_port(struct i40e_pf *pf, uint16_t port)
+i40e_add_vxlan_port(struct i40e_pf *pf, uint16_t port, int udp_type)
 {
 	int  idx, ret;
 	uint8_t filter_idx;
@@ -8393,7 +8393,7 @@ i40e_add_vxlan_port(struct i40e_pf *pf, uint16_t port)
 		return -ENOSPC;
 	}
 
-	ret =  i40e_aq_add_udp_tunnel(hw, port, I40E_AQC_TUNNEL_TYPE_VXLAN,
+	ret =  i40e_aq_add_udp_tunnel(hw, port, udp_type,
 					&filter_idx, NULL);
 	if (ret < 0) {
 		PMD_DRV_LOG(ERR, "Failed to add VXLAN UDP port %d", port);
@@ -8461,9 +8461,13 @@ i40e_dev_udp_tunnel_port_add(struct rte_eth_dev *dev,
 
 	switch (udp_tunnel->prot_type) {
 	case RTE_TUNNEL_TYPE_VXLAN:
-		ret = i40e_add_vxlan_port(pf, udp_tunnel->udp_port);
+		ret = i40e_add_vxlan_port(pf, udp_tunnel->udp_port,
+					  I40E_AQC_TUNNEL_TYPE_VXLAN);
+		break;
+	case RTE_TUNNEL_TYPE_VXLAN_GPE:
+		ret = i40e_add_vxlan_port(pf, udp_tunnel->udp_port,
+					  I40E_AQC_TUNNEL_TYPE_VXLAN_GPE);
 		break;
-
 	case RTE_TUNNEL_TYPE_GENEVE:
 	case RTE_TUNNEL_TYPE_TEREDO:
 		PMD_DRV_LOG(ERR, "Tunnel type is not supported now.");
@@ -8492,6 +8496,7 @@ i40e_dev_udp_tunnel_port_del(struct rte_eth_dev *dev,
 
 	switch (udp_tunnel->prot_type) {
 	case RTE_TUNNEL_TYPE_VXLAN:
+	case RTE_TUNNEL_TYPE_VXLAN_GPE:
 		ret = i40e_del_vxlan_port(pf, udp_tunnel->udp_port);
 		break;
 	case RTE_TUNNEL_TYPE_GENEVE:
-- 
2.13.6


  parent reply	other threads:[~2019-04-05  9:03 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-04-05  9:05 [dpdk-dev] [PATCH v5 0/5] This patch set supported new packet type Qi Zhang
2019-04-05  9:05 ` Qi Zhang
2019-04-05  9:05 ` [dpdk-dev] [PATCH v5 1/5] ethdev: add VXLAN-GPE macro Qi Zhang
2019-04-05  9:05   ` Qi Zhang
2019-04-05  9:36   ` Ananyev, Konstantin
2019-04-05  9:36     ` Ananyev, Konstantin
2019-04-05  9:42     ` Ferruh Yigit
2019-04-05  9:42       ` Ferruh Yigit
2019-04-05 10:37       ` Thomas Monjalon
2019-04-05 10:37         ` Thomas Monjalon
2019-04-05 11:12         ` Ferruh Yigit
2019-04-05 11:12           ` Ferruh Yigit
2019-04-05  9:05 ` Qi Zhang [this message]
2019-04-05  9:05   ` [dpdk-dev] [PATCH v5 2/5] net/i40e: add support for VXLAN-GPE Qi Zhang
2019-04-05  9:05 ` [dpdk-dev] [PATCH v5 3/5] net/i40e: support VXLAN-GPE classification Qi Zhang
2019-04-05  9:05   ` Qi Zhang
2019-04-05  9:05 ` [dpdk-dev] [PATCH v5 4/5] app/testpmd: add VXLAN-GPE to tunnel type Qi Zhang
2019-04-05  9:05   ` Qi Zhang
2019-04-05  9:05 ` [dpdk-dev] [PATCH v5 5/5] doc: add release note for VXLAN-GPE support Qi Zhang
2019-04-05  9:05   ` Qi Zhang
2019-04-05 11:31 ` [dpdk-dev] [PATCH v5 0/5] This patch set supported new packet type Ferruh Yigit
2019-04-05 11:31   ` Ferruh Yigit
2019-04-05 11:40   ` Ferruh Yigit
2019-04-05 11:40     ` Ferruh Yigit

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=20190405090535.7604-3-qi.z.zhang@intel.com \
    --to=qi.z.zhang@intel.com \
    --cc=bernard.iremonger@intel.com \
    --cc=dev@dpdk.org \
    --cc=ferruh.yigit@intel.com \
    --cc=qiming.yang@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).