Re: [PATCH net-next] net: mana: Add gdma stats to ethtool output for mana

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Mon, Aug 7, 2023 at 4:29 PM Shradha Gupta
<shradhagupta@xxxxxxxxxxxxxxxxxxx> wrote:
>
> Extended performance counter stats in 'ethtool -S <interface>'
> for MANA VF to include GDMA tx LSO packets and bytes count.
>
> Tested-on: Ubuntu22
> Testcases:
> 1. LISA testcase:
> PERF-NETWORK-TCP-THROUGHPUT-MULTICONNECTION-NTTTCP-Synthetic
> 2. LISA testcase:
> PERF-NETWORK-TCP-THROUGHPUT-MULTICONNECTION-NTTTCP-SRIOV
> 3. Validated the GDMA stat packets and byte counters
> Signed-off-by: Shradha Gupta <shradhagupta@xxxxxxxxxxxxxxxxxxx>
> ---
>  drivers/net/ethernet/microsoft/mana/mana_en.c | 40 +++++++++
>  .../ethernet/microsoft/mana/mana_ethtool.c    | 15 ++++
>  include/net/mana/mana.h                       | 88 +++++++++++++++++++
>  3 files changed, 143 insertions(+)
>
> diff --git a/drivers/net/ethernet/microsoft/mana/mana_en.c b/drivers/net/ethernet/microsoft/mana/mana_en.c
> index ac2acc9aca9d..eb5e4164b9bf 100644
> --- a/drivers/net/ethernet/microsoft/mana/mana_en.c
> +++ b/drivers/net/ethernet/microsoft/mana/mana_en.c
> @@ -2234,6 +2234,46 @@ int mana_config_rss(struct mana_port_context *apc, enum TRI_STATE rx,
>         return 0;
>  }
>
> +void mana_query_gf_stats(struct mana_port_context *apc)
> +{
> +       struct mana_query_gf_stat_req   req = {};

nit: remove the space before 'req' and rearrange in reverse x-mas order

> +       struct mana_query_gf_stat_resp resp = {};
> +       struct net_device *ndev = apc->ndev;

> +#define STATISTICS_FLAGS_HC_TX_BCAST_PACKETS           0x0000000001000000
> +#define STATISTICS_FLAGS_HC_TX_BCAST_BYTES             0x0000000002000000
> +/* Tx error */
> +#define STATISTICS_FLAGS_TX_ERRORS_GDMA_ERROR          0x0000000004000000
> +
> +

Checkpatch is warning about this.
Otherwise it looks good.

>  #define MANA_MAX_NUM_QUEUES 64
>
>  #define MANA_SHORT_VPORT_OFFSET_MAX ((1U << 8) - 1)
> --
> 2.34.1
>
>

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature


[Index of Archives]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Photo]     [Yosemite News]     [Yosemite Photos]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux