From: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
To: "Nelson, Shannon" <shannon.nelson@amd.com>
Cc: <intel-wired-lan@lists.osuosl.org>, <netdev@vger.kernel.org>,
<anthony.l.nguyen@intel.com>, <magnus.karlsson@intel.com>,
<michal.kubiak@intel.com>, <larysa.zaremba@intel.com>
Subject: Re: [PATCH v2 iwl-net 3/8] ice: replace synchronize_rcu with synchronize_net
Date: Tue, 4 Jun 2024 12:49:54 +0200 [thread overview]
Message-ID: <Zl7xUpALEMcNBMOb@boxer> (raw)
In-Reply-To: <8c933691-a31b-42ba-b1ed-9bbd20491963@amd.com>
On Fri, May 31, 2024 at 04:49:01PM -0700, Nelson, Shannon wrote:
> On 5/29/2024 4:23 AM, Maciej Fijalkowski wrote:
> >
> > Given that ice_qp_dis() is called under rtnl_lock, synchronize_net() can
> > be called instead of synchronize_rcu() so that XDP rings can finish its
> > job in a faster way. Also let us do this as earlier in XSK queue disable
> > flow.
> >
> > Additionally, turn off regular Tx queue before disabling irqs and NAPI.
> >
> > Fixes: 2d4238f55697 ("ice: Add support for AF_XDP")
> > Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
> > ---
> > drivers/net/ethernet/intel/ice/ice_xsk.c | 6 +++---
> > 1 file changed, 3 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/net/ethernet/intel/ice/ice_xsk.c b/drivers/net/ethernet/intel/ice/ice_xsk.c
> > index 4f606a1055b0..e93cb0ca4106 100644
> > --- a/drivers/net/ethernet/intel/ice/ice_xsk.c
> > +++ b/drivers/net/ethernet/intel/ice/ice_xsk.c
> > @@ -53,7 +53,6 @@ static void ice_qp_clean_rings(struct ice_vsi *vsi, u16 q_idx)
> > {
> > ice_clean_tx_ring(vsi->tx_rings[q_idx]);
> > if (ice_is_xdp_ena_vsi(vsi)) {
> > - synchronize_rcu();
> > ice_clean_tx_ring(vsi->xdp_rings[q_idx]);
> > }
>
> With only one statement left in the block you'll probably want to remove the
> {}'s
Thanks for catching this. To explain myself here, I was getting rid of a
patch which removes the XDP prog presence check altogether because it is a
false positive - we can't get into these queue pair disabling/enabling
functions if there is no XDP prog on interface. And the reason why I was
tossing this out of patch set was that it was not -net candidate.
Thanks again and will fix on v3.
>
> sln
>
>
> > ice_clean_rx_ring(vsi->rx_rings[q_idx]);
> > @@ -180,11 +179,12 @@ static int ice_qp_dis(struct ice_vsi *vsi, u16 q_idx)
> > usleep_range(1000, 2000);
> > }
> >
> > + synchronize_net();
> > + netif_tx_stop_queue(netdev_get_tx_queue(vsi->netdev, q_idx));
> > +
> > ice_qvec_dis_irq(vsi, rx_ring, q_vector);
> > ice_qvec_toggle_napi(vsi, q_vector, false);
> >
> > - netif_tx_stop_queue(netdev_get_tx_queue(vsi->netdev, q_idx));
> > -
> > ice_fill_txq_meta(vsi, tx_ring, &txq_meta);
> > err = ice_vsi_stop_tx_ring(vsi, ICE_NO_RESET, 0, tx_ring, &txq_meta);
> > if (err)
> > --
> > 2.34.1
> >
> >
>
next prev parent reply other threads:[~2024-06-04 10:50 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-05-29 11:23 [PATCH v2 iwl-net 0/8] ice: fix AF_XDP ZC timeout and concurrency issues Maciej Fijalkowski
2024-05-29 11:23 ` [PATCH v2 iwl-net 1/8] ice: respect netif readiness in AF_XDP ZC related ndo's Maciej Fijalkowski
2024-06-04 6:47 ` [Intel-wired-lan] " Rout, ChandanX
2024-05-29 11:23 ` [PATCH v2 iwl-net 2/8] ice: don't busy wait for Rx queue disable in ice_qp_dis() Maciej Fijalkowski
2024-06-04 6:53 ` [Intel-wired-lan] " Rout, ChandanX
2024-05-29 11:23 ` [PATCH v2 iwl-net 3/8] ice: replace synchronize_rcu with synchronize_net Maciej Fijalkowski
2024-05-31 23:49 ` Nelson, Shannon
2024-06-04 10:49 ` Maciej Fijalkowski [this message]
2024-06-04 6:49 ` [Intel-wired-lan] " Rout, ChandanX
2024-05-29 11:23 ` [PATCH v2 iwl-net 4/8] ice: modify error handling when setting XSK pool in ndo_bpf Maciej Fijalkowski
2024-06-04 6:54 ` [Intel-wired-lan] " Rout, ChandanX
2024-05-29 11:23 ` [PATCH v2 iwl-net 5/8] ice: toggle netif_carrier when setting up XSK pool Maciej Fijalkowski
2024-06-04 6:45 ` [Intel-wired-lan] " Rout, ChandanX
2024-05-29 11:23 ` [PATCH v2 iwl-net 6/8] ice: improve updating ice_{t,r}x_ring::xsk_pool Maciej Fijalkowski
2024-05-31 23:49 ` Nelson, Shannon
2024-06-04 10:52 ` Maciej Fijalkowski
2024-06-04 11:12 ` Maciej Fijalkowski
2024-06-04 6:50 ` [Intel-wired-lan] [PATCH v2 iwl-net 6/8] ice: improve updating ice_{t, r}x_ring::xsk_pool Rout, ChandanX
2024-05-29 11:23 ` [PATCH v2 iwl-net 7/8] ice: add missing WRITE_ONCE when clearing ice_rx_ring::xdp_prog Maciej Fijalkowski
2024-06-04 6:52 ` [Intel-wired-lan] " Rout, ChandanX
2024-05-29 11:23 ` [PATCH v2 iwl-net 8/8] ice: xsk: fix txq interrupt mapping Maciej Fijalkowski
2024-06-04 6:46 ` [Intel-wired-lan] " Rout, ChandanX
2024-05-31 23:52 ` [PATCH v2 iwl-net 0/8] ice: fix AF_XDP ZC timeout and concurrency issues Nelson, Shannon
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=Zl7xUpALEMcNBMOb@boxer \
--to=maciej.fijalkowski@intel.com \
--cc=anthony.l.nguyen@intel.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=larysa.zaremba@intel.com \
--cc=magnus.karlsson@intel.com \
--cc=michal.kubiak@intel.com \
--cc=netdev@vger.kernel.org \
--cc=shannon.nelson@amd.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).