All of lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Horman <horms@kernel.org>
To: Mohsin Bashir <mohsin.bashr@gmail.com>
Cc: netdev@vger.kernel.org, kuba@kernel.org, alexanderduyck@fb.com,
	andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com,
	pabeni@redhat.com, vadim.fedorenko@linux.dev, jdamato@fastly.com,
	sdf@fomichev.me, aleksander.lobakin@intel.com, ast@kernel.org,
	daniel@iogearbox.net, hawk@kernel.org, john.fastabend@gmail.com
Subject: Re: [PATCH net-next 8/9] eth: fbnic: Collect packet statistics for XDP
Date: Thu, 24 Jul 2025 11:18:22 +0100	[thread overview]
Message-ID: <20250724101822.GJ1150792@horms.kernel.org> (raw)
In-Reply-To: <20250723145926.4120434-9-mohsin.bashr@gmail.com>

On Wed, Jul 23, 2025 at 07:59:25AM -0700, Mohsin Bashir wrote:
> Add support for XDP statistics collection and reporting via rtnl_link
> and netdev_queue API.
> 
> For XDP programs without frags support, fbnic requires MTU to be less
> than the HDS threshold. If an over-sized frame is received, the frame
> is dropped and recorded as rx_length_errors reported via ip stats to
> highlight that this is an error.
> 
> Signed-off-by: Jakub Kicinski <kuba@kernel.org>
> Signed-off-by: Mohsin Bashir <mohsin.bashr@gmail.com>
> ---
>  .../device_drivers/ethernet/meta/fbnic.rst    | 10 +++++
>  .../net/ethernet/meta/fbnic/fbnic_netdev.c    | 30 +++++++++++++
>  drivers/net/ethernet/meta/fbnic/fbnic_txrx.c  | 44 +++++++++++++++++--
>  drivers/net/ethernet/meta/fbnic/fbnic_txrx.h  |  1 +
>  4 files changed, 82 insertions(+), 3 deletions(-)
> 
> diff --git a/Documentation/networking/device_drivers/ethernet/meta/fbnic.rst b/Documentation/networking/device_drivers/ethernet/meta/fbnic.rst
> index afb8353daefd..ad5e2cba7afc 100644
> --- a/Documentation/networking/device_drivers/ethernet/meta/fbnic.rst
> +++ b/Documentation/networking/device_drivers/ethernet/meta/fbnic.rst
> @@ -160,3 +160,13 @@ behavior and potential performance bottlenecks.
>  	  credit exhaustion
>          - ``pcie_ob_rd_no_np_cred``: Read requests dropped due to non-posted
>  	  credit exhaustion
> +
> +XDP Length Error:
> +~~~~~~~~~~~~~~~~~
> +
> +For XDP programs without frags support, fbnic tries to make sure that MTU fits
> +into a single buffer. If an oversized frame is received and gets fragmented,
> +it is dropped and the following netlink counters are updated
> +   - ``rx-length``: number of frames dropped due to lack of fragmentation
> +   support in the attached XDP program
> +   - ``rx-errors``: total number of packets with errors received on the interface

Hi Mohsin,

make hmtldocs complains a bit about this:

  .../fbnic.rst:170: ERROR: Unexpected indentation. [docutils]
  .../fbnic.rst:171: WARNING: Bullet list ends without a blank line; unexpected unindent. [docutils]

Empirically, and I admit there was much trial and error involved,
I was able to address this by:
* adding a blank before the start of the list
* updating the indentation of the follow-on line of the first entry of the list

Your mileage may vary.

diff --git a/Documentation/networking/device_drivers/ethernet/meta/fbnic.rst b/Documentation/networking/device_drivers/ethernet/meta/fbnic.rst
index ad5e2cba7afc..fb6559fa4be4 100644
--- a/Documentation/networking/device_drivers/ethernet/meta/fbnic.rst
+++ b/Documentation/networking/device_drivers/ethernet/meta/fbnic.rst
@@ -167,6 +167,7 @@ XDP Length Error:
 For XDP programs without frags support, fbnic tries to make sure that MTU fits
 into a single buffer. If an oversized frame is received and gets fragmented,
 it is dropped and the following netlink counters are updated
+
    - ``rx-length``: number of frames dropped due to lack of fragmentation
-   support in the attached XDP program
+     support in the attached XDP program
    - ``rx-errors``: total number of packets with errors received on the interface

  reply	other threads:[~2025-07-24 10:18 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-23 14:59 [PATCH net-next 0/9] eth: fbnic Add XDP support for fbnic Mohsin Bashir
2025-07-23 14:59 ` [PATCH net-next 1/9] eth: fbnic: Add support for HDS configuration Mohsin Bashir
2025-07-23 14:59 ` [PATCH net-next 2/9] eth: fbnic: Update Headroom Mohsin Bashir
2025-07-23 14:59 ` [PATCH net-next 3/9] eth: fbnic: Use shinfo to track frags state on Rx Mohsin Bashir
2025-07-23 14:59 ` [PATCH net-next 4/9] eth: fbnic: Prefetch packet headers " Mohsin Bashir
2025-07-23 14:59 ` [PATCH net-next 5/9] eth: fbnic: Add XDP pass, drop, abort support Mohsin Bashir
2025-07-23 17:35   ` Maciej Fijalkowski
2025-07-24 15:47     ` Mohsin Bashir
2025-07-24 16:51       ` Jakub Kicinski
2025-07-24 21:14     ` Alexander H Duyck
2025-07-25  9:56       ` Maciej Fijalkowski
2025-07-25 15:10         ` Alexander Duyck
2025-08-07 21:24           ` Mohsin Bashir
2025-07-23 14:59 ` [PATCH net-next 6/9] eth: fbnic: Add support for XDP queues Mohsin Bashir
2025-07-23 23:54   ` Jakub Kicinski
2025-07-23 14:59 ` [PATCH net-next 7/9] eth: fbnic: Add support for XDP_TX action Mohsin Bashir
2025-07-23 14:59 ` [PATCH net-next 8/9] eth: fbnic: Collect packet statistics for XDP Mohsin Bashir
2025-07-24 10:18   ` Simon Horman [this message]
2025-07-24 15:48     ` Mohsin Bashir
2025-07-23 14:59 ` [PATCH net-next 9/9] eth: fbnic: Report XDP stats via ethtool Mohsin Bashir

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=20250724101822.GJ1150792@horms.kernel.org \
    --to=horms@kernel.org \
    --cc=aleksander.lobakin@intel.com \
    --cc=alexanderduyck@fb.com \
    --cc=andrew+netdev@lunn.ch \
    --cc=ast@kernel.org \
    --cc=daniel@iogearbox.net \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hawk@kernel.org \
    --cc=jdamato@fastly.com \
    --cc=john.fastabend@gmail.com \
    --cc=kuba@kernel.org \
    --cc=mohsin.bashr@gmail.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=sdf@fomichev.me \
    --cc=vadim.fedorenko@linux.dev \
    /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.