[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <pj41zledq742hf.fsf@u570694869fb251.ant.amazon.com>
Date: Thu, 2 Mar 2023 16:23:59 +0200
From: Shay Agroskin <shayagr@...zon.com>
To: Jakub Kicinski <kuba@...nel.org>
CC: David Miller <davem@...emloft.net>, <netdev@...r.kernel.org>,
"Woodhouse, David" <dwmw@...zon.com>,
"Machulsky, Zorik" <zorik@...zon.com>,
"Matushevsky, Alexander" <matua@...zon.com>,
Saeed Bshara <saeedb@...zon.com>,
"Wilson, Matt" <msw@...zon.com>,
"Liguori, Anthony" <aliguori@...zon.com>,
"Bshara, Nafea" <nafea@...zon.com>,
"Belgazal, Netanel" <netanel@...zon.com>,
"Saidi, Ali" <alisaidi@...zon.com>,
"Herrenschmidt, Benjamin" <benh@...zon.com>,
"Kiyanovski, Arthur" <akiyano@...zon.com>,
"Dagan, Noam" <ndagan@...zon.com>,
"Arinzon, David" <darinzon@...zon.com>,
"Itzko, Shahar" <itzko@...zon.com>,
"Abboud, Osama" <osamaabb@...zon.com>
Subject: Re: [PATCH RFC v1 net-next 1/5] ethtool: Add support for
configuring tx_push_buf_len
Jakub Kicinski <kuba@...nel.org> writes:
> On Wed, 1 Mar 2023 19:59:12 +0200 Shay Agroskin wrote:
>> @@ -98,7 +100,12 @@ static int rings_fill_reply(struct sk_buff
>> *skb,
>> (kr->cqe_size &&
>> (nla_put_u32(skb, ETHTOOL_A_RINGS_CQE_SIZE,
>> kr->cqe_size))) ||
>> nla_put_u8(skb, ETHTOOL_A_RINGS_TX_PUSH,
>> !!kr->tx_push) ||
>> - nla_put_u8(skb, ETHTOOL_A_RINGS_RX_PUSH,
>> !!kr->rx_push))
>> + nla_put_u8(skb, ETHTOOL_A_RINGS_RX_PUSH,
>> !!kr->rx_push) ||
>> + (kr->tx_push_buf_len &&
>> + (nla_put_u32(skb,
>> ETHTOOL_A_RINGS_TX_PUSH_BUF_LEN_MAX,
>> + kr->tx_push_buf_max_len) ||
>> + nla_put_u32(skb, ETHTOOL_A_RINGS_TX_PUSH_BUF_LEN,
>> + kr->tx_push_buf_len))))
>
> Why gate both on kr->tx_push_buf_len and not current and max
> separately?
> Is kr->tx_push_buf_len == 0 never a valid setting?
>
Hi, thanks for reviewing it
There's actually no requirement that tx_push_buf_len needs to be >
0. I'll drop this check.
It seems like the reply object gets zeroed at
ethnl_init_reply_data() so ENA can simply not touch this field if
no push buffer exists, leaving the values at 0.
> Otherwise LGTM!
>
> Could you add this chunk to expose the value in the YAML spec?
>
> diff --git a/Documentation/netlink/specs/ethtool.yaml
> b/Documentation/netlink/specs/ethtool.yaml
> index 35c462bce56f..2dd6aef582e4 100644
> --- a/Documentation/netlink/specs/ethtool.yaml
> +++ b/Documentation/netlink/specs/ethtool.yaml
> @@ -163,6 +163,12 @@ doc: Partial family for Ethtool Netlink.
> -
> name: rx-push
> type: u8
> + -
> + name: tx-push-buf-len
> + type: u32
> + -
> + name: tx-push-buf-len-max
> + type: u32
>
> -
> name: mm-stat
> @@ -309,6 +315,8 @@ doc: Partial family for Ethtool Netlink.
> - cqe-size
> - tx-push
> - rx-push
> + - tx-push-buf-len
> + - tx-push-buf-len-max
> dump: *ring-get-op
> -
> name: rings-set
ack. I'll add it
Powered by blists - more mailing lists