app/testpmd: fix the miss configuration for NVGRE encap

Message ID 1615868307-254141-1-git-send-email-jiaweiw@nvidia.com (mailing list archive)
State Accepted, archived
Delegated to: Ferruh Yigit
Headers
Series app/testpmd: fix the miss configuration for NVGRE encap |

Checks

Context Check Description
ci/checkpatch success coding style OK
ci/Intel-compilation success Compilation OK
ci/travis-robot success travis build: passed
ci/github-robot success github build: passed
ci/iol-abi-testing success Testing PASS
ci/iol-testing success Testing PASS
ci/iol-mellanox-Functional success Functional Testing PASS
ci/iol-mellanox-Performance success Performance Testing PASS
ci/iol-intel-Performance success Performance Testing PASS
ci/intel-Testing success Testing PASS

Commit Message

Jiawei Wang March 16, 2021, 4:18 a.m. UTC
  For NVGRE protocol, the default value of c_k_s_rsvd0_ver
must be 0x2000, and protocol type must be 0x6558 in the NVGRE
header.

This patch updates these two configuraitons while parser the nvgre
encap.

Fixes: dcd962fc6b ("app/testpmd: add NVGRE encap/decap")
Cc: stable@dpdk.org

Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com>
Acked-by: Ori Kam <orika@nvidia.com>
---
 app/test-pmd/cmdline_flow.c | 2 ++
 1 file changed, 2 insertions(+)
  

Comments

Ferruh Yigit March 23, 2021, 1:57 p.m. UTC | #1
On 3/16/2021 4:18 AM, Jiawei Wang wrote:
> For NVGRE protocol, the default value of c_k_s_rsvd0_ver
> must be 0x2000, and protocol type must be 0x6558 in the NVGRE
> header.
> 
> This patch updates these two configuraitons while parser the nvgre
> encap.
> 
> Fixes: dcd962fc6b ("app/testpmd: add NVGRE encap/decap")
> Cc: stable@dpdk.org
> 
> Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com>
> Acked-by: Ori Kam <orika@nvidia.com>

Applied to dpdk-next-net/main, thanks.
  

Patch

diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 49d9f9c..2c40c69 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -5439,6 +5439,8 @@  static int comp_set_modify_field_id(struct context *, const struct token *,
 		       .src_addr = nvgre_encap_conf.ipv4_src,
 		       .dst_addr = nvgre_encap_conf.ipv4_dst,
 		},
+		.item_nvgre.c_k_s_rsvd0_ver = RTE_BE16(0x2000),
+		.item_nvgre.protocol = RTE_BE16(RTE_ETHER_TYPE_TEB),
 		.item_nvgre.flow_id = 0,
 	};
 	memcpy(action_nvgre_encap_data->item_eth.dst.addr_bytes,