public inbox for bpf@vger.kernel.org
 help / color / mirror / Atom feed
From: Jesper Dangaard Brouer <hawk@kernel.org>
To: Sebastian Andrzej Siewior <bigeasy@linutronix.de>,
	netdev@vger.kernel.org, bpf@vger.kernel.org
Cc: "David S. Miller" <davem@davemloft.net>,
	Alexei Starovoitov <ast@kernel.org>,
	Daniel Borkmann <daniel@iogearbox.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>,
	Jesper Dangaard Brouer <hawk@kernel.org>,
	John Fastabend <john.fastabend@gmail.com>,
	Paolo Abeni <pabeni@redhat.com>,
	Thomas Gleixner <tglx@linutronix.de>
Subject: Re: [PATCH net v2 0/3] Add missing xdp_do_flush() invocations.
Date: Wed, 20 Sep 2023 09:04:27 +0200	[thread overview]
Message-ID: <cb2f7931-5ae5-8583-acff-4a186fed6632@kernel.org> (raw)
In-Reply-To: <20230918153611.165722-1-bigeasy@linutronix.de>

Hi Sebastian,


On 18/09/2023 17.36, Sebastian Andrzej Siewior wrote:
> Hi,
> 
> I've been looking at the drivers/ XDP users and noticed that some
> XDP_REDIRECT user don't invoke xdp_do_flush() at the end.

I'm wondering if we could detect (and WARN) in the net core e.g.
net_rx_action() that a driver is missing a flush?

The idea could be to check the per CPU (struct) bpf_redirect_info.
Or check (per CPU) dev_flush_list.

If some is worried about performance implications, then we can hide this
under CONFIG_DEBUG_NET.

> v1…v2: https://lore.kernel.org/all/20230908135748.794163-1-bigeasy@linutronix.de
>    - Collected tags.
>    - Dropped the #4 patch which was touching cpu_map_bpf_prog_run()
>      because it is not needed.
> 

For the fixes in this set:

Acked-by: Jesper Dangaard Brouer <hawk@kernel.org>

Thanks for fixing these! - at it can lead to strange to debug cases.
--Jesper

  parent reply	other threads:[~2023-09-20  7:04 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-18 15:36 [PATCH net v2 0/3] Add missing xdp_do_flush() invocations Sebastian Andrzej Siewior
2023-09-18 15:36 ` [PATCH net v2 1/3] net: ena: Flush XDP packets on error Sebastian Andrzej Siewior
2023-09-18 15:36 ` [PATCH net v2 2/3] bnxt_en: Flush XDP for bnxt_poll_nitroa0()'s NAPI Sebastian Andrzej Siewior
2023-09-18 17:11   ` Michael Chan
2023-09-18 15:36 ` [PATCH net v2 3/3] octeontx2-pf: Do xdp_do_flush() after redirects Sebastian Andrzej Siewior
2023-09-18 17:58   ` Kui-Feng Lee
2023-09-19  6:36     ` Sebastian Andrzej Siewior
2023-09-21  7:01     ` Paolo Abeni
2023-09-20  7:04 ` Jesper Dangaard Brouer [this message]
2023-09-20  7:54   ` [PATCH net v2 0/3] Add missing xdp_do_flush() invocations Sebastian Andrzej Siewior
2023-09-21  7:40 ` patchwork-bot+netdevbpf

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=cb2f7931-5ae5-8583-acff-4a186fed6632@kernel.org \
    --to=hawk@kernel.org \
    --cc=ast@kernel.org \
    --cc=bigeasy@linutronix.de \
    --cc=bpf@vger.kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=john.fastabend@gmail.com \
    --cc=kuba@kernel.org \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=tglx@linutronix.de \
    /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