Message ID | 20240528131429.3012910-9-maciej.fijalkowski@intel.com (mailing list archive) |
---|---|
State | Superseded |
Delegated to: | Netdev Maintainers |
Headers | show |
Series | ice: fix AF_XDP ZC timeout and concurrency issues | expand |
Context | Check | Description |
---|---|---|
netdev/tree_selection | success | Clearly marked for net |
netdev/apply | fail | Patch does not apply to net-0 |
Hi Maciej,
kernel test robot noticed the following build warnings:
[auto build test WARNING on tnguy-net-queue/dev-queue]
url: https://github.com/intel-lab-lkp/linux/commits/Maciej-Fijalkowski/ice-respect-netif-readiness-in-AF_XDP-ZC-related-ndo-s/20240528-211914
base: https://git.kernel.org/pub/scm/linux/kernel/git/tnguy/net-queue.git dev-queue
patch link: https://lore.kernel.org/r/20240528131429.3012910-9-maciej.fijalkowski%40intel.com
patch subject: [Intel-wired-lan] [PATCH iwl-net 08/11] ice: xsk: fix txq interrupt mapping
config: alpha-allyesconfig (https://download.01.org/0day-ci/archive/20240529/202405290301.TKfQE09f-lkp@intel.com/config)
compiler: alpha-linux-gcc (GCC) 13.2.0
reproduce (this is a W=1 build): (https://download.01.org/0day-ci/archive/20240529/202405290301.TKfQE09f-lkp@intel.com/reproduce)
If you fix the issue in a separate patch/commit (i.e. not just a new version of
the same patch/commit), kindly add following tags
| Reported-by: kernel test robot <lkp@intel.com>
| Closes: https://lore.kernel.org/oe-kbuild-all/202405290301.TKfQE09f-lkp@intel.com/
All warnings (new ones prefixed by >>):
>> drivers/net/ethernet/intel/ice/ice_xsk.c:117: warning: Function parameter or struct member 'qid' not described in 'ice_qvec_cfg_msix'
drivers/net/ethernet/intel/ice/ice_xsk.c:479: warning: Function parameter or struct member 'xsk_pool' not described in '__ice_alloc_rx_bufs_zc'
drivers/net/ethernet/intel/ice/ice_xsk.c:528: warning: Function parameter or struct member 'xsk_pool' not described in 'ice_alloc_rx_bufs_zc'
drivers/net/ethernet/intel/ice/ice_xsk.c:983: warning: Function parameter or struct member 'xsk_pool' not described in 'ice_xmit_pkt'
drivers/net/ethernet/intel/ice/ice_xsk.c:1008: warning: Function parameter or struct member 'xsk_pool' not described in 'ice_xmit_pkt_batch'
drivers/net/ethernet/intel/ice/ice_xsk.c:1041: warning: Function parameter or struct member 'xsk_pool' not described in 'ice_fill_tx_hw_ring'
vim +117 drivers/net/ethernet/intel/ice/ice_xsk.c
2d4238f55697221 Krzysztof Kazimierczak 2019-11-04 109
2d4238f55697221 Krzysztof Kazimierczak 2019-11-04 110 /**
2d4238f55697221 Krzysztof Kazimierczak 2019-11-04 111 * ice_qvec_cfg_msix - Enable IRQ for given queue vector
2d4238f55697221 Krzysztof Kazimierczak 2019-11-04 112 * @vsi: the VSI that contains queue vector
2d4238f55697221 Krzysztof Kazimierczak 2019-11-04 113 * @q_vector: queue vector
2d4238f55697221 Krzysztof Kazimierczak 2019-11-04 114 */
2d4238f55697221 Krzysztof Kazimierczak 2019-11-04 115 static void
d77176d15a1b0ed Maciej Fijalkowski 2024-05-28 116 ice_qvec_cfg_msix(struct ice_vsi *vsi, struct ice_q_vector *q_vector, u16 qid)
2d4238f55697221 Krzysztof Kazimierczak 2019-11-04 @117 {
2d4238f55697221 Krzysztof Kazimierczak 2019-11-04 118 u16 reg_idx = q_vector->reg_idx;
2d4238f55697221 Krzysztof Kazimierczak 2019-11-04 119 struct ice_pf *pf = vsi->back;
2d4238f55697221 Krzysztof Kazimierczak 2019-11-04 120 struct ice_hw *hw = &pf->hw;
d77176d15a1b0ed Maciej Fijalkowski 2024-05-28 121 int q, _qid = qid;
2d4238f55697221 Krzysztof Kazimierczak 2019-11-04 122
2d4238f55697221 Krzysztof Kazimierczak 2019-11-04 123 ice_cfg_itr(hw, q_vector);
2d4238f55697221 Krzysztof Kazimierczak 2019-11-04 124
d77176d15a1b0ed Maciej Fijalkowski 2024-05-28 125 for (q = 0; q < q_vector->num_ring_tx; q++) {
d77176d15a1b0ed Maciej Fijalkowski 2024-05-28 126 ice_cfg_txq_interrupt(vsi, _qid, reg_idx, q_vector->tx.itr_idx);
d77176d15a1b0ed Maciej Fijalkowski 2024-05-28 127 _qid++;
d77176d15a1b0ed Maciej Fijalkowski 2024-05-28 128 }
2d4238f55697221 Krzysztof Kazimierczak 2019-11-04 129
d77176d15a1b0ed Maciej Fijalkowski 2024-05-28 130 _qid = qid;
d77176d15a1b0ed Maciej Fijalkowski 2024-05-28 131
d77176d15a1b0ed Maciej Fijalkowski 2024-05-28 132 for (q = 0; q < q_vector->num_ring_rx; q++) {
d77176d15a1b0ed Maciej Fijalkowski 2024-05-28 133 ice_cfg_rxq_interrupt(vsi, _qid, reg_idx, q_vector->rx.itr_idx);
d77176d15a1b0ed Maciej Fijalkowski 2024-05-28 134 _qid++;
d77176d15a1b0ed Maciej Fijalkowski 2024-05-28 135 }
2d4238f55697221 Krzysztof Kazimierczak 2019-11-04 136
2d4238f55697221 Krzysztof Kazimierczak 2019-11-04 137 ice_flush(hw);
2d4238f55697221 Krzysztof Kazimierczak 2019-11-04 138 }
2d4238f55697221 Krzysztof Kazimierczak 2019-11-04 139
diff --git a/drivers/net/ethernet/intel/ice/ice_xsk.c b/drivers/net/ethernet/intel/ice/ice_xsk.c index e554cf424fb3..3135fc0aaf73 100644 --- a/drivers/net/ethernet/intel/ice/ice_xsk.c +++ b/drivers/net/ethernet/intel/ice/ice_xsk.c @@ -113,23 +113,26 @@ ice_qvec_dis_irq(struct ice_vsi *vsi, struct ice_rx_ring *rx_ring, * @q_vector: queue vector */ 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 +244,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)
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") Signed-off-by: Maciej Fijalkowski <maciej.fijalkowski@intel.com> --- drivers/net/ethernet/intel/ice/ice_xsk.c | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-)