netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Nicolas de Pesloüan" <nicolas.2p.debian@gmail.com>
To: Jiri Pirko <jpirko@redhat.com>
Cc: Andy Gospodarek <andy@greyhouse.net>,
	netdev@vger.kernel.org, davem@davemloft.net, fubar@us.ibm.com,
	eric.dumazet@gmail.com
Subject: Re: [patch net-next-2.6] bonding: remove skb_share_check in handle_frame
Date: Wed, 02 Mar 2011 22:54:03 +0100	[thread overview]
Message-ID: <4D6EBC7B.8040502@gmail.com> (raw)
In-Reply-To: <20110302211238.GC3360@psychotron.redhat.com>

Le 02/03/2011 22:12, Jiri Pirko a écrit :
> Wed, Mar 02, 2011 at 09:47:50PM CET, nicolas.2p.debian@gmail.com wrote:
>> Hi Jiri,
>>
>> Do you plan to call the bonding ARP handler from inside bond_handle_frame()?
>
> I do - it's part of patchset I've cooked (going to test that tomorrow).
>
>> A few days ago
>> (http://marc.info/?l=linux-netdev&m=129883949022340&w=2), I noticed
>> that it is not possible to call the bonding ARP handler from inside
>> the bonding rx_handler, because some frame processing may be required
>> after the bonding rx_handler call, to put the frame in a suitable
>> state for the bonding ARP handler.
>
> Do you see another scenario besides the next one?

None that currently work, but eth0 -> bond0 -> br0 -> br0.100 should work too.

>> This is at least true with the following setup, eth0 ->  bond0 ->
>> bond0.100, where the ARP frames are VLAN tagged at the time the
>> bonding rx_handler process them.
>
> Isn't this scenario resolved by vlan_on_bond_hook ?
>
> eth0
>    ->rx_handler ->  another round
> bond0
>    ->vlan_hwaccel_do_receive ->  __netif_receive_skb
> bond0.100
>    ->vlan_on_bond_hook ->  reinject to bond0

Yes, it is, but this hack does not solve the eth0 -> bond0 -> br0 -> br0.100 configuration.

All those handlers that call netif_rx() or __netif_receive_skb() sound horrible to me. Can you 
imagine the global overhead of the above receive path?

The reason why I suggested you introduce the goto another_round is because most - if not all - 
stacking configurations could/should be handled simply by returning the right skb from the 
rx_handler and let __netif_receive_skb() loop. And by having the right orig_dev logic inside 
__netif_receive_skb(), it could be possible to remove the current vlan_on_bond_hook hack.

My question about whether the skb is shared between the protocol handlers (in another thread) also 
target at this idea.

You will probably told me I'm free to propose patchs for all that, and you are right. Just missing 
the time to do so.

	Nicolas.

  reply	other threads:[~2011-03-02 21:54 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-03-01  6:22 [patch net-next-2.6] bonding: remove skb_share_check in handle_frame Jiri Pirko
2011-03-01  9:29 ` Jiri Pirko
2011-03-01 15:12   ` Changli Gao
2011-03-01 20:11     ` Nicolas de Pesloüan
2011-03-02 16:13       ` Changli Gao
2011-03-02 21:05         ` Nicolas de Pesloüan
2011-03-01 20:38   ` Andy Gospodarek
2011-03-02 10:03     ` Jiri Pirko
2011-03-02 12:29       ` Jiri Pirko
2011-03-02 20:47       ` Nicolas de Pesloüan
2011-03-02 21:12         ` Jiri Pirko
2011-03-02 21:54           ` Nicolas de Pesloüan [this message]
2011-03-03  6:14             ` Jiri Pirko
2011-03-03  8:37               ` Nicolas de Pesloüan

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=4D6EBC7B.8040502@gmail.com \
    --to=nicolas.2p.debian@gmail.com \
    --cc=andy@greyhouse.net \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=fubar@us.ibm.com \
    --cc=jpirko@redhat.com \
    --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;
as well as URLs for NNTP newsgroup(s).