Netdev List
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Jiri Bohac <jbohac@suse.cz>
Cc: David Miller <davem@davemloft.net>,
	fubar@us.ibm.com, andy@greyhouse.net, netdev@vger.kernel.org
Subject: Re: [PATCH v2] bonding: don't increase rx_dropped after processing LACPDUs
Date: Fri, 04 May 2012 15:04:56 +0200	[thread overview]
Message-ID: <1336136696.3752.320.camel@edumazet-glaptop> (raw)
In-Reply-To: <20120504121935.GC32665@midget.suse.cz>

On Fri, 2012-05-04 at 14:19 +0200, Jiri Bohac wrote:
> Since commit 3aba891d, bonding processes LACP frames (802.3ad
> mode) with bond_handle_frame(). Currently a copy of the skb is
> made and the original is left to be processed by other
> rx_handlers and the rest of the network stack by returning
> RX_HANDLER_ANOTHER.  As there is no protocol handler for
> PKT_TYPE_LACPDU, the frame is dropped and dev->rx_dropped
> increased.
> 
> Fix this by making bond_handle_frame() return RX_HANDLER_CONSUMED
> if bonding has processed the LACP frame.
> 
> Signed-off-by: Jiri Bohac <jbohac@suse.cz>
> 


>  		if (likely(nskb)) {
> -			recv_probe(nskb, bond, slave);
> +			ret = recv_probe(nskb, bond, slave);
>  			dev_kfree_skb(nskb);
> +			if (ret == RX_HANDLER_CONSUMED) {
> +				kfree_skb(skb);

consume_skb(skb) to not fool drop_monitor/dropwatch ?

> +				return ret;
> +			}
>  		}
>  	}

  reply	other threads:[~2012-05-04 13:05 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-05-02 20:23 bonding: don't increase rx_dropped after processing LACPDUs Jiri Bohac
2012-05-02 20:36 ` Eric Dumazet
2012-05-02 20:51   ` Jiri Bohac
2012-05-02 23:10     ` Jay Vosburgh
2012-05-04 12:15       ` Jiri Bohac
2012-05-02 23:41     ` David Miller
2012-05-04 12:16       ` Jiri Bohac
2012-05-04 12:19         ` [PATCH v2] " Jiri Bohac
2012-05-04 13:04           ` Eric Dumazet [this message]
2012-05-04 13:28             ` [PATCH v3] " Jiri Bohac
2012-05-04 14:53               ` David Miller

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1336136696.3752.320.camel@edumazet-glaptop \
    --to=eric.dumazet@gmail.com \
    --cc=andy@greyhouse.net \
    --cc=davem@davemloft.net \
    --cc=fubar@us.ibm.com \
    --cc=jbohac@suse.cz \
    --cc=netdev@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox