diff mbox series

[ovs-dev] ofproto-dpif-xlate: Fix packet drops with decap(packet_type(ns=1, type=0x8848).

Message ID 20220118121047.2855-1-martinvarghesenokia@gmail.com
State Changes Requested
Headers show
Series [ovs-dev] ofproto-dpif-xlate: Fix packet drops with decap(packet_type(ns=1, type=0x8848). | expand

Checks

Context Check Description
ovsrobot/apply-robot success apply and check: success
ovsrobot/github-robot-_Build_and_Test success github build: passed

Commit Message

Martin Varghese Jan. 18, 2022, 12:10 p.m. UTC
From: Martin Varghese <martin.varghese@nokia.com>

Added PT_MPLS_MC support in function xlate_generic_decap_action to fix packet
drops when decap(packet_type(ns=1,type=0x8848) action is applied.

Fixes: 1917ace89364("Encap & Decap actions for MPLS packet type.")
Signed-off-by: Martin Varghese <martin.varghese@nokia.com>
---
 ofproto/ofproto-dpif-xlate.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Ilya Maximets Jan. 18, 2022, 12:29 p.m. UTC | #1
On 1/18/22 13:10, Martin Varghese wrote:
> From: Martin Varghese <martin.varghese@nokia.com>
> 
> Added PT_MPLS_MC support in function xlate_generic_decap_action to fix packet
> drops when decap(packet_type(ns=1,type=0x8848) action is applied.
> 
> Fixes: 1917ace89364("Encap & Decap actions for MPLS packet type.")
> Signed-off-by: Martin Varghese <martin.varghese@nokia.com>
> ---
>  ofproto/ofproto-dpif-xlate.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c
> index 6fb59e170..9a8e8e777 100644
> --- a/ofproto/ofproto-dpif-xlate.c
> +++ b/ofproto/ofproto-dpif-xlate.c
> @@ -6707,7 +6707,8 @@ xlate_generic_decap_action(struct xlate_ctx *ctx,
>              ctx->pending_decap = true;
>              /* Trigger recirculation. */
>              return true;
> -        case PT_MPLS: {
> +        case PT_MPLS:
> +        case PT_MPLS_MC: {
>              int n;
>              ovs_be16 ethertype;
>  
> 

Oh.  Seems like another 'case' got lost in the process.

The change seems correct, but could you, please, add a unit test,
so we can have this path covered?

Best regards, Ilya Maximets.
Martin Varghese Jan. 18, 2022, 1:42 p.m. UTC | #2
On Tue, Jan 18, 2022 at 01:29:12PM +0100, Ilya Maximets wrote:
> On 1/18/22 13:10, Martin Varghese wrote:
> > From: Martin Varghese <martin.varghese@nokia.com>
> > 
> > Added PT_MPLS_MC support in function xlate_generic_decap_action to fix packet
> > drops when decap(packet_type(ns=1,type=0x8848) action is applied.
> > 
> > Fixes: 1917ace89364("Encap & Decap actions for MPLS packet type.")
> > Signed-off-by: Martin Varghese <martin.varghese@nokia.com>
> > ---
> >  ofproto/ofproto-dpif-xlate.c | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c
> > index 6fb59e170..9a8e8e777 100644
> > --- a/ofproto/ofproto-dpif-xlate.c
> > +++ b/ofproto/ofproto-dpif-xlate.c
> > @@ -6707,7 +6707,8 @@ xlate_generic_decap_action(struct xlate_ctx *ctx,
> >              ctx->pending_decap = true;
> >              /* Trigger recirculation. */
> >              return true;
> > -        case PT_MPLS: {
> > +        case PT_MPLS:
> > +        case PT_MPLS_MC: {
> >              int n;
> >              ovs_be16 ethertype;
> >  
> > 
> 
> Oh.  Seems like another 'case' got lost in the process.
> 
> The change seems correct, but could you, please, add a unit test,
> so we can have this path covered?
>
Sure. I will send that out soon.
> Best regards, Ilya Maximets.
diff mbox series

Patch

diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c
index 6fb59e170..9a8e8e777 100644
--- a/ofproto/ofproto-dpif-xlate.c
+++ b/ofproto/ofproto-dpif-xlate.c
@@ -6707,7 +6707,8 @@  xlate_generic_decap_action(struct xlate_ctx *ctx,
             ctx->pending_decap = true;
             /* Trigger recirculation. */
             return true;
-        case PT_MPLS: {
+        case PT_MPLS:
+        case PT_MPLS_MC: {
             int n;
             ovs_be16 ethertype;