From: Jiri Pirko <jiri@resnulli.us>
To: Wenjun Wu <wenjun1.wu@intel.com>
Cc: netdev@vger.kernel.org, anthony.l.nguyen@intel.com,
qi.z.zhang@intel.com, intel-wired-lan@lists.osuosl.org
Subject: Re: [Intel-wired-lan] [PATCH iwl-next v4 0/5] iavf: Add devlink and devlink rate support
Date: Tue, 22 Aug 2023 08:12:28 +0200 [thread overview]
Message-ID: <ZORRzEBcUDEjMniz@nanopsycho> (raw)
In-Reply-To: <20230822034003.31628-1-wenjun1.wu@intel.com>
Tue, Aug 22, 2023 at 05:39:58AM CEST, wenjun1.wu@intel.com wrote:
>To allow user to configure queue bandwidth, devlink port support
>is added to support devlink port rate API. [1]
>
>Add devlink framework registration/unregistration on iavf driver
>initialization and remove, and devlink port of DEVLINK_PORT_FLAVOUR_VIRTUAL
>is created to be associated iavf netdevice.
>
>iavf rate tree with root node, queue nodes, and leaf node is created
>and registered with devlink rate when iavf adapter is configured, and
>if PF indicates support of VIRTCHNL_VF_OFFLOAD_QOS through VF Resource /
>Capability Exchange.
NACK! Port function is there to configure the VF/SF from the eswitch
side. Yet you use it for the configureation of the actual VF, which is
clear misuse. Please don't
>
>[root@localhost ~]# devlink port function rate show
>pci/0000:af:01.0/txq_15: type node parent iavf_root
>pci/0000:af:01.0/txq_14: type node parent iavf_root
>pci/0000:af:01.0/txq_13: type node parent iavf_root
>pci/0000:af:01.0/txq_12: type node parent iavf_root
>pci/0000:af:01.0/txq_11: type node parent iavf_root
>pci/0000:af:01.0/txq_10: type node parent iavf_root
>pci/0000:af:01.0/txq_9: type node parent iavf_root
>pci/0000:af:01.0/txq_8: type node parent iavf_root
>pci/0000:af:01.0/txq_7: type node parent iavf_root
>pci/0000:af:01.0/txq_6: type node parent iavf_root
>pci/0000:af:01.0/txq_5: type node parent iavf_root
>pci/0000:af:01.0/txq_4: type node parent iavf_root
>pci/0000:af:01.0/txq_3: type node parent iavf_root
>pci/0000:af:01.0/txq_2: type node parent iavf_root
>pci/0000:af:01.0/txq_1: type node parent iavf_root
>pci/0000:af:01.0/txq_0: type node parent iavf_root
>pci/0000:af:01.0/iavf_root: type node
>
>
> +---------+
> | root |
> +----+----+
> |
> |-----------------|-----------------|
> +----v----+ +----v----+ +----v----+
> | txq_0 | | txq_1 | | txq_x |
> +----+----+ +----+----+ +----+----+
>
>User can configure the tx_max and tx_share of each queue. Once any one of the
>queues are fully configured, VIRTCHNL opcodes of VIRTCHNL_OP_CONFIG_QUEUE_BW
>and VIRTCHNL_OP_CONFIG_QUANTA will be sent to PF to configure queues allocated
>to VF
>
>Example:
>
>1.To Set the queue tx_share:
>devlink port function rate set pci/0000:af:01.0 txq_0 tx_share 100 MBps
>
>2.To Set the queue tx_max:
>devlink port function rate set pci/0000:af:01.0 txq_0 tx_max 200 MBps
>
>3.To Show Current devlink port rate info:
>devlink port function rate function show
>[root@localhost ~]# devlink port function rate show
>pci/0000:af:01.0/txq_15: type node parent iavf_root
>pci/0000:af:01.0/txq_14: type node parent iavf_root
>pci/0000:af:01.0/txq_13: type node parent iavf_root
>pci/0000:af:01.0/txq_12: type node parent iavf_root
>pci/0000:af:01.0/txq_11: type node parent iavf_root
>pci/0000:af:01.0/txq_10: type node parent iavf_root
>pci/0000:af:01.0/txq_9: type node parent iavf_root
>pci/0000:af:01.0/txq_8: type node parent iavf_root
>pci/0000:af:01.0/txq_7: type node parent iavf_root
>pci/0000:af:01.0/txq_6: type node parent iavf_root
>pci/0000:af:01.0/txq_5: type node parent iavf_root
>pci/0000:af:01.0/txq_4: type node parent iavf_root
>pci/0000:af:01.0/txq_3: type node parent iavf_root
>pci/0000:af:01.0/txq_2: type node parent iavf_root
>pci/0000:af:01.0/txq_1: type node parent iavf_root
>pci/0000:af:01.0/txq_0: type node tx_share 800Mbit tx_max 1600Mbit parent iavf_root
>pci/0000:af:01.0/iavf_root: type node
>
>
>[1]https://lore.kernel.org/netdev/20221115104825.172668-1-michal.wilczynski@intel.com/
>
>Change log:
>
>v4:
>- Rearrange the ice_vf_qs_bw structure, put the largest number first
>- Minimize the scope of values
>- Remove the unnecessary brackets
>- Remove the unnecessary memory allocation.
>- Added Error Code and moved devlink registration before aq lock initialization
>- Changed devlink registration for error handling in case of allocation failure
>- Used kcalloc for object array memory allocation and initialization
>- Changed functions & comments for readability
>
>v3:
>- Rebase the code
>- Changed rate node max/share set function description
>- Put variable in local scope
>
>v2:
>- Change static array to flex array
>- Use struct_size helper
>- Align all the error code types in the function
>- Move the register field definitions to the right place in the file
>- Fix coding style
>- Adapted to queue bw cfg and qos cap list virtchnl message with flex array fields
>---
>
>Jun Zhang (3):
> iavf: Add devlink and devlink port support
> iavf: Add devlink port function rate API support
> iavf: Add VIRTCHNL Opcodes Support for Queue bw Setting
>
>Wenjun Wu (2):
> virtchnl: support queue rate limit and quanta size configuration
> ice: Support VF queue rate limit and quanta size configuration
>
> drivers/net/ethernet/intel/Kconfig | 1 +
> drivers/net/ethernet/intel/iavf/Makefile | 2 +-
> drivers/net/ethernet/intel/iavf/iavf.h | 19 +
> .../net/ethernet/intel/iavf/iavf_devlink.c | 377 ++++++++++++++++++
> .../net/ethernet/intel/iavf/iavf_devlink.h | 38 ++
> drivers/net/ethernet/intel/iavf/iavf_main.c | 64 ++-
> .../net/ethernet/intel/iavf/iavf_virtchnl.c | 231 ++++++++++-
> drivers/net/ethernet/intel/ice/ice.h | 2 +
> drivers/net/ethernet/intel/ice/ice_base.c | 2 +
> drivers/net/ethernet/intel/ice/ice_common.c | 19 +
> .../net/ethernet/intel/ice/ice_hw_autogen.h | 8 +
> drivers/net/ethernet/intel/ice/ice_txrx.h | 2 +
> drivers/net/ethernet/intel/ice/ice_type.h | 1 +
> drivers/net/ethernet/intel/ice/ice_vf_lib.h | 9 +
> drivers/net/ethernet/intel/ice/ice_virtchnl.c | 310 ++++++++++++++
> drivers/net/ethernet/intel/ice/ice_virtchnl.h | 11 +
> .../intel/ice/ice_virtchnl_allowlist.c | 6 +
> include/linux/avf/virtchnl.h | 119 ++++++
> 18 files changed, 1218 insertions(+), 3 deletions(-)
> create mode 100644 drivers/net/ethernet/intel/iavf/iavf_devlink.c
> create mode 100644 drivers/net/ethernet/intel/iavf/iavf_devlink.h
>
>--
>2.34.1
>
>
_______________________________________________
Intel-wired-lan mailing list
Intel-wired-lan@osuosl.org
https://lists.osuosl.org/mailman/listinfo/intel-wired-lan
next prev parent reply other threads:[~2023-08-22 6:12 UTC|newest]
Thread overview: 64+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-07-27 2:10 [Intel-wired-lan] [PATCH iwl-next v1 0/5] iavf: Add devlink and devlink rate support Wenjun Wu
2023-07-27 2:10 ` [Intel-wired-lan] [PATCH iwl-next v1 1/5] virtchnl: support queue rate limit and quanta size configuration Wenjun Wu
2023-07-31 22:22 ` Tony Nguyen
2023-08-01 9:24 ` Wu, Wenjun1
2023-07-27 2:10 ` [Intel-wired-lan] [PATCH iwl-next v1 2/5] ice: Support VF " Wenjun Wu
2023-07-31 22:23 ` Tony Nguyen
2023-08-01 9:30 ` Wu, Wenjun1
2023-07-27 2:10 ` [Intel-wired-lan] [PATCH iwl-next v1 3/5] iavf: Add devlink and devlink port support Wenjun Wu
2023-07-27 2:10 ` [Intel-wired-lan] [PATCH iwl-next v1 4/5] iavf: Add devlink port function rate API support Wenjun Wu
2023-07-27 2:10 ` [Intel-wired-lan] [PATCH iwl-next v1 5/5] iavf: Add VIRTCHNL Opcodes Support for Queue bw Setting Wenjun Wu
2023-07-31 22:21 ` [Intel-wired-lan] [PATCH iwl-next v1 0/5] iavf: Add devlink and devlink rate support Tony Nguyen
2023-08-01 18:43 ` Zhang, Xuejun
2023-08-08 1:57 ` [Intel-wired-lan] [PATCH iwl-next v2 " Wenjun Wu
2023-08-08 1:57 ` [Intel-wired-lan] [PATCH iwl-next v2 1/5] virtchnl: support queue rate limit and quanta size configuration Wenjun Wu
2023-08-08 1:57 ` [Intel-wired-lan] [PATCH iwl-next v2 2/5] ice: Support VF " Wenjun Wu
2023-08-16 16:54 ` Brett Creeley
2023-08-08 1:57 ` [Intel-wired-lan] [PATCH iwl-next v2 3/5] iavf: Add devlink and devlink port support Wenjun Wu
2023-08-16 17:11 ` Brett Creeley
2023-08-08 1:57 ` [Intel-wired-lan] [PATCH iwl-next v2 4/5] iavf: Add devlink port function rate API support Wenjun Wu
2023-08-08 20:49 ` Simon Horman
2023-08-09 18:43 ` Zhang, Xuejun
2023-08-16 17:27 ` Brett Creeley
2023-08-08 1:57 ` [Intel-wired-lan] [PATCH iwl-next v2 5/5] iavf: Add VIRTCHNL Opcodes Support for Queue bw Setting Wenjun Wu
2023-08-08 20:54 ` Simon Horman
2023-08-09 18:44 ` Zhang, Xuejun
2023-08-16 17:32 ` Brett Creeley
2023-08-16 3:33 ` [Intel-wired-lan] [PATCH iwl-next v3 0/5] iavf: Add devlink and devlink rate support Wenjun Wu
2023-08-16 3:33 ` [Intel-wired-lan] [PATCH iwl-next v3 1/5] virtchnl: support queue rate limit and quanta size configuration Wenjun Wu
2023-08-16 3:33 ` [Intel-wired-lan] [PATCH iwl-next v3 2/5] ice: Support VF " Wenjun Wu
2023-08-16 3:33 ` [Intel-wired-lan] [PATCH iwl-next v3 3/5] iavf: Add devlink and devlink port support Wenjun Wu
2023-08-16 3:33 ` [Intel-wired-lan] [PATCH iwl-next v3 4/5] iavf: Add devlink port function rate API support Wenjun Wu
2023-08-16 3:33 ` [Intel-wired-lan] [PATCH iwl-next v3 5/5] iavf: Add VIRTCHNL Opcodes Support for Queue bw Setting Wenjun Wu
2023-08-16 9:14 ` Simon Horman
2023-08-22 3:39 ` [Intel-wired-lan] [PATCH iwl-next v4 0/5] iavf: Add devlink and devlink rate support Wenjun Wu
2023-08-22 3:39 ` [Intel-wired-lan] [PATCH iwl-next v4 1/5] virtchnl: support queue rate limit and quanta size configuration Wenjun Wu
2023-08-22 3:40 ` [Intel-wired-lan] [PATCH iwl-next v4 2/5] ice: Support VF " Wenjun Wu
2023-08-22 3:40 ` [Intel-wired-lan] [PATCH iwl-next v4 3/5] iavf: Add devlink and devlink port support Wenjun Wu
2023-08-22 3:40 ` [Intel-wired-lan] [PATCH iwl-next v4 4/5] iavf: Add devlink port function rate API support Wenjun Wu
2023-08-22 3:40 ` [Intel-wired-lan] [PATCH iwl-next v4 5/5] iavf: Add VIRTCHNL Opcodes Support for Queue bw Setting Wenjun Wu
2023-08-22 6:12 ` Jiri Pirko [this message]
2023-08-22 15:12 ` [Intel-wired-lan] [PATCH iwl-next v4 0/5] iavf: Add devlink and devlink rate support Jakub Kicinski
2023-08-22 15:34 ` [Intel-wired-lan] [PATCH iwl-next v4 0/5] iavf: Add devlink and devlink rate support' Jiri Pirko
2023-08-23 19:13 ` Zhang, Xuejun
2023-08-24 7:04 ` Jiri Pirko
2023-08-28 22:46 ` Zhang, Xuejun
2023-11-17 5:52 ` Zhang, Xuejun
2023-11-17 11:21 ` Jiri Pirko
2023-11-21 9:04 ` Paolo Abeni
2023-11-18 16:48 ` Jakub Kicinski
2023-11-22 22:19 ` Zhang, Xuejun
2023-11-23 3:22 ` Jakub Kicinski
2023-11-28 0:15 ` Zhang, Xuejun
2023-11-28 1:43 ` Jakub Kicinski
2023-12-14 20:29 ` Paolo Abeni
2023-12-15 1:46 ` Jakub Kicinski
2023-12-15 11:06 ` Paolo Abeni
2023-12-15 11:47 ` Paolo Abeni
2023-12-15 12:30 ` Jiri Pirko
2023-12-15 22:41 ` Jakub Kicinski
2023-12-18 20:12 ` Paolo Abeni
2023-12-18 21:33 ` Jakub Kicinski
2023-12-15 12:22 ` Jiri Pirko
2023-10-18 9:05 ` Paolo Abeni
2023-08-23 21:39 ` Zhang, Xuejun
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=ZORRzEBcUDEjMniz@nanopsycho \
--to=jiri@resnulli.us \
--cc=anthony.l.nguyen@intel.com \
--cc=intel-wired-lan@lists.osuosl.org \
--cc=netdev@vger.kernel.org \
--cc=qi.z.zhang@intel.com \
--cc=wenjun1.wu@intel.com \
/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