[v3,2/5] net/i40e: add support for VXLAN-GPE
Checks
Commit Message
Can recognize new packet type VXLAN-GPE in i40e driver.
Added inner IP/TCP/UDP checksum and RSS support for VXLAN-GPE
packet.
Signed-off-by: Qiming Yang <qiming.yang@intel.com>
---
drivers/net/i40e/i40e_ethdev.c | 13 +++++++++----
1 file changed, 9 insertions(+), 4 deletions(-)
Comments
> -----Original Message-----
> From: Yang, Qiming
> Sent: Monday, March 18, 2019 11:42 PM
> To: dev@dpdk.org
> Cc: Zhang, Qi Z <qi.z.zhang@intel.com>; Yang, Qiming <qiming.yang@intel.com>
> Subject: [PATCH v3 2/5] net/i40e: add support for VXLAN-GPE
>
> Can recognize new packet type VXLAN-GPE in i40e driver.
> Added inner IP/TCP/UDP checksum and RSS support for VXLAN-GPE packet.
The commit log is a missing leading.
.
there is no inner IP/TCP/UDP checksum and RSS related change
May reword to
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>
> ---
> 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 dca61f0..b2ec5cc 100644
> --- a/drivers/net/i40e/i40e_ethdev.c
> +++ b/drivers/net/i40e/i40e_ethdev.c
> @@ -8368,7 +8368,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;
> @@ -8391,7 +8391,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); @@
> -8459,9 +8459,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."); @@
> -8490,6 +8494,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.9.5
@@ -8368,7 +8368,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;
@@ -8391,7 +8391,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);
@@ -8459,9 +8459,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.");
@@ -8490,6 +8494,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: