netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Toke Høiland-Jørgensen" <toke@redhat.com>
To: Maciej Fijalkowski <maciej.fijalkowski@intel.com>,
	intel-wired-lan@lists.osuosl.org
Cc: netdev@vger.kernel.org, anthony.l.nguyen@intel.com,
	magnus.karlsson@intel.com, fred@cloudflare.com,
	aleksander.lobakin@intel.com,
	Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Subject: Re: [PATCH v3 iwl-next] ice: allow hot-swapping XDP programs
Date: Thu, 15 Jun 2023 14:29:54 +0200	[thread overview]
Message-ID: <87v8fogb7h.fsf@toke.dk> (raw)
In-Reply-To: <20230615113326.347770-1-maciej.fijalkowski@intel.com>

Maciej Fijalkowski <maciej.fijalkowski@intel.com> writes:

> Currently ice driver's .ndo_bpf callback brings interface down and up
> independently of XDP resources' presence. This is only needed when
> either these resources have to be configured or removed. It means that
> if one is switching XDP programs on-the-fly with running traffic,
> packets will be dropped.
>
> To avoid this, compare early on ice_xdp_setup_prog() state of incoming
> bpf_prog pointer vs the bpf_prog pointer that is already assigned to
> VSI. Do the swap in case VSI has bpf_prog and incoming one are non-NULL.
>
> Lastly, while at it, put old bpf_prog *after* the update of Rx ring's
> bpf_prog pointer. In theory previous code could expose us to a state
> where Rx ring's bpf_prog would still be referring to old_prog that got
> released with earlier bpf_prog_put().
>
> Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>

Acked-by: Toke Høiland-Jørgensen <toke@redhat.com>


  reply	other threads:[~2023-06-15 12:38 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-06-15 11:33 [PATCH v3 iwl-next] ice: allow hot-swapping XDP programs Maciej Fijalkowski
2023-06-15 12:29 ` Toke Høiland-Jørgensen [this message]
2023-06-16 14:05 ` Alexander Lobakin
2023-06-21 12:16 ` [Intel-wired-lan] " Rout, ChandanX

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=87v8fogb7h.fsf@toke.dk \
    --to=toke@redhat.com \
    --cc=aleksander.lobakin@intel.com \
    --cc=anthony.l.nguyen@intel.com \
    --cc=fred@cloudflare.com \
    --cc=intel-wired-lan@lists.osuosl.org \
    --cc=maciej.fijalkowski@intel.com \
    --cc=magnus.karlsson@intel.com \
    --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 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).