Skip to content

Commit

Permalink
app/testpmd: fix NVGRE encap configuration
Browse files Browse the repository at this point in the history
[ upstream commit 9b0da81 ]

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 configurations while parsing the nvgre
encap.

Fixes: dcd962f ("app/testpmd: add NVGRE encap/decap")

Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com>
  • Loading branch information
jiaweiwsz authored and cpaelzer committed Jun 10, 2021
1 parent bb144e7 commit 74ad940
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion app/test-pmd/cmdline_flow.c
Expand Up @@ -4250,7 +4250,11 @@ parse_vc_action_nvgre_encap(struct context *ctx, const struct token *token,
.src_addr = nvgre_encap_conf.ipv4_src,
.dst_addr = nvgre_encap_conf.ipv4_dst,
},
.item_nvgre.flow_id = 0,
.item_nvgre = {
.c_k_s_rsvd0_ver = RTE_BE16(0x2000),
.protocol = RTE_BE16(RTE_ETHER_TYPE_TEB),
.flow_id = 0,
},
};
memcpy(action_nvgre_encap_data->item_eth.dst.addr_bytes,
nvgre_encap_conf.eth_dst, RTE_ETHER_ADDR_LEN);
Expand Down

0 comments on commit 74ad940

Please sign in to comment.