Commit 397f70e3 authored by Jakub Kicinski's avatar Jakub Kicinski
Browse files
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: default avatarJakub Kicinski <kuba@kernel.org>
parents b4ac75a3 70dc7ab7
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -245,6 +245,7 @@ static const struct i40e_stats i40e_gstrings_net_stats[] = {
	I40E_NETDEV_STAT(rx_errors),
	I40E_NETDEV_STAT(tx_errors),
	I40E_NETDEV_STAT(rx_dropped),
	I40E_NETDEV_STAT(rx_missed_errors),
	I40E_NETDEV_STAT(tx_dropped),
	I40E_NETDEV_STAT(collisions),
	I40E_NETDEV_STAT(rx_length_errors),
@@ -321,7 +322,7 @@ static const struct i40e_stats i40e_gstrings_stats[] = {
	I40E_PF_STAT("port.rx_broadcast", stats.eth.rx_broadcast),
	I40E_PF_STAT("port.tx_broadcast", stats.eth.tx_broadcast),
	I40E_PF_STAT("port.tx_errors", stats.eth.tx_errors),
	I40E_PF_STAT("port.rx_dropped", stats.eth.rx_discards),
	I40E_PF_STAT("port.rx_discards", stats.eth.rx_discards),
	I40E_PF_STAT("port.tx_dropped_link_down", stats.tx_dropped_link_down),
	I40E_PF_STAT("port.rx_crc_errors", stats.crc_errors),
	I40E_PF_STAT("port.illegal_bytes", stats.illegal_bytes),
+7 −11
Original line number Diff line number Diff line
@@ -489,6 +489,7 @@ static void i40e_get_netdev_stats_struct(struct net_device *netdev,
	stats->tx_dropped	= vsi_stats->tx_dropped;
	stats->rx_errors	= vsi_stats->rx_errors;
	stats->rx_dropped	= vsi_stats->rx_dropped;
	stats->rx_missed_errors	= vsi_stats->rx_missed_errors;
	stats->rx_crc_errors	= vsi_stats->rx_crc_errors;
	stats->rx_length_errors	= vsi_stats->rx_length_errors;
}
@@ -680,17 +681,13 @@ i40e_stats_update_rx_discards(struct i40e_vsi *vsi, struct i40e_hw *hw,
			      struct i40e_eth_stats *stat_offset,
			      struct i40e_eth_stats *stat)
{
	u64 rx_rdpc, rx_rxerr;

	i40e_stat_update32(hw, I40E_GLV_RDPC(stat_idx), offset_loaded,
			   &stat_offset->rx_discards, &rx_rdpc);
			   &stat_offset->rx_discards, &stat->rx_discards);
	i40e_stat_update64(hw,
			   I40E_GL_RXERR1H(i40e_compute_pci_to_hw_id(vsi, hw)),
			   I40E_GL_RXERR1L(i40e_compute_pci_to_hw_id(vsi, hw)),
			   offset_loaded, &stat_offset->rx_discards_other,
			   &rx_rxerr);

	stat->rx_discards = rx_rdpc + rx_rxerr;
			   &stat->rx_discards_other);
}

/**
@@ -712,9 +709,6 @@ void i40e_update_eth_stats(struct i40e_vsi *vsi)
	i40e_stat_update32(hw, I40E_GLV_TEPC(stat_idx),
			   vsi->stat_offsets_loaded,
			   &oes->tx_errors, &es->tx_errors);
	i40e_stat_update32(hw, I40E_GLV_RDPC(stat_idx),
			   vsi->stat_offsets_loaded,
			   &oes->rx_discards, &es->rx_discards);
	i40e_stat_update32(hw, I40E_GLV_RUPP(stat_idx),
			   vsi->stat_offsets_loaded,
			   &oes->rx_unknown_protocol, &es->rx_unknown_protocol);
@@ -971,8 +965,10 @@ static void i40e_update_vsi_stats(struct i40e_vsi *vsi)
	ns->tx_errors = es->tx_errors;
	ons->multicast = oes->rx_multicast;
	ns->multicast = es->rx_multicast;
	ons->rx_dropped = oes->rx_discards;
	ns->rx_dropped = es->rx_discards;
	ons->rx_dropped = oes->rx_discards_other;
	ns->rx_dropped = es->rx_discards_other;
	ons->rx_missed_errors = oes->rx_discards;
	ns->rx_missed_errors = es->rx_discards;
	ons->tx_dropped = oes->tx_discards;
	ns->tx_dropped = es->tx_discards;

+1 −1
Original line number Diff line number Diff line
@@ -4916,7 +4916,7 @@ int i40e_get_vf_stats(struct net_device *netdev, int vf_id,
	vf_stats->tx_bytes   = stats->tx_bytes;
	vf_stats->broadcast  = stats->rx_broadcast;
	vf_stats->multicast  = stats->rx_multicast;
	vf_stats->rx_dropped = stats->rx_discards;
	vf_stats->rx_dropped = stats->rx_discards + stats->rx_discards_other;
	vf_stats->tx_dropped = stats->tx_discards;

	return 0;
+23 −23
Original line number Diff line number Diff line
@@ -7,7 +7,7 @@
#include "iavf_trace.h"
#include "iavf_prototype.h"

static inline __le64 build_ctob(u32 td_cmd, u32 td_offset, unsigned int size,
static __le64 build_ctob(u32 td_cmd, u32 td_offset, unsigned int size,
			 u32 td_tag)
{
	return cpu_to_le64(IAVF_TX_DESC_DTYPE_DATA |
@@ -370,7 +370,7 @@ static void iavf_enable_wb_on_itr(struct iavf_vsi *vsi,
	q_vector->arm_wb_state = true;
}

static inline bool iavf_container_is_rx(struct iavf_q_vector *q_vector,
static bool iavf_container_is_rx(struct iavf_q_vector *q_vector,
				 struct iavf_ring_container *rc)
{
	return &q_vector->rx == rc;
@@ -806,7 +806,7 @@ int iavf_setup_rx_descriptors(struct iavf_ring *rx_ring)
 * @rx_ring: ring to bump
 * @val: new head index
 **/
static inline void iavf_release_rx_desc(struct iavf_ring *rx_ring, u32 val)
static void iavf_release_rx_desc(struct iavf_ring *rx_ring, u32 val)
{
	rx_ring->next_to_use = val;

@@ -828,7 +828,7 @@ static inline void iavf_release_rx_desc(struct iavf_ring *rx_ring, u32 val)
 *
 * Returns the offset value for ring into the data buffer.
 */
static inline unsigned int iavf_rx_offset(struct iavf_ring *rx_ring)
static unsigned int iavf_rx_offset(struct iavf_ring *rx_ring)
{
	return ring_uses_build_skb(rx_ring) ? IAVF_SKB_PAD : 0;
}
@@ -977,7 +977,7 @@ bool iavf_alloc_rx_buffers(struct iavf_ring *rx_ring, u16 cleaned_count)
 * @skb: skb currently being received and modified
 * @rx_desc: the receive descriptor
 **/
static inline void iavf_rx_checksum(struct iavf_vsi *vsi,
static void iavf_rx_checksum(struct iavf_vsi *vsi,
			     struct sk_buff *skb,
			     union iavf_rx_desc *rx_desc)
{
@@ -1061,7 +1061,7 @@ static inline void iavf_rx_checksum(struct iavf_vsi *vsi,
 *
 * Returns a hash type to be used by skb_set_hash
 **/
static inline int iavf_ptype_to_htype(u8 ptype)
static int iavf_ptype_to_htype(u8 ptype)
{
	struct iavf_rx_ptype_decoded decoded = decode_rx_desc_ptype(ptype);

@@ -1085,7 +1085,7 @@ static inline int iavf_ptype_to_htype(u8 ptype)
 * @skb: skb currently being received and modified
 * @rx_ptype: Rx packet type
 **/
static inline void iavf_rx_hash(struct iavf_ring *ring,
static void iavf_rx_hash(struct iavf_ring *ring,
			 union iavf_rx_desc *rx_desc,
			 struct sk_buff *skb,
			 u8 rx_ptype)
@@ -1115,8 +1115,8 @@ static inline void iavf_rx_hash(struct iavf_ring *ring,
 * order to populate the hash, checksum, VLAN, protocol, and
 * other fields within the skb.
 **/
static inline
void iavf_process_skb_fields(struct iavf_ring *rx_ring,
static void
iavf_process_skb_fields(struct iavf_ring *rx_ring,
			union iavf_rx_desc *rx_desc, struct sk_buff *skb,
			u8 rx_ptype)
{
@@ -1662,7 +1662,7 @@ static inline u32 iavf_buildreg_itr(const int type, u16 itr)
 * @q_vector: q_vector for which itr is being updated and interrupt enabled
 *
 **/
static inline void iavf_update_enable_itr(struct iavf_vsi *vsi,
static void iavf_update_enable_itr(struct iavf_vsi *vsi,
				   struct iavf_q_vector *q_vector)
{
	struct iavf_hw *hw = &vsi->back->hw;
@@ -2275,7 +2275,7 @@ int __iavf_maybe_stop_tx(struct iavf_ring *tx_ring, int size)
 * @td_cmd:   the command field in the descriptor
 * @td_offset: offset for checksum or crc
 **/
static inline void iavf_tx_map(struct iavf_ring *tx_ring, struct sk_buff *skb,
static void iavf_tx_map(struct iavf_ring *tx_ring, struct sk_buff *skb,
			struct iavf_tx_buffer *first, u32 tx_flags,
			const u8 hdr_len, u32 td_cmd, u32 td_offset)
{