All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jiri Pirko <jpirko@redhat.com>
To: "Nicolas de Pesloüan" <nicolas.2p.debian@gmail.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, 2 Mar 2011 22:12:38 +0100	[thread overview]
Message-ID: <20110302211238.GC3360@psychotron.redhat.com> (raw)
In-Reply-To: <4D6EACF6.2040005@gmail.com>

Wed, Mar 02, 2011 at 09:47:50PM CET, nicolas.2p.debian@gmail.com wrote:
>Le 02/03/2011 11:03, Jiri Pirko a écrit :
>>Tue, Mar 01, 2011 at 09:38:43PM CET, andy@greyhouse.net wrote:
>>>On Tue, Mar 01, 2011 at 10:29:07AM +0100, Jiri Pirko wrote:
>>>>Unapplicable, sorry (wrong branch :(). Here's corrected patch:
>>>>
>>>>Subject: [PATCH net-next-2.6 v2] bonding: remove skb_share_check in handle_frame
>>>>
>>>>No need to do share check here.
>>>>
>>>>Signed-off-by: Jiri Pirko<jpirko@redhat.com>
>>>>---
>>>>  drivers/net/bonding/bond_main.c |    3 ---
>>>>  1 files changed, 0 insertions(+), 3 deletions(-)
>>>>
>>>>diff --git a/drivers/net/bonding/bond_main.c b/drivers/net/bonding/bond_main.c
>>>>index 584f97b..367ea60 100644
>>>>--- a/drivers/net/bonding/bond_main.c
>>>>+++ b/drivers/net/bonding/bond_main.c
>>>>@@ -1498,9 +1498,6 @@ static struct sk_buff *bond_handle_frame(struct sk_buff *skb)
>>>>  	struct net_device *slave_dev;
>>>>  	struct net_device *bond_dev;
>>>>
>>>>-	skb = skb_share_check(skb, GFP_ATOMIC);
>>>>-	if (unlikely(!skb))
>>>>-		return NULL;
>>>>  	slave_dev = skb->dev;
>>>>  	bond_dev = ACCESS_ONCE(slave_dev->master);
>>>>  	if (unlikely(!bond_dev))
>>>>--
>>>>1.7.3.4
>>>>
>>>
>>>Why did you decide to get rid of it here rather than the 3 places in the
>>>bonding driver where it is currently needed?  I think this can cover
>>>those cases since bond_handle_frame will be called after the ptype_all
>>>handlers before any of the ptype handlers.
>>
>>I have already a patch prepared which converts bond ptype handlers into
>>being called from bond_handle_frame. You are propably right that this
>>should probably stay here.
>
>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?

>
>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


>
>	Nicolas.

  reply	other threads:[~2011-03-02 21:12 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 [this message]
2011-03-02 21:54           ` Nicolas de Pesloüan
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=20110302211238.GC3360@psychotron.redhat.com \
    --to=jpirko@redhat.com \
    --cc=andy@greyhouse.net \
    --cc=davem@davemloft.net \
    --cc=eric.dumazet@gmail.com \
    --cc=fubar@us.ibm.com \
    --cc=netdev@vger.kernel.org \
    --cc=nicolas.2p.debian@gmail.com \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.