Skip to content

Commit 397f70e

Browse files
committed
Merge branch '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue
Tony Nguyen says: ==================== Intel Wired LAN Driver Updates 2023-10-03 (i40e, iavf) This series contains updates to i40e and iavf drivers. Yajun Deng aligns reporting of buffer exhaustion statistics to follow documentation for i40e. Jake removes undesired 'inline' from functions in iavf. * '40GbE' of git://git.kernel.org/pub/scm/linux/kernel/git/tnguy/next-queue: iavf: remove "inline" functions from iavf_txrx.c i40e: Add rx_missed_errors for buffer exhaustion ==================== Link: https://lore.kernel.org/r/20231003223610.2004976-1-anthony.l.nguyen@intel.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
2 parents b4ac75a + 70dc7ab commit 397f70e

File tree

4 files changed

+33
-36
lines changed

4 files changed

+33
-36
lines changed

drivers/net/ethernet/intel/i40e/i40e_ethtool.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -245,6 +245,7 @@ static const struct i40e_stats i40e_gstrings_net_stats[] = {
245245
I40E_NETDEV_STAT(rx_errors),
246246
I40E_NETDEV_STAT(tx_errors),
247247
I40E_NETDEV_STAT(rx_dropped),
248+
I40E_NETDEV_STAT(rx_missed_errors),
248249
I40E_NETDEV_STAT(tx_dropped),
249250
I40E_NETDEV_STAT(collisions),
250251
I40E_NETDEV_STAT(rx_length_errors),
@@ -321,7 +322,7 @@ static const struct i40e_stats i40e_gstrings_stats[] = {
321322
I40E_PF_STAT("port.rx_broadcast", stats.eth.rx_broadcast),
322323
I40E_PF_STAT("port.tx_broadcast", stats.eth.tx_broadcast),
323324
I40E_PF_STAT("port.tx_errors", stats.eth.tx_errors),
324-
I40E_PF_STAT("port.rx_dropped", stats.eth.rx_discards),
325+
I40E_PF_STAT("port.rx_discards", stats.eth.rx_discards),
325326
I40E_PF_STAT("port.tx_dropped_link_down", stats.tx_dropped_link_down),
326327
I40E_PF_STAT("port.rx_crc_errors", stats.crc_errors),
327328
I40E_PF_STAT("port.illegal_bytes", stats.illegal_bytes),

drivers/net/ethernet/intel/i40e/i40e_main.c

Lines changed: 7 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -489,6 +489,7 @@ static void i40e_get_netdev_stats_struct(struct net_device *netdev,
489489
stats->tx_dropped = vsi_stats->tx_dropped;
490490
stats->rx_errors = vsi_stats->rx_errors;
491491
stats->rx_dropped = vsi_stats->rx_dropped;
492+
stats->rx_missed_errors = vsi_stats->rx_missed_errors;
492493
stats->rx_crc_errors = vsi_stats->rx_crc_errors;
493494
stats->rx_length_errors = vsi_stats->rx_length_errors;
494495
}
@@ -680,17 +681,13 @@ i40e_stats_update_rx_discards(struct i40e_vsi *vsi, struct i40e_hw *hw,
680681
struct i40e_eth_stats *stat_offset,
681682
struct i40e_eth_stats *stat)
682683
{
683-
u64 rx_rdpc, rx_rxerr;
684-
685684
i40e_stat_update32(hw, I40E_GLV_RDPC(stat_idx), offset_loaded,
686-
&stat_offset->rx_discards, &rx_rdpc);
685+
&stat_offset->rx_discards, &stat->rx_discards);
687686
i40e_stat_update64(hw,
688687
I40E_GL_RXERR1H(i40e_compute_pci_to_hw_id(vsi, hw)),
689688
I40E_GL_RXERR1L(i40e_compute_pci_to_hw_id(vsi, hw)),
690689
offset_loaded, &stat_offset->rx_discards_other,
691-
&rx_rxerr);
692-
693-
stat->rx_discards = rx_rdpc + rx_rxerr;
690+
&stat->rx_discards_other);
694691
}
695692

