Thread (14 messages) 14 messages, 4 authors, 2021-09-29

Re: [PATCH V2 net-next 3/6] ethtool: add support to set/get rx buf len via ethtool

flat view

From: huangguangbin (A) <hidden>
Date: 2021-09-29 02:33:31
Also in: linux-s390


On 2021/9/25 7:14, Michal Kubecek wrote:
On Fri, Sep 24, 2021 at 10:29:56PM +0800, Guangbin Huang wrote:
quoted
From: Hao Chen <redacted>

Add support to set rx buf len via ethtool -G parameter and get
rx buf len via ethtool -g parameter.

Signed-off-by: Hao Chen <redacted>
Signed-off-by: Guangbin Huang <redacted>
---
  Documentation/networking/ethtool-netlink.rst |  2 ++
  include/linux/ethtool.h                      | 18 ++++++++++++++++--
  include/uapi/linux/ethtool.h                 |  8 ++++++++
  include/uapi/linux/ethtool_netlink.h         |  1 +
  net/ethtool/netlink.h                        |  2 +-
  net/ethtool/rings.c                          | 17 ++++++++++++++++-
  6 files changed, 44 insertions(+), 4 deletions(-)
diff --git a/Documentation/networking/ethtool-netlink.rst b/Documentation/networking/ethtool-netlink.rst
index a47b0255aaf9..9734b7c1e05d 100644
--- a/Documentation/networking/ethtool-netlink.rst
+++ b/Documentation/networking/ethtool-netlink.rst
@@ -841,6 +841,7 @@ Kernel response contents:
    ``ETHTOOL_A_RINGS_RX_MINI``           u32     size of RX mini ring
    ``ETHTOOL_A_RINGS_RX_JUMBO``          u32     size of RX jumbo ring
    ``ETHTOOL_A_RINGS_TX``                u32     size of TX ring
+  ``ETHTOOL_A_RINGS_RX_BUF_LEN``        u32     size of buffers on the ring
    ====================================  ======  ==========================
  
  
@@ -857,6 +858,7 @@ Request contents:
    ``ETHTOOL_A_RINGS_RX_MINI``           u32     size of RX mini ring
    ``ETHTOOL_A_RINGS_RX_JUMBO``          u32     size of RX jumbo ring
    ``ETHTOOL_A_RINGS_TX``                u32     size of TX ring
+  ``ETHTOOL_A_RINGS_RX_BUF_LEN``        u32     size of buffers on the ring
    ====================================  ======  ==========================
  
  Kernel checks that requested ring sizes do not exceed limits reported by
Would it make sense to let driver report also maximum supported value
like it does for existing ring parameters (ring sizes)?

Michal
We think it have no sense to report maximum supported value.
Rx buf len of hns3 driver only supports 2048 and 4096 at present, they are
discrete value and checked by driver.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help