> -----Original Message-----
> From: Yigit, Ferruh <[email protected]>
> Sent: Wednesday, October 14, 2020 10:27
> To: Yigit, Ferruh <[email protected]>; John W. Linville
> <[email protected]>; Loftus, Ciara <[email protected]>; Zhang, Qi Z
> <[email protected]>; Shepard Siegel <[email protected]>;
> Ed Czeck <[email protected]>; John Miller
> <[email protected]>; Igor Russkikh
> <[email protected]>; Pavel Belous <[email protected]>;
> Steven Webster <[email protected]>; Matt Peters
> <[email protected]>; Somalapuram Amaranath
> <[email protected]>; Rasesh Mody <[email protected]>; Shahed
> Shaikh <[email protected]>; Ajit Khaparde
> <[email protected]>; Somnath Kotur
> <[email protected]>; Chas Williams <[email protected]>; Min Hu
> (Connor) <[email protected]>; Rahul Lakkireddy
> <[email protected]>; Hemant Agrawal
> <[email protected]>; Sachin Saxena <[email protected]>;
> Guo, Jia <[email protected]>; Wang, Haiyue <[email protected]>;
> Marcin Wojtas <[email protected]>; Michal Krawczyk <[email protected]>;
> Guy Tzalik <[email protected]>; Evgeny Schemeilin
> <[email protected]>; Igor Chauskin <[email protected]>;
> Gagandeep Singh <[email protected]>; John Daley <[email protected]>;
> Hyong Youb Kim <[email protected]>; Gaetan Rivet <[email protected]>;
> Wang, Xiao W <[email protected]>; Ziyang Xuan
> <[email protected]>; Xiaoyun Wang
> <[email protected]>; Guoyang Zhou
> <[email protected]>; Wei Hu (Xavier)
> <[email protected]>; Yisen Zhuang <[email protected]>;
> Xing, Beilei <[email protected]>; Wu, Jingjing <[email protected]>;
> Yang, Qiming <[email protected]>; Alfredo Cardigliano
> <[email protected]>; Xu, Rosen <[email protected]>; Shijith Thotton
> <[email protected]>; Srisivasubramanian Srinivasan
> <[email protected]>; Jakub Grajciar <[email protected]>; Matan
> Azrad <[email protected]>; Shahaf Shuler <[email protected]>;
> Viacheslav Ovsiienko <[email protected]>; Zyta Szpak
> <[email protected]>; Liron Himi <[email protected]>; Stephen Hemminger
> <[email protected]>; K. Y. Srinivasan <[email protected]>;
> Haiyang Zhang <[email protected]>; Long Li <[email protected]>;
> Martin Spinler <[email protected]>; Heinrich Kuhn
> <[email protected]>; Tetsuya Mukawa
> <[email protected]>; Harman Kalra <[email protected]>; Jerin Jacob
> <[email protected]>; Nithin Dabilpuram <[email protected]>;
> Kiran Kumar K <[email protected]>; Akhil Goyal
> <[email protected]>; Richardson, Bruce <[email protected]>;
> Andrew Rybchenko <[email protected]>; Wiles, Keith
> <[email protected]>; Maciej Czekaj <[email protected]>; Maxime
> Coquelin <[email protected]>; Xia, Chenbo
> <[email protected]>; Wang, Zhihong <[email protected]>; Yong
> Wang <[email protected]>; Thomas Monjalon
> <[email protected]>
> Cc: [email protected]
> Subject: [RFC v2 1/2] ethdev: provide device flag to bypass ethdev queue
> xstats
> 
> Queue stats are stored in 'struct rte_eth_stats' as array and array size is
> defined by 'RTE_ETHDEV_QUEUE_STAT_CNTRS' compile time flag.
> 
> As a result of technical board discussion, decided to remove the queue
> statistics from 'struct rte_eth_stats' in the long term.
> 
> Instead PMDs should represent the queue statistics via xstats, this gives
> more flexibility on the number of the queues supported.
> 
> Currently queue stats in the xstats are filled by ethdev layer, using some
> basic stats, when queue stats removed from basic stats the responsibility to
> fill the relevant xstats will be pushed to the PMDs.
> 
> During the switch period, temporary
> 'RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS'
> device flag is created. Initially all PMDs using xstats set this flag.
> The PMDs implemented queue stats in the xstats should clear the flag.
> 
> When all PMDs switch to the xstats for the queue stats, queue stats related
> fields from 'struct rte_eth_stats' will be removed, as well as
> 'RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS' flag.
> Later 'RTE_ETHDEV_QUEUE_STAT_CNTRS' compile time flag also can be
> removed.
> 
> Signed-off-by: Ferruh Yigit <[email protected]>
> ---
>  drivers/net/af_packet/rte_eth_af_packet.c |  1 +
>  drivers/net/af_xdp/rte_eth_af_xdp.c       |  1 +
>  drivers/net/ark/ark_ethdev.c              |  2 ++
>  drivers/net/atlantic/atl_ethdev.c         |  2 ++
>  drivers/net/avp/avp_ethdev.c              |  1 +
>  drivers/net/axgbe/axgbe_ethdev.c          |  2 ++
>  drivers/net/bnx2x/bnx2x_ethdev.c          |  1 +
>  drivers/net/bnxt/bnxt_ethdev.c            |  1 +
>  drivers/net/bnxt/bnxt_reps.c              |  3 ++-
>  drivers/net/bonding/rte_eth_bond_pmd.c    |  3 ++-
>  drivers/net/cxgbe/cxgbe_ethdev.c          |  2 ++
>  drivers/net/dpaa/dpaa_ethdev.c            |  2 ++
>  drivers/net/dpaa2/dpaa2_ethdev.c          |  2 ++
>  drivers/net/e1000/em_ethdev.c             |  1 +
>  drivers/net/e1000/igb_ethdev.c            |  2 ++
>  drivers/net/ena/ena_ethdev.c              |  2 ++
>  drivers/net/enetc/enetc_ethdev.c          |  2 ++
>  drivers/net/enic/enic_ethdev.c            |  1 +
>  drivers/net/enic/enic_vf_representor.c    |  3 ++-
>  drivers/net/failsafe/failsafe.c           |  3 ++-
>  drivers/net/fm10k/fm10k_ethdev.c          |  1 +
>  drivers/net/hinic/hinic_pmd_ethdev.c      |  2 ++
>  drivers/net/hns3/hns3_ethdev.c            |  2 ++
>  drivers/net/hns3/hns3_ethdev_vf.c         |  2 ++
>  drivers/net/i40e/i40e_ethdev.c            |  1 +
>  drivers/net/i40e/i40e_ethdev_vf.c         |  1 +
>  drivers/net/i40e/i40e_vf_representor.c    |  3 ++-
>  drivers/net/iavf/iavf_ethdev.c            |  1 +
>  drivers/net/ice/ice_dcf_ethdev.c          |  2 ++
>  drivers/net/ice/ice_ethdev.c              |  2 ++
>  drivers/net/igc/igc_ethdev.c              |  1 +
>  drivers/net/ionic/ionic_ethdev.c          |  1 +
>  drivers/net/ipn3ke/ipn3ke_representor.c   |  3 ++-
>  drivers/net/ixgbe/ixgbe_ethdev.c          |  2 ++
>  drivers/net/kni/rte_eth_kni.c             |  1 +
>  drivers/net/liquidio/lio_ethdev.c         |  1 +
>  drivers/net/memif/rte_eth_memif.c         |  1 +
>  drivers/net/mlx4/mlx4.c                   |  1 +
>  drivers/net/mlx5/linux/mlx5_os.c          |  1 +
>  drivers/net/mvneta/mvneta_ethdev.c        |  1 +
>  drivers/net/mvpp2/mrvl_ethdev.c           |  1 +
>  drivers/net/netvsc/hn_ethdev.c            |  2 ++
>  drivers/net/nfb/nfb_ethdev.c              |  2 ++
>  drivers/net/nfp/nfp_net.c                 |  2 ++
>  drivers/net/null/rte_eth_null.c           |  1 +
>  drivers/net/octeontx/octeontx_ethdev.c    |  1 +
>  drivers/net/octeontx2/otx2_ethdev.c       |  1 +
>  drivers/net/pcap/rte_eth_pcap.c           |  1 +
>  drivers/net/pfe/pfe_ethdev.c              |  2 ++
>  drivers/net/qede/qede_ethdev.c            |  1 +
>  drivers/net/ring/rte_eth_ring.c           |  1 +
>  drivers/net/sfc/sfc_ethdev.c              |  1 +
>  drivers/net/szedata2/rte_eth_szedata2.c   |  2 ++
>  drivers/net/tap/rte_eth_tap.c             |  3 ++-
>  drivers/net/thunderx/nicvf_ethdev.c       |  1 +
>  drivers/net/vhost/rte_eth_vhost.c         |  3 ++-
>  drivers/net/virtio/virtio_ethdev.c        |  2 ++
>  drivers/net/vmxnet3/vmxnet3_ethdev.c      |  1 +
>  lib/librte_ethdev/rte_ethdev.c            | 18 ++++++++++++++----
>  lib/librte_ethdev/rte_ethdev.h            |  5 +++++
>  60 files changed, 106 insertions(+), 12 deletions(-)
> 
> diff --git a/drivers/net/ipn3ke/ipn3ke_representor.c
> b/drivers/net/ipn3ke/ipn3ke_representor.c
> index b9fb4d4e46..a8765b5f4e 100644
> --- a/drivers/net/ipn3ke/ipn3ke_representor.c
> +++ b/drivers/net/ipn3ke/ipn3ke_representor.c
> @@ -2964,7 +2964,8 @@ ipn3ke_rpst_init(struct rte_eth_dev *ethdev, void
> *init_params)
>               return -ENODEV;
>       }
> 
> -     ethdev->data->dev_flags |= RTE_ETH_DEV_REPRESENTOR;
> +     ethdev->data->dev_flags |= RTE_ETH_DEV_REPRESENTOR |
> +
>       RTE_ETH_DEV_AUTOFILL_QUEUE_XSTATS;
> 
>       rte_spinlock_lock(&ipn3ke_link_notify_list_lk);
>       TAILQ_INSERT_TAIL(&ipn3ke_rpst_list, rpst, next); diff --git

Acked-by: Rosen Xu<[email protected]>

Reply via email to