696693
/**
@@ -712,9 +709,6 @@ void i40e_update_eth_stats(struct i40e_vsi *vsi)
712709
i40e_stat_update32(hw, I40E_GLV_TEPC(stat_idx),
713710
vsi->stat_offsets_loaded,
714711
&oes->tx_errors, &es->tx_errors);
715-
i40e_stat_update32(hw, I40E_GLV_RDPC(stat_idx),
716-
vsi->stat_offsets_loaded,
717-
&oes->rx_discards, &es->rx_discards);
718712
i40e_stat_update32(hw, I40E_GLV_RUPP(stat_idx),
719713
vsi->stat_offsets_loaded,
720714
&oes->rx_unknown_protocol, &es->rx_unknown_protocol);
@@ -971,8 +965,10 @@ static void i40e_update_vsi_stats(struct i40e_vsi *vsi)
971965
ns->tx_errors = es->tx_errors;
972966
ons->multicast = oes->rx_multicast;
973967
ns->multicast = es->rx_multicast;
974-
ons->rx_dropped = oes->rx_discards;
975-
ns->rx_dropped = es->rx_discards;
968+
ons->rx_dropped = oes->rx_discards_other;
969+
ns->rx_dropped = es->rx_discards_other;
970+
ons->rx_missed_errors = oes->rx_discards;
971+
ns->rx_missed_errors = es->rx_discards;
976972
ons->tx_dropped = oes->tx_discards;
977973
ns->tx_dropped = es->tx_discards;
978974

drivers/net/ethernet/intel/i40e/i40e_virtchnl_pf.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4916,7 +4916,7 @@ int i40e_get_vf_stats(struct net_device *netdev, int vf_id,
49164916
vf_stats->tx_bytes = stats->tx_bytes;
49174917
vf_stats->broadcast = stats->rx_broadcast;
49184918
vf_stats->multicast = stats->rx_multicast;
4919-
vf_stats->rx_dropped = stats->rx_discards;
4919+
vf_stats->rx_dropped = stats->rx_discards + stats->rx_discards_other;
49204920
vf_stats->tx_dropped = stats->tx_discards;
49214921

49224922
return 0;

drivers/net/ethernet/intel/iavf/iavf_txrx.c

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
#include "iavf_trace.h"
88
#include "iavf_prototype.h"
99

10-
static inline __le64 build_ctob(u32 td_cmd, u32 td_offset, unsigned int size,
11-
u32 td_tag)
10+
static __le64 build_ctob(u32 td_cmd, u32 td_offset, unsigned int size,
11+
u32 td_tag)
1212
{
1313
return cpu_to_le64(IAVF_TX_DESC_DTYPE_DATA |
1414
((u64)td_cmd << IAVF_TXD_QW1_CMD_SHIFT) |
@@ -370,8 +370,8 @@ static void iavf_enable_wb_on_itr(struct iavf_vsi *vsi,
370370
q_vector->arm_wb_state = true;
371371
}
372372

373-
static inline bool iavf_container_is_rx(struct iavf_q_vector *q_vector,
374-
struct iavf_ring_container *rc)
373+
static bool iavf_container_is_rx(struct iavf_q_vector *q_vector,
374+
struct iavf_ring_container *rc)
375375
{
376376
return &q_vector->rx == rc;
377377
}
@@ -806,7 +806,7 @@ int iavf_setup_rx_descriptors(struct iavf_ring *rx_ring)
806806
* @rx_ring: ring to bump
807807
* @val: new head index
808808
**/
809-
static inline void iavf_release_rx_desc(struct iavf_ring *rx_ring, u32 val)
809+
static void iavf_release_rx_desc(struct iavf_ring *rx_ring, u32 val)
810810
{
811811
rx_ring->next_to_use = val;
812812

@@ -828,7 +828,7 @@ static inline void iavf_release_rx_desc(struct iavf_ring *rx_ring, u32 val)
828828
*
829829
* Returns the offset value for ring into the data buffer.
830830
*/
831-
static inline unsigned int iavf_rx_offset(struct iavf_ring *rx_ring)
831+
static unsigned int iavf_rx_offset(struct iavf_ring *rx_ring)
832832
{
833833
return ring_uses_build_skb(rx_ring) ? IAVF_SKB_PAD : 0;
834834
}
@@ -977,9 +977,9 @@ bool iavf_alloc_rx_buffers(struct iavf_ring *rx_ring, u16 cleaned_count)
977977
* @skb: skb currently being received and modified
978978
* @rx_desc: the receive descriptor
979979
**/
980-
static inline void iavf_rx_checksum(struct iavf_vsi *vsi,
981-
struct sk_buff *skb,
982-
union iavf_rx_desc *rx_desc)
980+
static void iavf_rx_checksum(struct iavf_vsi *vsi,
981+
struct sk_buff *skb,
982+
union iavf_rx_desc *rx_desc)
983983
{
984984
struct iavf_rx_ptype_decoded decoded;
985985
u32 rx_error, rx_status;
@@ -1061,7 +1061,7 @@ static inline void iavf_rx_checksum(struct iavf_vsi *vsi,
10611061
*
10621062
* Returns a hash type to be used by skb_set_hash
10631063
**/
1064-
static inline int iavf_ptype_to_htype(u8 ptype)
1064+
static int iavf_ptype_to_htype(u8 ptype)
10651065
{
10661066
struct iavf_rx_ptype_decoded decoded = decode_rx_desc_ptype(ptype);
10671067

@@ -1085,10 +1085,10 @@ static inline int iavf_ptype_to_htype(u8 ptype)
10851085
* @skb: skb currently being received and modified
10861086
* @rx_ptype: Rx packet type
10871087
**/
1088-
static inline void iavf_rx_hash(struct iavf_ring *ring,
1089-
union iavf_rx_desc *rx_desc,
1090-
struct sk_buff *skb,
1091-
u8 rx_ptype)
1088+
static void iavf_rx_hash(struct iavf_ring *ring,
1089+
union iavf_rx_desc *rx_desc,
1090+
struct sk_buff *skb,
1091+
u8 rx_ptype)
10921092
{
10931093
u32 hash;
10941094
const __le64 rss_mask =
@@ -1115,10 +1115,10 @@ static inline void iavf_rx_hash(struct iavf_ring *ring,
11151115
* order to populate the hash, checksum, VLAN, protocol, and
11161116
* other fields within the skb.
11171117
**/
1118-
static inline
1119-
void iavf_process_skb_fields(struct iavf_ring *rx_ring,
1120-
union iavf_rx_desc *rx_desc, struct sk_buff *skb,
1121-
u8 rx_ptype)
1118+
static void
1119+
iavf_process_skb_fields(struct iavf_ring *rx_ring,
1120+
union iavf_rx_desc *rx_desc, struct sk_buff *skb,
1121+
u8 rx_ptype)
11221122
{
11231123
iavf_rx_hash(rx_ring, rx_desc, skb, rx_ptype);
11241124

@@ -1662,8 +1662,8 @@ static inline u32 iavf_buildreg_itr(const int type, u16 itr)
16621662
* @q_vector: q_vector for which itr is being updated and interrupt enabled
16631663
*
16641664
**/
1665-
static inline void iavf_update_enable_itr(struct iavf_vsi *vsi,
1666-
struct iavf_q_vector *q_vector)
1665+
static void iavf_update_enable_itr(struct iavf_vsi *vsi,
1666+
struct iavf_q_vector *q_vector)
16671667
{
16681668
struct iavf_hw *hw = &vsi->back->hw;
16691669
u32 intval;
@@ -2275,9 +2275,9 @@ int __iavf_maybe_stop_tx(struct iavf_ring *tx_ring, int size)
22752275
* @td_cmd: the command field in the descriptor
22762276
* @td_offset: offset for checksum or crc
22772277
**/
2278-
static inline void iavf_tx_map(struct iavf_ring *tx_ring, struct sk_buff *skb,
2279-
struct iavf_tx_buffer *first, u32 tx_flags,
2280-
const u8 hdr_len, u32 td_cmd, u32 td_offset)
2278+
static void iavf_tx_map(struct iavf_ring *tx_ring, struct sk_buff *skb,
2279+
struct iavf_tx_buffer *first, u32 tx_flags,
2280+
const u8 hdr_len, u32 td_cmd, u32 td_offset)
22812281
{
22822282
unsigned int data_len = skb->data_len;
22832283
unsigned int size = skb_headlen(skb);

0 commit comments

Comments
 (0)