From: Andrew Lunn <andrew@lunn.ch>
To: Guangbin Huang <huangguangbin2@huawei.com>
Cc: davem@davemloft.net, kuba@kernel.org, mkubecek@suse.cz,
amitc@mellanox.com, idosch@idosch.org, danieller@nvidia.com,
jesse.brandeburg@intel.com, anthony.l.nguyen@intel.com,
jdike@addtoit.com, richard@nod.at,
anton.ivanov@cambridgegreys.com, netanel@amazon.com,
akiyano@amazon.com, gtzalik@amazon.com, saeedb@amazon.com,
chris.snook@gmail.com, ulli.kroll@googlemail.com,
linus.walleij@linaro.org, jeroendb@google.com, csully@google.com,
awogbemila@google.com, jdmason@kudzu.us,
rain.1986.08.12@gmail.com, zyjzyj2000@gmail.com,
kys@microsoft.com, haiyangz@microsoft.com, mst@redhat.com,
jasowang@redhat.com, doshir@vmware.com, pv-drivers@vmware.com,
jwi@linux.ibm.com, kgraul@linux.ibm.com, hca@linux.ibm.com,
gor@linux.ibm.com, johannes@sipsolutions.net,
netdev@vger.kernel.org, lipeng321@huawei.com,
chenhao288@hisilicon.com, linux-s390@vger.kernel.org
Subject: Re: [PATCH V5 net-next 5/6] net: hns3: add support to set/get rx buf len via ethtool for hns3 driver
Date: Sat, 30 Oct 2021 20:04:21 +0200 [thread overview]
Message-ID: <YX2JJSQBRFjhmQsx@lunn.ch> (raw)
In-Reply-To: <20211030131001.38739-6-huangguangbin2@huawei.com>
> static int hns3_check_ringparam(struct net_device *ndev,
> - struct ethtool_ringparam *param)
> + struct ethtool_ringparam *param,
> + struct kernel_ethtool_ringparam *kernel_param)
> {
> +#define RX_BUF_LEN_2K 2048
> +#define RX_BUF_LEN_4K 4096
include/linux/size.h
#define SZ_2K 0x00000800
#define SZ_4K 0x00001000
> if (hns3_nic_resetting(ndev))
> return -EBUSY;
>
> if (param->rx_mini_pending || param->rx_jumbo_pending)
> return -EINVAL;
>
> + if (kernel_param->rx_buf_len != RX_BUF_LEN_2K &&
> + kernel_param->rx_buf_len != RX_BUF_LEN_4K) {
> + netdev_err(ndev, "Rx buf len only support 2048 and 4096\n");
> + return -EINVAL;
Same question i asked in the cover note. MTU is 4K, i set rx buf len
to 2K. What happens? Should there be an EINVAL here?
Andrew
next prev parent reply other threads:[~2021-10-30 18:04 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-10-30 13:09 [PATCH V5 net-next 0/6] ethtool: add support to set/get tx copybreak buf size and rx buf len Guangbin Huang
2021-10-30 13:09 ` [PATCH V5 net-next 1/6] ethtool: add support to set/get tx copybreak buf size via ethtool Guangbin Huang
2021-10-30 13:09 ` [PATCH V5 net-next 2/6] net: hns3: add support to set/get tx copybreak buf size via ethtool for hns3 driver Guangbin Huang
2021-10-30 13:09 ` [PATCH V5 net-next 3/6] ethtool: add support to set/get rx buf len via ethtool Guangbin Huang
2021-10-30 13:09 ` [PATCH V5 net-next 4/6] ethtool: extend ringparam setting/getting API with rx_buf_len Guangbin Huang
2021-10-30 22:10 ` kernel test robot
2021-11-01 11:35 ` kernel test robot
2021-10-30 13:10 ` [PATCH V5 net-next 5/6] net: hns3: add support to set/get rx buf len via ethtool for hns3 driver Guangbin Huang
2021-10-30 18:04 ` Andrew Lunn [this message]
2021-10-30 13:10 ` [PATCH V5 net-next 6/6] net: hns3: remove the way to set tx spare buf via module parameter Guangbin Huang
2021-10-30 18:05 ` Andrew Lunn
2021-11-01 3:43 ` huangguangbin (A)
2021-10-30 17:58 ` [PATCH V5 net-next 0/6] ethtool: add support to set/get tx copybreak buf size and rx buf len Andrew Lunn
2021-11-01 3:42 ` huangguangbin (A)
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=YX2JJSQBRFjhmQsx@lunn.ch \
--to=andrew@lunn.ch \
--cc=akiyano@amazon.com \
--cc=amitc@mellanox.com \
--cc=anthony.l.nguyen@intel.com \
--cc=anton.ivanov@cambridgegreys.com \
--cc=awogbemila@google.com \
--cc=chenhao288@hisilicon.com \
--cc=chris.snook@gmail.com \
--cc=csully@google.com \
--cc=danieller@nvidia.com \
--cc=davem@davemloft.net \
--cc=doshir@vmware.com \
--cc=gor@linux.ibm.com \
--cc=gtzalik@amazon.com \
--cc=haiyangz@microsoft.com \
--cc=hca@linux.ibm.com \
--cc=huangguangbin2@huawei.com \
--cc=idosch@idosch.org \
--cc=jasowang@redhat.com \
--cc=jdike@addtoit.com \
--cc=jdmason@kudzu.us \
--cc=jeroendb@google.com \
--cc=jesse.brandeburg@intel.com \
--cc=johannes@sipsolutions.net \
--cc=jwi@linux.ibm.com \
--cc=kgraul@linux.ibm.com \
--cc=kuba@kernel.org \
--cc=kys@microsoft.com \
--cc=linus.walleij@linaro.org \
--cc=linux-s390@vger.kernel.org \
--cc=lipeng321@huawei.com \
--cc=mkubecek@suse.cz \
--cc=mst@redhat.com \
--cc=netanel@amazon.com \
--cc=netdev@vger.kernel.org \
--cc=pv-drivers@vmware.com \
--cc=rain.1986.08.12@gmail.com \
--cc=richard@nod.at \
--cc=saeedb@amazon.com \
--cc=ulli.kroll@googlemail.com \
--cc=zyjzyj2000@gmail.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.