app/testpmd: fix IP next proto in set raw decap/encap
authorXiaoyu Min <jackmin@mellanox.com>
Thu, 31 Oct 2019 10:11:02 +0000 (12:11 +0200)
committerFerruh Yigit <ferruh.yigit@intel.com>
Fri, 8 Nov 2019 22:15:05 +0000 (23:15 +0100)
commit2b4cd8ad5e51b40f57c0e548f07a1056f5dc2894
treec43a5b3c79aa17e09d46e1914bcc12217f2ef83d
parent7e6be797196b1fe7a135e985194c60e3f160b947
app/testpmd: fix IP next proto in set raw decap/encap

The IP's next protocol will be specified by user when set IP-in-IP
tunnel header via set raw decap/encap commands.

Currently this field is wrongly set to zero if there is no upper layer.
This leads to the encapsulated IP-in-IP tunnel header is not correct.

This next protocol field should be leave it as-is if there is no upper
layer or value is already set.

Fixes: 30626def03d6 ("app/testpmd: support raw encap/decap actions")
Cc: stable@dpdk.org
Signed-off-by: Xiaoyu Min <jackmin@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
app/test-pmd/cmdline_flow.c