diff mbox series

[ovs-dev] LACP-Rx packets are not captured in ovs-tcpdump.

Message ID 1550083948-30964-1-git-send-email-nitin.katiyar@ericsson.com
State Rejected
Headers show
Series [ovs-dev] LACP-Rx packets are not captured in ovs-tcpdump. | expand

Commit Message

Nitin Katiyar Feb. 13, 2019, 10:51 a.m. UTC
Mirroring received LACP packets to help in debugging LACP issues.

Co-authored-by: Manohar Krishnappa Chidambaraswamy <manukc@gmail.com>
Signed-off-by: Manohar Krishnappa Chidambaraswamy <manukc@gmail.com>
Signed-off-by: Nitin Katiyar <nitin.katiyar@ericsson.com>
---
 ofproto/ofproto-dpif-xlate.c | 1 +
 1 file changed, 1 insertion(+)

Comments

Ben Pfaff Feb. 14, 2019, 5:27 p.m. UTC | #1
On Wed, Feb 13, 2019 at 10:51:18AM +0000, Nitin Katiyar wrote:
> Mirroring received LACP packets to help in debugging LACP issues.
> 
> Co-authored-by: Manohar Krishnappa Chidambaraswamy <manukc@gmail.com>
> Signed-off-by: Manohar Krishnappa Chidambaraswamy <manukc@gmail.com>
> Signed-off-by: Nitin Katiyar <nitin.katiyar@ericsson.com>
> ---
>  ofproto/ofproto-dpif-xlate.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c
> index acd4817..111f36e 100644
> --- a/ofproto/ofproto-dpif-xlate.c
> +++ b/ofproto/ofproto-dpif-xlate.c
> @@ -3308,6 +3308,7 @@ process_special(struct xlate_ctx *ctx, const struct xport *xport)
>      } else if (xport->xbundle && xport->xbundle->lacp
>                 && flow->dl_type == htons(ETH_TYPE_LACP)) {
>          if (packet) {
> +            mirror_ingress_packet(ctx);
>              lacp_process_packet(xport->xbundle->lacp, xport->ofport, packet);
>          }
>          slow = SLOW_LACP;

As far as I can tell this will get called from xlate_action() anyway:

    if (!xin->frozen_state && process_special(&ctx, in_port)) {
        /* process_special() did all the processing for this packet.
         *
         * We do not perform special processing on thawed packets, since that
         * was done before they were frozen and should not be redone. */
        mirror_ingress_packet(&ctx);
    } else if (in_port && in_port->xbundle

Why is LACP more worthy of mirroring than the other protocols that
process_special() handles?
Nitin Katiyar Feb. 15, 2019, 6:30 a.m. UTC | #2
> -----Original Message-----
> From: Ben Pfaff [mailto:blp@ovn.org]
> Sent: Thursday, February 14, 2019 10:58 PM
> To: Nitin Katiyar <nitin.katiyar@ericsson.com>
> Cc: ovs-dev@openvswitch.org; Manohar Krishnappa Chidambaraswamy
> <manukc@gmail.com>
> Subject: Re: [ovs-dev] [PATCH] LACP-Rx packets are not captured in ovs-
> tcpdump.
> 
> On Wed, Feb 13, 2019 at 10:51:18AM +0000, Nitin Katiyar wrote:
> > Mirroring received LACP packets to help in debugging LACP issues.
> >
> > Co-authored-by: Manohar Krishnappa Chidambaraswamy
> <manukc@gmail.com>
> > Signed-off-by: Manohar Krishnappa Chidambaraswamy
> <manukc@gmail.com>
> > Signed-off-by: Nitin Katiyar <nitin.katiyar@ericsson.com>
> > ---
> >  ofproto/ofproto-dpif-xlate.c | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/ofproto/ofproto-dpif-xlate.c
> > b/ofproto/ofproto-dpif-xlate.c index acd4817..111f36e 100644
> > --- a/ofproto/ofproto-dpif-xlate.c
> > +++ b/ofproto/ofproto-dpif-xlate.c
> > @@ -3308,6 +3308,7 @@ process_special(struct xlate_ctx *ctx, const
> struct xport *xport)
> >      } else if (xport->xbundle && xport->xbundle->lacp
> >                 && flow->dl_type == htons(ETH_TYPE_LACP)) {
> >          if (packet) {
> > +            mirror_ingress_packet(ctx);
> >              lacp_process_packet(xport->xbundle->lacp, xport->ofport, packet);
> >          }
> >          slow = SLOW_LACP;
> 
> As far as I can tell this will get called from xlate_action() anyway:
Yeah, you are right. I can drop this patch.
> 
>     if (!xin->frozen_state && process_special(&ctx, in_port)) {
>         /* process_special() did all the processing for this packet.
>          *
>          * We do not perform special processing on thawed packets, since that
>          * was done before they were frozen and should not be redone. */
>         mirror_ingress_packet(&ctx);
>     } else if (in_port && in_port->xbundle
> 
> Why is LACP more worthy of mirroring than the other protocols that
> process_special() handles?
diff mbox series

Patch

diff --git a/ofproto/ofproto-dpif-xlate.c b/ofproto/ofproto-dpif-xlate.c
index acd4817..111f36e 100644
--- a/ofproto/ofproto-dpif-xlate.c
+++ b/ofproto/ofproto-dpif-xlate.c
@@ -3308,6 +3308,7 @@  process_special(struct xlate_ctx *ctx, const struct xport *xport)
     } else if (xport->xbundle && xport->xbundle->lacp
                && flow->dl_type == htons(ETH_TYPE_LACP)) {
         if (packet) {
+            mirror_ingress_packet(ctx);
             lacp_process_packet(xport->xbundle->lacp, xport->ofport, packet);
         }
         slow = SLOW_LACP;