From: David Miller <davem@davemloft.net>
To: mpatocka@redhat.com
Cc: lists.linux-foundation.org@redhat.com, netdev@vger.kernel.org,
kaber@trash.net
Subject: Re: crash with bridge and inconsistent handling of NETDEV_TX_OK
Date: Tue, 20 Apr 2010 16:48:09 -0700 (PDT) [thread overview]
Message-ID: <20100420.164809.78193162.davem@davemloft.net> (raw)
In-Reply-To: <20100420.164505.34362726.davem@davemloft.net>
From: David Miller <davem@davemloft.net>
Date: Tue, 20 Apr 2010 16:45:05 -0700 (PDT)
> From: Mikulas Patocka <mpatocka@redhat.com>
> Date: Tue, 20 Apr 2010 19:40:56 -0400 (EDT)
>
>> Reviewing the code further, I found one very weird commit
>> 572a9d7b6fc7f20f573664063324c086be310c42 committed to 2.6.33. What
>> it does, it changes the semantics of ndo_hard_start_xmit(). Prior to
>> the patch, the meaning was --- return zero (NETDEV_TX_OK) --- the
>> skb is consumed by the driver. Returns non-zero --- the skb is left
>> owned by the caller. The patch changes it to return other flags in
>> bits 4-7 and changes the consumed/returned logic.
>>
>> The problem is that there is still plenty of code that compares it
>> against NETDEV_TX_OK to find out if the skb was consumed.
>
> Drivers are not supposed to return those new flag bits, the new flag
> bits as return values exist only in the packet scheduler path.
And BTW, NETDEV_TX_OK is only ever returned by itself, the
flag bits only get set when a non-NETDEV_TX_OK value is returned.
So we really haven't changed semantics at all, NETDEV_TX_OK (which is
zero) and non-zero are the two valid return value cases.
next prev parent reply other threads:[~2010-04-20 23:48 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-04-20 23:40 crash with bridge and inconsistent handling of NETDEV_TX_OK Mikulas Patocka
2010-04-20 23:45 ` David Miller
2010-04-20 23:48 ` David Miller [this message]
2010-04-20 23:57 ` Mikulas Patocka
2010-04-21 0:00 ` David Miller
2010-04-21 0:12 ` Mikulas Patocka
2010-04-21 0:15 ` David Miller
2010-04-21 0:23 ` Mikulas Patocka
2010-04-21 1:02 ` David Miller
2010-04-21 1:10 ` Mikulas Patocka
2010-04-21 1:14 ` David Miller
2010-04-21 1:16 ` David Miller
2010-04-21 1:21 ` Mikulas Patocka
2010-04-21 1:24 ` David Miller
2010-04-21 2:01 ` David Miller
2010-04-21 13:21 ` Mikulas Patocka
2010-04-29 22:14 ` RCU error in networking (was: crash with bridge and inconsistent handling of NETDEV_TX_OK) Mikulas Patocka
2010-04-29 23:04 ` RCU error in networking David Miller
2010-04-21 1:20 ` crash with bridge and inconsistent handling of NETDEV_TX_OK Mikulas Patocka
2010-04-21 1:22 ` David Miller
2010-04-21 1:24 ` Mikulas Patocka
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=20100420.164809.78193162.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=kaber@trash.net \
--cc=lists.linux-foundation.org@redhat.com \
--cc=mpatocka@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 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.