[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <40590752-8b6f-49d7-886f-a7408030c121@amd.com>
Date: Fri, 14 Feb 2025 11:23:21 -0800
From: Brett Creeley <bcreeley@....com>
To: Mohsin Bashir <mohsin.bashr@...il.com>, netdev@...r.kernel.org
Cc: alexanderduyck@...com, kuba@...nel.org, andrew+netdev@...n.ch,
davem@...emloft.net, edumazet@...gle.com, pabeni@...hat.com,
linux@...linux.org.uk, sanman.p211993@...il.com, vadim.fedorenko@...ux.dev,
suhui@...china.com, horms@...nel.org, sdf@...ichev.me, jdamato@...tly.com,
brett.creeley@....com, przemyslaw.kitszel@...el.com, colin.i.king@...il.com,
kernel-team@...a.com
Subject: Re: [PATCH net-next V2] eth: fbnic: Add ethtool support for IRQ
coalescing
On 2/13/2025 7:50 PM, Mohsin Bashir wrote:
> Caution: This message originated from an External Source. Use proper caution when opening attachments, clicking links, or responding.
>
>
> Add ethtool support to configure the IRQ coalescing behavior. Support
> separate timers for Rx and Tx for time based coalescing. For frame based
> configuration, currently we only support the Rx side.
>
> The hardware allows configuration of descriptor count instead of frame
> count requiring conversion between the two. We assume 2 descriptors
> per frame, one for the metadata and one for the data segment.
>
> When rx-frames are not configured, we set the RX descriptor count to
> half the ring size as a fail safe.
>
> Default configuration:
> ethtool -c eth0 | grep -E "rx-usecs:|tx-usecs:|rx-frames:"
> rx-usecs: 30
> rx-frames: 0
> tx-usecs: 35
>
> IRQ rate test:
> With single iperf flow we monitor IRQ rate while changing the tx-usesc and
> rx-usecs to high and low values.
>
> ethtool -C eth0 rx-frames 8192 rx-usecs 150 tx-usecs 150
> irq/sec 13k
> irq/sec 14k
> irq/sec 14k
>
> ethtool -C eth0 rx-frames 8192 rx-usecs 10 tx-usecs 10
> irq/sec 27k
> irq/sec 28k
> irq/sec 28k
>
> Validating the use of extack:
> ethtool -C eth0 rx-frames 16384
> netlink error: fbnic: rx_frames is above device max
> netlink error: Invalid argument
>
> Signed-off-by: Mohsin Bashir <mohsin.bashr@...il.com>
> ---
> V2:
> - Update fbnic_set_coalesce() to use extack to highlight incorrect config
> - Simplify fbnic_config_rx_frames()
> V1: https://lore.kernel.org/netdev/20250212234946.2536116-1-mohsin.bashr@gmail.com
> ---
> drivers/net/ethernet/meta/fbnic/fbnic.h | 3 +
> .../net/ethernet/meta/fbnic/fbnic_ethtool.c | 59 +++++++++++++++++++
> .../net/ethernet/meta/fbnic/fbnic_netdev.c | 4 ++
> .../net/ethernet/meta/fbnic/fbnic_netdev.h | 6 ++
> drivers/net/ethernet/meta/fbnic/fbnic_txrx.c | 53 ++++++++++++++---
> drivers/net/ethernet/meta/fbnic/fbnic_txrx.h | 3 +
> 6 files changed, 120 insertions(+), 8 deletions(-)
>
LGTM.
Reviewed-by: Brett Creeley <brett.creeley@....com>
<snip>
Powered by blists - more mailing lists