All of lore.kernel.org
 help / color / mirror / Atom feed
From: Willem de Bruijn <willemdebruijn.kernel@gmail.com>
To: Anton Ivanov <anton.ivanov@cambridgegreys.com>
Cc: Network Development <netdev@vger.kernel.org>,
	David Miller <davem@davemloft.net>
Subject: Re: BUG:af_packet fails to TX TSO frames
Date: Thu, 12 Oct 2017 12:30:44 -0400	[thread overview]
Message-ID: <CAF=yD-+W2tyXqCS_ueZgu11BB8ON5hdKGOZQOWtfr+HfvqW=Sg@mail.gmail.com> (raw)
In-Reply-To: <e301fbfd-a283-caa1-5915-8be15677ed74@cambridgegreys.com>

On Thu, Oct 12, 2017 at 11:44 AM, Anton Ivanov
<anton.ivanov@cambridgegreys.com> wrote:
> Found it.
>
> Two bugs canceling each other.
> The bind sequence in:  psock_txring_vnet.c is wrong.
>
> It does the following addr.sll_protocol =    htons(ETH_P_IP);
> before calling bind.
>
> If you set addr.sll_protocol to ETH_P_ALL where it should have been in the
> first place the test program blows up with -ENOBUFS

There is no such requirement that the socket should bind to ETH_P_ALL.

> I think what is happening is that this value is taken into account when
> looking at "what should I use to segment it with" in skb_mac_gso_segment
> which is invoked at the end of the verification chain which starts in
> packet_direct_xmit in af_packet.c

packet_snd sets skb->protocol based on the protocol that the packet
socket is bound to. Binding to ETH_P_IP is the right choice here.

  parent reply	other threads:[~2017-10-12 16:31 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-10-11  8:39 BUG:af_packet fails to TX TSO frames Anton Ivanov
2017-10-11 13:39 ` Willem de Bruijn
2017-10-11 13:50   ` Anton Ivanov
2017-10-11 15:54     ` Anton Ivanov
2017-10-11 16:26       ` Willem de Bruijn
2017-10-11 16:32         ` Anton Ivanov
2017-10-11 18:39         ` Anton Ivanov
2017-10-11 18:57           ` Willem de Bruijn
2017-10-11 19:39             ` Anton Ivanov
2017-10-11 21:02               ` [uml-devel] Fwd: " Anton Ivanov
2017-10-11 21:05               ` Willem de Bruijn
2017-10-11 21:55                 ` Anton Ivanov
2017-10-11 22:01                   ` Anton Ivanov
2017-10-12  0:19                     ` Willem de Bruijn
2017-10-12  6:11                       ` Anton Ivanov
2017-10-12  8:46                         ` Anton Ivanov
2017-10-12 13:39                           ` Willem de Bruijn
2017-10-12 14:12                             ` Anton Ivanov
2017-10-12 15:44                               ` Anton Ivanov
2017-10-12 15:57                                 ` Anton Ivanov
2017-10-12 15:57                                   ` [uml-devel] " Anton Ivanov
2017-10-12 16:30                                 ` Willem de Bruijn [this message]
2017-10-12 17:25                                   ` Willem de Bruijn
2017-10-12 17:58                                     ` Anton Ivanov
2017-10-12 18:41                                       ` Willem de Bruijn
2017-10-12 19:55                                         ` Anton Ivanov
2017-10-13  7:25   ` Not BUG, feature :) af_packet " Anton Ivanov

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='CAF=yD-+W2tyXqCS_ueZgu11BB8ON5hdKGOZQOWtfr+HfvqW=Sg@mail.gmail.com' \
    --to=willemdebruijn.kernel@gmail.com \
    --cc=anton.ivanov@cambridgegreys.com \
    --cc=davem@davemloft.net \
    --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.