netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Michael Chan <michael.chan@broadcom.com>
To: "Mahesh Bandewar (महेश बंडेवार)" <maheshb@google.com>
Cc: Daniel Axtens <dja@axtens.net>, Netdev <netdev@vger.kernel.org>,
	David Miller <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Willem de Bruijn <willemb@google.com>
Subject: Re: Stack sends oversize UDP packet to the driver
Date: Tue, 12 Feb 2019 00:55:46 -0800	[thread overview]
Message-ID: <CACKFLimqrQHcFtoK6Mpz=gdJFwqTVBY4uZGW-1-LsRcd4STKzw@mail.gmail.com> (raw)
In-Reply-To: <CAF2d9jjwuT1WSz7P9QFbjdpp8GhhV-XBLzVC8H94Le_JCxL0fg@mail.gmail.com>

On Fri, Feb 8, 2019 at 12:26 PM Mahesh Bandewar (महेश बंडेवार)
<maheshb@google.com> wrote:
>
> On Wed, Feb 6, 2019 at 8:51 PM Mahesh Bandewar (महेश बंडेवार)
> <maheshb@google.com> wrote:
> >
> > On Tue, Feb 5, 2019 at 11:36 AM Michael Chan <michael.chan@broadcom.com> wrote:
> > > I've looked at this a little more.  The blackhole_dev is not IFF_UP |
> > > IFF_RUNNING, right?  May be that's why the packets are never getting
> > > to the xmit function?
> > Yes, so I added those two flags and ended up writing a test-module for
> > the device (which I will include while posting the patch-series).
> > However, adding those flags is also not sufficient since the qdisc is
> > initialized to noop_qdisc so qdisc enqueue will drop packets before
> > hitting the ndo_start_xmit().
>
> I have another version of the fix (with help from Eric) and this
> should hit the .ndo_start_xmit() of the blackhole_dev. I'm adding
> these flags during the setup and then calling dev_activate() to change
> noop qdisc to null qdisc. Please give this patch set a try and let me
> know if the blackhole_dev xmit path gets exercised in your test
> scenario.

The new version still works in the sense that no oversize packets are
seen in the NIC driver's xmit function.  But I still don't see any
packets hitting the blackhole's xmit function.  I'm not 100% sure but
I think the blackhole dev has no IP address and so the UDP packets are
dropped in ip_finish_output2() because there is no neigh.  Something
like that.

  reply	other threads:[~2019-02-12  8:56 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-20 22:26 Stack sends oversize UDP packet to the driver Michael Chan
2019-01-22  0:36 ` Daniel Axtens
2019-01-22  0:59   ` Michael Chan
2019-01-22 18:28     ` Mahesh Bandewar (महेश बंडेवार)
2019-01-22 20:09       ` David Miller
2019-01-30  9:07       ` Michael Chan
2019-01-31  1:00         ` Mahesh Bandewar (महेश बंडेवार)
2019-02-05 19:35           ` Michael Chan
2019-02-07  4:51             ` Mahesh Bandewar (महेश बंडेवार)
2019-02-08 20:26               ` Mahesh Bandewar (महेश बंडेवार)
2019-02-12  8:55                 ` Michael Chan [this message]
     [not found] ` <CAF2d9jgskHTb-nmbVo9A2CQhh9T3OnH_vbfGcMBii13oq1teCw@mail.gmail.com>
2019-01-22  0:45   ` Michael Chan

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='CACKFLimqrQHcFtoK6Mpz=gdJFwqTVBY4uZGW-1-LsRcd4STKzw@mail.gmail.com' \
    --to=michael.chan@broadcom.com \
    --cc=davem@davemloft.net \
    --cc=dja@axtens.net \
    --cc=edumazet@google.com \
    --cc=maheshb@google.com \
    --cc=netdev@vger.kernel.org \
    --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 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).