Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1400900 > unrolled thread
| Started by | Ben Greear <greearb@candelatech.com> |
|---|---|
| First post | 2016-05-13 19:00 +0200 |
| Last post | 2016-05-13 20:30 +0200 |
| Articles | 3 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH 3.2 085/115] veth: don???t modify ip_summed; doing so treats packets with bad checksums as good. Ben Greear <greearb@candelatech.com> - 2016-05-13 19:00 +0200
Re: [PATCH 3.2 085/115] veth: don???t modify ip_summed; doing so treats packets with bad checksums as good. David Miller <davem@davemloft.net> - 2016-05-13 20:30 +0200
Re: [PATCH 3.2 085/115] veth: don???t modify ip_summed; doing so treats packets with bad checksums as good. Ben Greear <greearb@candelatech.com> - 2016-05-13 20:30 +0200
| From | Ben Greear <greearb@candelatech.com> |
|---|---|
| Date | 2016-05-13 19:00 +0200 |
| Subject | Re: [PATCH 3.2 085/115] veth: don???t modify ip_summed; doing so treats packets with bad checksums as good. |
| Message-ID | <ryoBs-7qC-7@gated-at.bofh.it> |
Mr Miller:
How do you feel about a new socket-option to allow a socket to
request the old veth behaviour?
Thanks,
Ben
On 04/30/2016 10:30 PM, Willy Tarreau wrote:
> On Sat, Apr 30, 2016 at 03:43:51PM -0700, Ben Greear wrote:
>> On 04/30/2016 03:01 PM, Vijay Pandurangan wrote:
>>> Consider:
>>>
>>> - App A sends out corrupt packets 50% of the time and discards inbound data.
> (...)
>> How can you make a generic app C know how to do this? The path could be,
>> for instance:
>>
>> eth0 <-> user-space-A <-> vethA <-> vethB <-> { kernel routing logic } <-> vethC <-> vethD <-> appC
>>
>> There are no sockets on vethB, but it does need to have special behaviour to elide
>> csums. Even if appC is hacked to know how to twiddle some thing on it's veth port,
>> mucking with vethD will have no effect on vethB.
>>
>> With regard to your example above, why would A corrupt packets? My guess:
>>
>> 1) It has bugs (so, fix the bugs, it could equally create incorrect data with proper checksums,
>> so just enabling checksumming adds no useful protection.)
>
> I agree with Ben here, what he needs is the ability for userspace to be
> trusted when *forwarding* a packet. Ideally you'd only want to receive
> the csum status per packet on the packet socket and pass the same value
> on the vethA interface, with this status being kept when the packet
> reaches vethB.
>
> If A purposely corrupts packet, it's A's problem. It's similar to designing
> a NIC which intentionally corrupts packets and reports "checksum good".
>
> The real issue is that in order to do things right, the userspace bridge
> (here, "A") would really need to pass this status. In Ben's case as he
> says, bad checksum packets are dropped before reaching A, so that
> simplifies the process quite a bit and that might be what causes some
> confusion, but ideally we'd rather have recvmsg() and sendmsg() with
> these flags.
>
> I faced the exact same issue 3 years ago when playing with netmap, it was
> slow as hell because it would lose all checksum information when packets
> were passing through userland, resulting in GRO/GSO etc being disabled,
> and had to modify it to let userland preserve it. That's especially
> important when you have to deal with possibly corrupted packets not yet
> detected in the chain because the NIC did not validate their checksums.
>
> Willy
>
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
[toc] | [next] | [standalone]
| From | David Miller <davem@davemloft.net> |
|---|---|
| Date | 2016-05-13 20:30 +0200 |
| Message-ID | <ryq0y-Ax-11@gated-at.bofh.it> |
| In reply to | #1400900 |
From: Ben Greear <greearb@candelatech.com> Date: Fri, 13 May 2016 09:57:19 -0700 > How do you feel about a new socket-option to allow a socket to > request the old veth behaviour? I depend upon the opinions of the experts who work upstream on and maintain these components, since it is an area I am not so familiar with. Generally speaking asking me directly for opinions on matters like this isn't the way to go, in fact I kind of find it irritating. It can't all be on me.
[toc] | [prev] | [next] | [standalone]
| From | Ben Greear <greearb@candelatech.com> |
|---|---|
| Date | 2016-05-13 20:30 +0200 |
| Message-ID | <ryq0y-Ax-13@gated-at.bofh.it> |
| In reply to | #1400930 |
On 05/13/2016 11:21 AM, David Miller wrote: > From: Ben Greear <greearb@candelatech.com> > Date: Fri, 13 May 2016 09:57:19 -0700 > >> How do you feel about a new socket-option to allow a socket to >> request the old veth behaviour? > > I depend upon the opinions of the experts who work upstream on and > maintain these components, since it is an area I am not so familiar > with. > > Generally speaking asking me directly for opinions on matters like > this isn't the way to go, in fact I kind of find it irritating. It > can't all be on me. > Fair enough, thanks for your time. Ben -- Ben Greear <greearb@candelatech.com> Candela Technologies Inc http://www.candelatech.com
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web