mbox series

[V3,net-next,0/4] Enhance current features in ena driver

Message ID 20200909064627.30104-1-sameehj@amazon.com
Headers show
Series Enhance current features in ena driver | expand

Message

Jubran, Samih Sept. 9, 2020, 6:46 a.m. UTC
From: Sameeh Jubran <sameehj@amazon.com>

This series adds the following:
* Exposes new device stats using ethtool.
* Adds and exposes the stats of xdp TX queues through ethtool.

V2: Drop the need for casting stat_offset
V1: Use unsigned long for pointer math instead of uintptr_t

Sameeh Jubran (4):
  net: ena: ethtool: convert stat_offset to 64 bit resolution
  net: ena: ethtool: Add new device statistics
  net: ena: ethtool: add stats printing to XDP queues
  net: ena: xdp: add queue counters for xdp actions

 drivers/net/ethernet/amazon/ena/ena_admin_defs.h |  37 ++++-
 drivers/net/ethernet/amazon/ena/ena_com.c        |  19 ++-
 drivers/net/ethernet/amazon/ena/ena_com.h        |   9 ++
 drivers/net/ethernet/amazon/ena/ena_ethtool.c    | 172 +++++++++++++++++------
 drivers/net/ethernet/amazon/ena/ena_netdev.c     |  45 +++++-
 drivers/net/ethernet/amazon/ena/ena_netdev.h     |   9 ++
 6 files changed, 236 insertions(+), 55 deletions(-)

Comments

Jakub Kicinski Sept. 9, 2020, 3:50 p.m. UTC | #1
On Wed, 9 Sep 2020 06:46:27 +0000 sameehj@amazon.com wrote:
> @@ -374,17 +375,31 @@ static int ena_xdp_execute(struct ena_ring *rx_ring,
>  
>  	verdict = bpf_prog_run_xdp(xdp_prog, xdp);
>  
> -	if (verdict == XDP_TX)
> +	if (verdict == XDP_TX) {
>  		ena_xdp_xmit_buff(rx_ring->netdev,
> -				  xdp,
> -				  rx_ring->qid + rx_ring->adapter->num_io_queues,
> -				  rx_info);
> -	else if (unlikely(verdict == XDP_ABORTED))
> +				xdp,
> +				rx_ring->qid + rx_ring->adapter->num_io_queues,
> +				rx_info);

You broke the alignment here, for no reason.

Otherwise the series looks good.
David Miller Sept. 9, 2020, 6:02 p.m. UTC | #2
From: <sameehj@amazon.com>
Date: Wed, 9 Sep 2020 06:46:23 +0000

> From: Sameeh Jubran <sameehj@amazon.com>
> 
> This series adds the following:
> * Exposes new device stats using ethtool.
> * Adds and exposes the stats of xdp TX queues through ethtool.
> 
> V2: Drop the need for casting stat_offset
> V1: Use unsigned long for pointer math instead of uintptr_t

Please respin with the alignment problem Jakub pointed out fixed,
thank you.