* [dpdk-stable] [PATCH] app/testpmd: fix mpls bos bit default value
@ 2018-11-21 14:47 Saleh Alsouqi
2018-11-21 14:55 ` Ori Kam
0 siblings, 1 reply; 3+ messages in thread
From: Saleh Alsouqi @ 2018-11-21 14:47 UTC (permalink / raw)
To: wenzhuo.lu, jingjing.wu, bernard.iremonger; +Cc: dev, Ori Kam, stable
The Bottom-of-Stack (bos) bit of MPLS indicates
whether its the last MPLS layer (1) or not (0).
Indicating that the encapsulating MPLS is the
last MPLS layer in the packet as the default
behavior is more appropriate since multiple
encapsulation actions is not supported.
Fixes: 3e77031be855 ("app/testpmd: add MPLSoGRE encapsulation")
Fixes: a1191d39cb57 ("app/testpmd: add MPLSoUDP encapsulation")
cc: stable@dpdk.org
Signed-off-by: Saleh AlSouqi <salehals@mellanox.com>
---
app/test-pmd/cmdline_flow.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
index 23ea7cc82..5c0108fa7 100644
--- a/app/test-pmd/cmdline_flow.c
+++ b/app/test-pmd/cmdline_flow.c
@@ -3808,6 +3808,7 @@ parse_vc_action_mplsogre_encap(struct context *ctx, const struct token *token,
header += sizeof(gre);
memcpy(mpls.label_tc_s, mplsogre_encap_conf.label,
RTE_DIM(mplsogre_encap_conf.label));
+ mpls.label_tc_s[2] |= 0x1;
memcpy(header, &mpls, sizeof(mpls));
header += sizeof(mpls);
action_encap_data->conf.size = header -
@@ -3998,6 +3999,7 @@ parse_vc_action_mplsoudp_encap(struct context *ctx, const struct token *token,
header += sizeof(udp);
memcpy(mpls.label_tc_s, mplsoudp_encap_conf.label,
RTE_DIM(mplsoudp_encap_conf.label));
+ mpls.label_tc_s[2] |= 0x1;
memcpy(header, &mpls, sizeof(mpls));
header += sizeof(mpls);
action_encap_data->conf.size = header -
--
2.14.1
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-stable] [PATCH] app/testpmd: fix mpls bos bit default value
2018-11-21 14:47 [dpdk-stable] [PATCH] app/testpmd: fix mpls bos bit default value Saleh Alsouqi
@ 2018-11-21 14:55 ` Ori Kam
2018-11-27 16:38 ` [dpdk-stable] [dpdk-dev] " Ferruh Yigit
0 siblings, 1 reply; 3+ messages in thread
From: Ori Kam @ 2018-11-21 14:55 UTC (permalink / raw)
To: Saleh Alsouqi, wenzhuo.lu, jingjing.wu, bernard.iremonger; +Cc: dev, stable
> -----Original Message-----
> From: Saleh Alsouqi
> Sent: Wednesday, November 21, 2018 4:47 PM
> To: wenzhuo.lu@intel.com; jingjing.wu@intel.com;
> bernard.iremonger@intel.com
> Cc: dev@dpdk.org; Ori Kam <orika@mellanox.com>; stable@dpdk.org
> Subject: [PATCH] app/testpmd: fix mpls bos bit default value
>
> The Bottom-of-Stack (bos) bit of MPLS indicates
> whether its the last MPLS layer (1) or not (0).
>
> Indicating that the encapsulating MPLS is the
> last MPLS layer in the packet as the default
> behavior is more appropriate since multiple
> encapsulation actions is not supported.
>
> Fixes: 3e77031be855 ("app/testpmd: add MPLSoGRE encapsulation")
> Fixes: a1191d39cb57 ("app/testpmd: add MPLSoUDP encapsulation")
> cc: stable@dpdk.org
>
> Signed-off-by: Saleh AlSouqi <salehals@mellanox.com>
> ---
> app/test-pmd/cmdline_flow.c | 2 ++
> 1 file changed, 2 insertions(+)
>
> diff --git a/app/test-pmd/cmdline_flow.c b/app/test-pmd/cmdline_flow.c
> index 23ea7cc82..5c0108fa7 100644
> --- a/app/test-pmd/cmdline_flow.c
> +++ b/app/test-pmd/cmdline_flow.c
> @@ -3808,6 +3808,7 @@ parse_vc_action_mplsogre_encap(struct context
> *ctx, const struct token *token,
> header += sizeof(gre);
> memcpy(mpls.label_tc_s, mplsogre_encap_conf.label,
> RTE_DIM(mplsogre_encap_conf.label));
> + mpls.label_tc_s[2] |= 0x1;
> memcpy(header, &mpls, sizeof(mpls));
> header += sizeof(mpls);
> action_encap_data->conf.size = header -
> @@ -3998,6 +3999,7 @@ parse_vc_action_mplsoudp_encap(struct context
> *ctx, const struct token *token,
> header += sizeof(udp);
> memcpy(mpls.label_tc_s, mplsoudp_encap_conf.label,
> RTE_DIM(mplsoudp_encap_conf.label));
> + mpls.label_tc_s[2] |= 0x1;
> memcpy(header, &mpls, sizeof(mpls));
> header += sizeof(mpls);
> action_encap_data->conf.size = header -
> --
> 2.14.1
Acked-by: Ori Kam <orika@mellanox.com>
Thanks,
Ori
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-stable] [dpdk-dev] [PATCH] app/testpmd: fix mpls bos bit default value
2018-11-21 14:55 ` Ori Kam
@ 2018-11-27 16:38 ` Ferruh Yigit
0 siblings, 0 replies; 3+ messages in thread
From: Ferruh Yigit @ 2018-11-27 16:38 UTC (permalink / raw)
To: Ori Kam, Saleh Alsouqi, wenzhuo.lu, jingjing.wu, bernard.iremonger
Cc: dev, stable
On 11/21/2018 2:55 PM, Ori Kam wrote:
>
>> -----Original Message-----
>> From: Saleh Alsouqi
>> Sent: Wednesday, November 21, 2018 4:47 PM
>> To: wenzhuo.lu@intel.com; jingjing.wu@intel.com;
>> bernard.iremonger@intel.com
>> Cc: dev@dpdk.org; Ori Kam <orika@mellanox.com>; stable@dpdk.org
>> Subject: [PATCH] app/testpmd: fix mpls bos bit default value
>>
>> The Bottom-of-Stack (bos) bit of MPLS indicates
>> whether its the last MPLS layer (1) or not (0).
>>
>> Indicating that the encapsulating MPLS is the
>> last MPLS layer in the packet as the default
>> behavior is more appropriate since multiple
>> encapsulation actions is not supported.
>>
>> Fixes: 3e77031be855 ("app/testpmd: add MPLSoGRE encapsulation")
>> Fixes: a1191d39cb57 ("app/testpmd: add MPLSoUDP encapsulation")
>> cc: stable@dpdk.org
>>
>> Signed-off-by: Saleh AlSouqi <salehals@mellanox.com>
>> 2.14.1
>
> Acked-by: Ori Kam <orika@mellanox.com>
>
Applied to dpdk-next-net/master, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-11-27 16:38 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-11-21 14:47 [dpdk-stable] [PATCH] app/testpmd: fix mpls bos bit default value Saleh Alsouqi
2018-11-21 14:55 ` Ori Kam
2018-11-27 16:38 ` [dpdk-stable] [dpdk-dev] " Ferruh Yigit
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).