All of lore.kernel.org
 help / color / mirror / Atom feed
From: Eric Dumazet <eric.dumazet@gmail.com>
To: Daniel Borkmann <daniel@iogearbox.net>
Cc: edumazet@google.com, davem@davemloft.net, willemb@google.com,
	tklauser@distanz.ch, netdev@vger.kernel.org,
	Jason Wang <jasowang@redhat.com>
Subject: Re: [PATCH net 1/2] packet: do skb_probe_transport_header when we actually have data
Date: Sat, 07 Nov 2015 04:42:56 -0800	[thread overview]
Message-ID: <1446900176.17135.4.camel@edumazet-glaptop2.roam.corp.google.com> (raw)
In-Reply-To: <5cdcd969eec9228a18c0dc54f9cc4b7b6b07ce05.1446842228.git.daniel@iogearbox.net>


On Fri, 2015-11-06 at 22:02 +0100, Daniel Borkmann wrote:
> In tpacket_fill_skb() commit c1aad275b029 ("packet: set transport
> header before doing xmit") and later on 40893fd0fd4e ("net: switch
> to use skb_probe_transport_header()") was probing for a transport
> header on the skb from a ring buffer slot, but at a time, where
> the skb has _not even_ been filled with data yet. So that call into
> the flow dissector is pretty useless. Lets do it after we've set
> up the skb frags.
> 
> Fixes: c1aad275b029 ("packet: set transport header before doing xmit")
> Reported-by: Eric Dumazet <edumazet@google.com>
> Cc: Jason Wang <jasowang@redhat.com>


> +	if (!packet_use_direct_xmit(po))
> +		skb_probe_transport_header(skb, 0);
> +

Thanks Daniel for working on this.

The if (!packet_use_direct_xmit(po)) test looks dubious.

Setting transport header has nothing to do with bypassing qdisc ?

This might lead to hard to debug problems, for drivers expecting
transport header being set ?

Maybe this needs a special socket flag, but this does not seem worth the pain.

(This would be different of course if trafgen was not defaulting to qdisc bypass)

Thanks.

  reply	other threads:[~2015-11-07 12:43 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-11-06 21:02 [PATCH net 0/2] packet fix Daniel Borkmann
2015-11-06 21:02 ` [PATCH net 1/2] packet: do skb_probe_transport_header when we actually have data Daniel Borkmann
2015-11-07 12:42   ` Eric Dumazet [this message]
2015-11-07 18:35     ` David Miller
2015-11-07 18:53       ` Eric Dumazet
2015-11-07 19:06         ` Eric Dumazet
2015-11-08  0:33           ` Daniel Borkmann
2015-11-09  3:11             ` David Miller
2015-11-09  8:43               ` Daniel Borkmann
2015-11-07 22:29         ` David Miller
2015-11-09 11:31           ` Daniel Borkmann
2015-11-06 21:02 ` [PATCH net 2/2] packet: fix tpacket_snd max frame and vlan handling Daniel Borkmann

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=1446900176.17135.4.camel@edumazet-glaptop2.roam.corp.google.com \
    --to=eric.dumazet@gmail.com \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=jasowang@redhat.com \
    --cc=netdev@vger.kernel.org \
    --cc=tklauser@distanz.ch \
    --cc=willemb@google.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.