From: Ido Schimmel <idosch@idosch.org>
To: Xin Long <lucien.xin@gmail.com>
Cc: Stephen Hemminger <stephen@networkplumber.org>,
edumazet@google.com, netdev@vger.kernel.org, fmei@sfs.com,
Wei Wang <weiwan@google.com>
Subject: Re: Fw: [Bug 219766] New: Garbage Ethernet Frames
Date: Tue, 18 Feb 2025 17:21:38 +0200 [thread overview]
Message-ID: <Z7SlggSKBDk2wDj-@shredder> (raw)
In-Reply-To: <CADvbK_eZp5ikahxH4wvPm5_PuK1khvVKpGnY5LUd9nwHgS96Cw@mail.gmail.com>
On Mon, Feb 17, 2025 at 05:31:16PM -0500, Xin Long wrote:
> On Sat, Feb 15, 2025 at 3:47 PM Ido Schimmel <idosch@idosch.org> wrote:
> > Another possible solution is to have the blackhole device consume the
> > packets instead of letting them go out without an Ethernet header [4].
> > Doesn't seem great as the packets disappear without telling anyone
> > (before 22600596b675 an error was returned).
> This looks fine to me. The fix in commit 22600596b675 was specifically
> intended to prevent an error from being returned in these cases, as it
> would break userspace UDP applications.
Yes, I later realized that this is fine as well. Packets are already
discarded today via dst_discard_out() if dst_dev_put() was called on a
dst entry before calling dst_output():
# bpftrace -e 'k:dst_discard_out { @[kstack()] = count(); }'
Attaching 1 probe...
^C
@[
dst_discard_out+5
ip_send_skb+25
udp_send_skb+376
udp_sendmsg+2516
sock_write_iter+365
vfs_write+937
ksys_write+200
do_syscall_64+158
entry_SYSCALL_64_after_hwframe+119
]: 2034
While running the reproducer I shared earlier.
> If you prefer to avoid silent drops, you could add a warning like:
>
> net_warn_ratelimited("%s(): Dropping skb.\n", __func__);
>
> similar to how blackhole_netdev_xmit() handles it.
I would like to avoid spamming the kernel log with these messages. I
checked and we see these messages on a few machines while running the
IPv6 torture tests in fib_nexthops.sh. Maybe in net-next I will add a
new drop reason for these scenarios.
> Thanks.
Thanks. I will run this patch through regression and post later this
week if everything is fine.
prev parent reply other threads:[~2025-02-18 15:21 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-02-10 16:49 Fw: [Bug 219766] New: Garbage Ethernet Frames Stephen Hemminger
2025-02-15 20:47 ` Ido Schimmel
2025-02-17 22:31 ` Xin Long
2025-02-18 15:21 ` Ido Schimmel [this message]
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=Z7SlggSKBDk2wDj-@shredder \
--to=idosch@idosch.org \
--cc=edumazet@google.com \
--cc=fmei@sfs.com \
--cc=lucien.xin@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=stephen@networkplumber.org \
--cc=weiwan@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).