Intel Wired LAN Driver Updates 2024-03-06 (iavf, i40e, ixgbe)
Subsystems (3)
Tony Nguyen
maintainerThis series contains updates to iavf, i40e, and ixgbe drivers.
Alexey Kodanev removes duplicate calls related to cloud filters on iavf and unnecessary null checks on i40e.
Maciej adds helper functions for common code relating to updating statistics for ixgbe.
The following are changes since commit eeb78df4063c0b162324a9408ef573b24791871f:
inet: Add getsockopt support for IP_ROUTER_ALERT and IPV6_ROUTER_ALERT
and are available in the git repository at:
git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue 40GbE
Alexey Kodanev (2):
iavf: drop duplicate iavf_{add|del}_cloud_filter() calls
i40e: remove unnecessary qv_info ptr NULL checks
Maciej Fijalkowski (1):
ixgbe: pull out stats update to common routines
drivers/net/ethernet/intel/i40e/i40e_client.c | 4 -- .../ethernet/intel/i40e/i40e_virtchnl_pf.c | 4 -- drivers/net/ethernet/intel/iavf/iavf_main.c | 9 ---- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 54 ++++++++++++++----- .../ethernet/intel/ixgbe/ixgbe_txrx_common.h | 7 +++ drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c | 17 ++---- 6 files changed, 53 insertions(+), 42 deletions(-)
Signature · 1 line
2.41.0
Tony Nguyen
maintainerPATCH 1/3 iavf: drop duplicate iavf_{add|del}_cloud_filter() calls
From: Alexey Kodanev <[email protected]>
There are currently two pairs of identical checks and calls to iavf_{add|del}_cloud_filter().
Detected using the static analysis tool - Svace.
--- drivers/net/ethernet/intel/iavf/iavf_main.c | 9 --------- 1 file changed, 9 deletions(-)
drivers/net/ethernet/intel/iavf/iavf_main.c +0 -9
@@ -2170,19 +2170,10 @@ static int iavf_process_aq_command(struct iavf_adapter *adapter)iavf_add_cloud_filter (adapter);return 0 ; } - -if (adapter->aq_required &IAVF_FLAG_AQ_DEL_CLOUD_FILTER ) { -iavf_del_cloud_filter (adapter); -return 0 ; - }if (adapter->aq_required &IAVF_FLAG_AQ_DEL_CLOUD_FILTER ) {iavf_del_cloud_filter (adapter);return 0 ; } -if (adapter->aq_required &IAVF_FLAG_AQ_ADD_CLOUD_FILTER ) { -iavf_add_cloud_filter (adapter); -return 0 ; - }if (adapter->aq_required &IAVF_FLAG_AQ_ADD_FDIR_FILTER ) {iavf_add_fdir_filter (adapter);return IAVF_SUCCESS ;
Signature · 1 line
2.41.0
Tony Nguyen
maintainerPATCH 2/3 i40e: remove unnecessary qv_info ptr NULL checks
In reply to Tony NguyenFrom: Alexey Kodanev <[email protected]>
The "qv_info" ptr cannot be NULL when it gets the address of an element of the flexible array "qvlist_info->qv_info".
Detected using the static analysis tool - Svace.
--- drivers/net/ethernet/intel/i40e/i40e_client.c | 4 ---- drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c | 4 ---- 2 files changed, 8 deletions(-)
drivers/net/ethernet/intel/i40e/i40e_client.c +0 -4
@@ -148,8 +148,6 @@ static void i40e_client_release_qvlist(struct i40e_info *ldev)u32 reg_idx; qv_info = &qvlist_info->qv_info[i]; -if (!qv_info) -continue ; reg_idx =I40E_PFINT_LNKLSTN (qv_info->v_idx -1 );wr32 (&pf->hw, reg_idx,I40E_PFINT_LNKLSTN_FIRSTQ_INDX_MASK ); }
@@ -576,8 +574,6 @@ static int i40e_client_setup_qvlist(struct i40e_info *ldev,for (i =0 ; i < qvlist_info->num_vectors; i++) { qv_info = &qvlist_info->qv_info[i]; -if (!qv_info) -continue ; v_idx = qv_info->v_idx;/* Validate vector id belongs to this client */
drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c +0 -4
@@ -491,8 +491,6 @@ static void i40e_release_rdma_qvlist(struct i40e_vf *vf)u32 v_idx, reg_idx, reg; qv_info = &qvlist_info->qv_info[i]; -if (!qv_info) -continue ; v_idx = qv_info->v_idx;if (qv_info->ceq_idx !=I40E_QUEUE_INVALID_IDX ) {/* Figure out the queue after CEQ and make that the
@@ -562,8 +560,6 @@ i40e_config_rdma_qvlist(struct i40e_vf *vf, msix_vf = pf->hw.func_caps.num_msix_vectors_vf;for (i =0 ; i < qvlist_info->num_vectors; i++) { qv_info = &qvlist_info->qv_info[i]; -if (!qv_info) -continue ;/* Validate vector id belongs to this vf */ if (!i40e_vc_isvalid_vector_id (vf, qv_info->v_idx)) {
Signature · 1 line
2.41.0
Tony Nguyen
maintainerPATCH 3/3 ixgbe: pull out stats update to common routines
In reply to Tony NguyenFrom: Maciej Fijalkowski <[email protected]>
Introduce ixgbe_update_{r,t}x_ring_stats() that will be used by both standard and ZC datapath.
--- drivers/net/ethernet/intel/ixgbe/ixgbe_main.c | 54 ++++++++++++++----- .../ethernet/intel/ixgbe/ixgbe_txrx_common.h | 7 +++ drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c | 17 ++---- 3 files changed, 53 insertions(+), 25 deletions(-)
drivers/net/ethernet/intel/ixgbe/ixgbe_main.c +42 -12
@@ -1105,6 +1105,44 @@ static int ixgbe_tx_maxrate(struct net_device *netdev,return 0 ; } +/** +* ixgbe_update_tx_ring_stats - Update Tx ring specific counters +* @tx_ring: ring to update +* @q_vector: queue vector ring belongs to +* @pkts: number of processed packets +* @bytes: number of processed bytes +*/ +void ixgbe_update_tx_ring_stats (struct ixgbe_ring *tx_ring, +struct ixgbe_q_vector *q_vector,u64 pkts, +u64 bytes) +{ +u64_stats_update_begin (&tx_ring->syncp); + tx_ring->stats.bytes += bytes; + tx_ring->stats.packets += pkts; +u64_stats_update_end (&tx_ring->syncp); + q_vector->tx.total_bytes += bytes; + q_vector->tx.total_packets += pkts; +} + +/** +* ixgbe_update_rx_ring_stats - Update Rx ring specific counters +* @rx_ring: ring to update +* @q_vector: queue vector ring belongs to +* @pkts: number of processed packets +* @bytes: number of processed bytes +*/ +void ixgbe_update_rx_ring_stats (struct ixgbe_ring *rx_ring, +struct ixgbe_q_vector *q_vector,u64 pkts, +u64 bytes) +{ +u64_stats_update_begin (&rx_ring->syncp); + rx_ring->stats.bytes += bytes; + rx_ring->stats.packets += pkts; +u64_stats_update_end (&rx_ring->syncp); + q_vector->rx.total_bytes += bytes; + q_vector->rx.total_packets += pkts; +} +/** * ixgbe_clean_tx_irq - Reclaim resources after transmit completes * @q_vector: structure containing interrupt and ring information
@@ -1207,12 +1245,8 @@ static bool ixgbe_clean_tx_irq(struct ixgbe_q_vector *q_vector, i += tx_ring->count; tx_ring->next_to_clean = i; -u64_stats_update_begin (&tx_ring->syncp); - tx_ring->stats.bytes += total_bytes; - tx_ring->stats.packets += total_packets; -u64_stats_update_end (&tx_ring->syncp); - q_vector->tx.total_bytes += total_bytes; - q_vector->tx.total_packets += total_packets; +ixgbe_update_tx_ring_stats (tx_ring, q_vector, total_packets, + total_bytes); adapter->tx_ipsec += total_ipsec;if (check_for_tx_hang (tx_ring) &&ixgbe_check_tx_hang (tx_ring)) {
@@ -2429,12 +2463,8 @@ static int ixgbe_clean_rx_irq(struct ixgbe_q_vector *q_vector,ixgbe_xdp_ring_update_tail_locked (ring); } -u64_stats_update_begin (&rx_ring->syncp); - rx_ring->stats.packets += total_rx_packets; - rx_ring->stats.bytes += total_rx_bytes; -u64_stats_update_end (&rx_ring->syncp); - q_vector->rx.total_packets += total_rx_packets; - q_vector->rx.total_bytes += total_rx_bytes; +ixgbe_update_rx_ring_stats (rx_ring, q_vector, total_rx_packets, + total_rx_bytes);return total_rx_packets; }
drivers/net/ethernet/intel/ixgbe/ixgbe_txrx_common.h +7 -0
@@ -46,4 +46,11 @@ bool ixgbe_clean_xdp_tx_irq(struct ixgbe_q_vector *q_vector,int ixgbe_xsk_wakeup (struct net_device *dev,u32 queue_id,u32 flags);void ixgbe_xsk_clean_tx_ring (struct ixgbe_ring *tx_ring); +void ixgbe_update_tx_ring_stats (struct ixgbe_ring *tx_ring, +struct ixgbe_q_vector *q_vector,u64 pkts, +u64 bytes); +void ixgbe_update_rx_ring_stats (struct ixgbe_ring *rx_ring, +struct ixgbe_q_vector *q_vector,u64 pkts, +u64 bytes); +#endif /* #define _IXGBE_TXRX_COMMON_H_ */
drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c +4 -13
@@ -359,12 +359,8 @@ int ixgbe_clean_rx_irq_zc(struct ixgbe_q_vector *q_vector,ixgbe_xdp_ring_update_tail_locked (ring); } -u64_stats_update_begin (&rx_ring->syncp); - rx_ring->stats.packets += total_rx_packets; - rx_ring->stats.bytes += total_rx_bytes; -u64_stats_update_end (&rx_ring->syncp); - q_vector->rx.total_packets += total_rx_packets; - q_vector->rx.total_bytes += total_rx_bytes; +ixgbe_update_rx_ring_stats (rx_ring, q_vector, total_rx_packets, + total_rx_bytes);if (xsk_uses_need_wakeup (rx_ring->xsk_pool)) {if (failure || rx_ring->next_to_clean == rx_ring->next_to_use)
@@ -499,13 +495,8 @@ bool ixgbe_clean_xdp_tx_irq(struct ixgbe_q_vector *q_vector, } tx_ring->next_to_clean = ntc; - -u64_stats_update_begin (&tx_ring->syncp); - tx_ring->stats.bytes += total_bytes; - tx_ring->stats.packets += total_packets; -u64_stats_update_end (&tx_ring->syncp); - q_vector->tx.total_bytes += total_bytes; - q_vector->tx.total_packets += total_packets; +ixgbe_update_tx_ring_stats (tx_ring, q_vector, total_packets, + total_bytes);if (xsk_frames)xsk_tx_completed (pool, xsk_frames);
Signature · 1 line
2.41.0
This series was applied to netdev/net-next.git (main) by Tony Nguyen <[email protected]>:
Hello:
This series was applied to netdev/net-next.git (main) by Tony Nguyen <[email protected]>:
Quoted 9 lines · On Wed, 6 Mar 2024 13:56:10 -0800 you wrote:
This series contains updates to iavf, i40e, and ixgbe drivers.
Alexey Kodanev removes duplicate calls related to cloud filters on iavf and unnecessary null checks on i40e.
Maciej adds helper functions for common code relating to updating statistics for ixgbe.
[...]
Here is the summary with links:
- [net-next,1/3] iavf: drop duplicate iavf_{add|del}_cloud_filter() calls
https://git.kernel.org/netdev/net-next/c/c49172f7a8cf - [net-next,2/3] i40e: remove unnecessary qv_info ptr NULL checks https://git.kernel.org/netdev/net-next/c/60e4caf36b88 - [net-next,3/3] ixgbe: pull out stats update to common routines https://git.kernel.org/netdev/net-next/c/836aeaf73aa1
You are awesome, thank you!
Signature · 2 lines
Deet-doot-dot, I am a bot. https://korg.docs.kernel.org/patchwork/pwbot.html