* Re: [PATCH net 8/8] ice: xsk: fix txq interrupt mapping
@ 2024-07-10 5:52 Ratheesh Kannoth
0 siblings, 0 replies; 2+ messages in thread
From: Ratheesh Kannoth @ 2024-07-10 5:52 UTC (permalink / raw)
To: Tony Nguyen
Cc: davem, kuba, pabeni, edumazet, netdev, Maciej Fijalkowski,
magnus.karlsson, aleksander.lobakin, ast, daniel, hawk,
john.fastabend, bpf, Shannon Nelson, Chandan Kumar Rout
On 2024-07-09 at 03:44:14, Tony Nguyen (anthony.l.nguyen@intel.com) wrote:
> From: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
>
> {
> u16 reg_idx = q_vector->reg_idx;
> struct ice_pf *pf = vsi->back;
> struct ice_hw *hw = &pf->hw;
> - struct ice_tx_ring *tx_ring;
> - struct ice_rx_ring *rx_ring;
> + int q, _qid = qid;
>
> ice_cfg_itr(hw, q_vector);
>
> - ice_for_each_tx_ring(tx_ring, q_vector->tx)
> - ice_cfg_txq_interrupt(vsi, tx_ring->reg_idx, reg_idx,
> - q_vector->tx.itr_idx);
> + for (q = 0; q < q_vector->num_ring_tx; q++) {
> + ice_cfg_txq_interrupt(vsi, _qid, reg_idx, q_vector->tx.itr_idx);
> + _qid++;
> + }
nit: why we need a new variable just for "for" loop ? qid + q wont suffice ?
>
^ permalink raw reply [flat|nested] 2+ messages in thread* [PATCH net 0/8][pull request] ice: fix AF_XDP ZC timeout and concurrency issues
@ 2024-07-08 22:14 Tony Nguyen
2024-07-08 22:14 ` [PATCH net 8/8] ice: xsk: fix txq interrupt mapping Tony Nguyen
0 siblings, 1 reply; 2+ messages in thread
From: Tony Nguyen @ 2024-07-08 22:14 UTC (permalink / raw)
To: davem, kuba, pabeni, edumazet, netdev
Cc: Tony Nguyen, shannon.nelson, maciej.fijalkowski, magnus.karlsson,
aleksander.lobakin, ast, daniel, hawk, john.fastabend, bpf
Maciej Fijalkowski says:
Changes included in this patchset address an issue that customer has
been facing when AF_XDP ZC Tx sockets were used in combination with flow
control and regular Tx traffic.
After executing:
ethtool --set-priv-flags $dev link-down-on-close on
ethtool -A $dev rx on tx on
launching multiple ZC Tx sockets on $dev + pinging remote interface (so
that regular Tx traffic is present) and then going through down/up of
$dev, Tx timeout occured and then most of the time ice driver was unable
to recover from that state.
These patches combined together solve the described above issue on
customer side. Main focus here is to forbid producing Tx descriptors
when either carrier is not yet initialized or process of bringing
interface down has already started.
---
Olek,
we decided not to check IFF_UP as you initially suggested. Reason is
that when link goes down netif_running() has broader scope than IFF_UP
being set as the former (the __LINK_STATE_START bit) is cleared earlier
in the core.
The following are changes since commit 83c36e7cfd74e41a5c145640dba581b38f12aa15:
docs: networking: devlink: capitalise length value
and are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue 100GbE
Maciej Fijalkowski (7):
ice: don't busy wait for Rx queue disable in ice_qp_dis()
ice: replace synchronize_rcu with synchronize_net
ice: modify error handling when setting XSK pool in ndo_bpf
ice: toggle netif_carrier when setting up XSK pool
ice: improve updating ice_{t, r}x_ring::xsk_pool
ice: add missing WRITE_ONCE when clearing ice_rx_ring::xdp_prog
ice: xsk: fix txq interrupt mapping
Michal Kubiak (1):
ice: respect netif readiness in AF_XDP ZC related ndo's
drivers/net/ethernet/intel/ice/ice.h | 11 +-
drivers/net/ethernet/intel/ice/ice_base.c | 4 +-
drivers/net/ethernet/intel/ice/ice_main.c | 2 +-
drivers/net/ethernet/intel/ice/ice_txrx.c | 6 +-
drivers/net/ethernet/intel/ice/ice_xsk.c | 159 +++++++++++++---------
drivers/net/ethernet/intel/ice/ice_xsk.h | 4 +-
6 files changed, 109 insertions(+), 77 deletions(-)
--
2.41.0
^ permalink raw reply [flat|nested] 2+ messages in thread* [PATCH net 8/8] ice: xsk: fix txq interrupt mapping
2024-07-08 22:14 [PATCH net 0/8][pull request] ice: fix AF_XDP ZC timeout and concurrency issues Tony Nguyen
@ 2024-07-08 22:14 ` Tony Nguyen
0 siblings, 0 replies; 2+ messages in thread
From: Tony Nguyen @ 2024-07-08 22:14 UTC (permalink / raw)
To: davem, kuba, pabeni, edumazet, netdev
Cc: Maciej Fijalkowski, anthony.l.nguyen, magnus.karlsson,
aleksander.lobakin, ast, daniel, hawk, john.fastabend, bpf,
Shannon Nelson, Chandan Kumar Rout
From: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
ice_cfg_txq_interrupt() internally handles XDP Tx ring. Do not use
ice_for_each_tx_ring() in ice_qvec_cfg_msix() as this causing us to
treat XDP ring that belongs to queue vector as Tx ring and therefore
misconfiguring the interrupts.
Fixes: 2d4238f55697 ("ice: Add support for AF_XDP")
Reviewed-by: Shannon Nelson <shannon.nelson@amd.com>
Tested-by: Chandan Kumar Rout <chandanx.rout@intel.com> (A Contingent Worker at Intel)
Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com>
Signed-off-by: Tony Nguyen <anthony.l.nguyen@intel.com>
---
drivers/net/ethernet/intel/ice/ice_xsk.c | 24 ++++++++++++++----------
1 file changed, 14 insertions(+), 10 deletions(-)
diff --git a/drivers/net/ethernet/intel/ice/ice_xsk.c b/drivers/net/ethernet/intel/ice/ice_xsk.c
index b4058c4937bc..492a9e54d58b 100644
--- a/drivers/net/ethernet/intel/ice/ice_xsk.c
+++ b/drivers/net/ethernet/intel/ice/ice_xsk.c
@@ -110,25 +110,29 @@ ice_qvec_dis_irq(struct ice_vsi *vsi, struct ice_rx_ring *rx_ring,
* ice_qvec_cfg_msix - Enable IRQ for given queue vector
* @vsi: the VSI that contains queue vector
* @q_vector: queue vector
+ * @qid: queue index
*/
static void
-ice_qvec_cfg_msix(struct ice_vsi *vsi, struct ice_q_vector *q_vector)
+ice_qvec_cfg_msix(struct ice_vsi *vsi, struct ice_q_vector *q_vector, u16 qid)
{
u16 reg_idx = q_vector->reg_idx;
struct ice_pf *pf = vsi->back;
struct ice_hw *hw = &pf->hw;
- struct ice_tx_ring *tx_ring;
- struct ice_rx_ring *rx_ring;
+ int q, _qid = qid;
ice_cfg_itr(hw, q_vector);
- ice_for_each_tx_ring(tx_ring, q_vector->tx)
- ice_cfg_txq_interrupt(vsi, tx_ring->reg_idx, reg_idx,
- q_vector->tx.itr_idx);
+ for (q = 0; q < q_vector->num_ring_tx; q++) {
+ ice_cfg_txq_interrupt(vsi, _qid, reg_idx, q_vector->tx.itr_idx);
+ _qid++;
+ }
- ice_for_each_rx_ring(rx_ring, q_vector->rx)
- ice_cfg_rxq_interrupt(vsi, rx_ring->reg_idx, reg_idx,
- q_vector->rx.itr_idx);
+ _qid = qid;
+
+ for (q = 0; q < q_vector->num_ring_rx; q++) {
+ ice_cfg_rxq_interrupt(vsi, _qid, reg_idx, q_vector->rx.itr_idx);
+ _qid++;
+ }
ice_flush(hw);
}
@@ -241,7 +245,7 @@ static int ice_qp_ena(struct ice_vsi *vsi, u16 q_idx)
fail = err;
q_vector = vsi->rx_rings[q_idx]->q_vector;
- ice_qvec_cfg_msix(vsi, q_vector);
+ ice_qvec_cfg_msix(vsi, q_vector, q_idx);
err = ice_vsi_ctrl_one_rx_ring(vsi, true, q_idx, true);
if (!fail)
--
2.41.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-07-10 5:52 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-10 5:52 [PATCH net 8/8] ice: xsk: fix txq interrupt mapping Ratheesh Kannoth
-- strict thread matches above, loose matches on Subject: below --
2024-07-08 22:14 [PATCH net 0/8][pull request] ice: fix AF_XDP ZC timeout and concurrency issues Tony Nguyen
2024-07-08 22:14 ` [PATCH net 8/8] ice: xsk: fix txq interrupt mapping Tony Nguyen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox