From: Tony Nguyen <anthony.l.nguyen@intel.com>
To: intel-wired-lan@osuosl.org
Subject: [Intel-wired-lan] [PATCH net v1] i40e: Fix dropped jumbo frames statistics
Date: Fri, 27 May 2022 09:45:23 -0700 [thread overview]
Message-ID: <2485cd45-1ac5-6e2a-9023-2887cc535069@intel.com> (raw)
In-Reply-To: <20220527080750.2370502-1-jedrzej.jagielski@intel.com>
On 5/27/2022 1:07 AM, Jedrzej Jagielski wrote:
> From: Lukasz Cieplicki <lukaszx.cieplicki@intel.com>
>
> +/**
> + * i40e_stats_update_rx_discards - update rx_discards.
> + * @vsi: ptr to the VSI to be updated.
> + * @hw: ptr to the hardware info.
> + * @stat_idx: VSI's stat_counter_idx.
> + * @offset_loaded: ptr to the VSI's stat_offsets_loaded.
> + * @stat_offset: ptr to stat_offset to store first read of specific register.
> + * @stat: ptr to VSI's stat to be updated.
> + **/
> +static void i40e_stats_update_rx_discards(struct i40e_vsi *vsi,
> + struct i40e_hw *hw, int stat_idx, bool offset_loaded,
> + struct i40e_eth_stats *stat_offset,
> + struct i40e_eth_stats *stat)
Checkpatch reports an alignment issue with this. I'd recommend using
this style to help resolve this:
static void
i40e_stats_update_rx_discards(struct i40e_vsi *vsi,
struct i40e_hw *hw, int stat_idx, ...
Look at the ice driver for more examples.
> +{
> + u64 rx_rdpc, rx_rxerr;
> +
> + i40e_stat_update32(hw, I40E_GLV_RDPC(stat_idx), offset_loaded,
> + &stat_offset->rx_discards, &rx_rdpc);
> + 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;
> +}
> +
> /**
> * i40e_update_eth_stats - Update VSI-specific ethernet statistics counters.
> * @vsi: the VSI to be updated
> @@ -679,6 +749,10 @@ void i40e_update_eth_stats(struct i40e_vsi *vsi)
> I40E_GLV_BPTCL(stat_idx),
> vsi->stat_offsets_loaded,
> &oes->tx_broadcast, &es->tx_broadcast);
> +
> + i40e_stats_update_rx_discards(vsi, hw, stat_idx,
> + vsi->stat_offsets_loaded, oes, es);
Alignment issue here as well.
> +
> vsi->stat_offsets_loaded = true;
> }
prev parent reply other threads:[~2022-05-27 16:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-05-27 8:07 [Intel-wired-lan] [PATCH net v1] i40e: Fix dropped jumbo frames statistics Jedrzej Jagielski
2022-05-27 12:11 ` Paul Menzel
2022-05-31 9:13 ` Jagielski, Jedrzej
2022-05-27 16:45 ` Tony Nguyen [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=2485cd45-1ac5-6e2a-9023-2887cc535069@intel.com \
--to=anthony.l.nguyen@intel.com \
--cc=intel-wired-lan@osuosl.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox