From: Michal Ostrowski <mostrows@watson.ibm.com>
To: Rusty Russell <rusty@rustcorp.com.au>
Cc: "David S. Miller" <davem@redhat.com>,
Paul MacKerras <paulus@samba.org>,
netdev@oss.sgi.com, fcusack@samba.org,
"David F. Skoll" <dfs@roaringpenguin.com>,
James Carlson <carlson@workingcode.com>
Subject: Re: [PATCH, untested] Support for PPPOE on SMP
Date: 25 Jun 2003 09:21:02 -0400 [thread overview]
Message-ID: <1056547262.1945.1436.camel@brick.watson.ibm.com> (raw)
In-Reply-To: <20030625072602.529AF2C0B9@lists.samba.org>
First some background for those new to this discussion (I was going post
the original discussion that strted this to this list, but the summary
here should get everyone up to speed).
A user has observed a race condition where the last packet of PPPoE
discovery arrives just before the first payload packet. The discovery
packet carries the session id and pppd needs to take this session id and
create a PPPoE socket which will then pick up all packets matching the
given session id. The race is between the arrival of the first payload
packet and pppd's creation of the socket that is to receive PPPoE
payload. If the packet wins the race, the payload packet is lost. This
problem was noticed only because the ISP in this case configured their
systems to use a longer, non-standard (but legal) retransmit timeout
thus causing noticeable delays in PPP negotiation.
About the patch: Do we have any guarantees that no drivers will break
this? From the few drivers I've looked at, this will not be a problem
since they lock to ensure that we can't have races in submitting packets
to netif_rx. My concern here would be that it appears that there is no
explicit requirement that this be so; we may be safe in this regard only
by accident. (I can think of a device and driver design where this need
not be so.)
> +
> +static inline int net_proto_serialize(struct sk_buff *skb,
> + int this_cpu,
> + int *ret)
> +{
> + if (likely(skb->protocol != ETH_P_PPP_DISC
> + && skb->protocol != ETH_P_PPP_SES))
> + return 0;
I believe there are concerns with other protocols as well (SNA, spanning
tree - I'm just the messenger on this). If this is so, then I have two
concerns:
1. Some protocols may have no in-kernel implementation, we'd have to
ensure that raw sockets get packets in the right order (perhaps
even regardless of what packet type we hreceive).
2. There are two issues with PPPoE: there's the creation race
described above which requires correct ordering of packets of two
different packet types (discovery is 0x8863, payload is 0x8864),
as well payload packets must be ordered to handle Paul's concerns
regarding compression.
The patch as is adequate to 2), but I'm concerned it would get ugly if
we need to do 1) (and in the process of doing 1) we may break 2) if we
can't synchronize between two different packet types).
I think we can fix the race condition I've described up top without such
core infrastructure changes (delay dropping unmatched payload packets,
give pppd a chance to make the socket). This however doesn't solve the
other ordering problems.
--
Michal Ostrowski <mostrows@watson.ibm.com>
next prev parent reply other threads:[~2003-06-25 13:21 UTC|newest]
Thread overview: 35+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-06-25 7:24 [PATCH, untested] Support for PPPOE on SMP Rusty Russell
2003-06-25 11:19 ` Jamal Hadi
2003-06-25 13:21 ` Michal Ostrowski [this message]
2003-06-25 13:42 ` Michal Ostrowski
2003-06-25 15:45 ` Jamal Hadi
2003-06-25 17:27 ` Michal Ostrowski
2003-06-25 22:17 ` Paul Mackerras
2003-06-25 22:56 ` Michal Ostrowski
2003-06-25 16:15 ` Stephen Hemminger
2003-06-25 16:22 ` Jamal Hadi
2003-06-25 16:39 ` Stephen Hemminger
2003-06-25 17:07 ` Jamal Hadi
2003-06-25 17:40 ` Stephen Hemminger
2003-06-25 18:00 ` Michal Ostrowski
2003-06-25 22:22 ` Paul Mackerras
2003-06-25 22:53 ` Ben Greear
2003-06-25 21:33 ` David S. Miller
2003-06-25 22:06 ` Michal Ostrowski
2003-06-26 1:04 ` David S. Miller
2003-06-26 3:57 ` Rusty Russell
2003-06-26 3:59 ` David S. Miller
2003-06-26 8:17 ` Rusty Russell
2003-06-26 8:55 ` David S. Miller
2003-06-26 10:47 ` James Carlson
2003-06-26 10:51 ` James Carlson
2003-06-26 23:18 ` Jamal Hadi
2003-06-27 11:39 ` James Carlson
2003-06-27 12:12 ` Paul Mackerras
2003-06-27 13:19 ` James Carlson
2003-06-27 14:59 ` Stephen Hemminger
2003-06-27 15:27 ` James Carlson
2003-06-28 2:21 ` Jamal Hadi
2003-06-28 22:51 ` Frank Cusack
2003-06-26 11:37 ` Michal Ostrowski
2003-06-25 16:01 ` Jason Lunz
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=1056547262.1945.1436.camel@brick.watson.ibm.com \
--to=mostrows@watson.ibm.com \
--cc=carlson@workingcode.com \
--cc=davem@redhat.com \
--cc=dfs@roaringpenguin.com \
--cc=fcusack@samba.org \
--cc=netdev@oss.sgi.com \
--cc=paulus@samba.org \
--cc=rusty@rustcorp.com.au \
/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).