Subject: RE: [PATCH V1 net-next 5/5] net: ena: Add devlink documentation

From: "Arinzon, David" <[email-masked]>
Date: Tue, 10 Jan 2023 15:20:55 +0000

Good catch! Thanks.
This will be addressed in the next version of the patchset.

> -----Original Message-----
> From: Iwashima, Kuniyuki <[email-masked]>
> Sent: Monday, January 9, 2023 8:00 AM
> To: Arinzon, David <[email-masked]>
> Cc: Kiyanovski, Arthur <[email-masked]>; Saidi, Ali
> <[email-masked]>; [email-masked]; Itzko, Shahar
> <[email-masked]>; [email-masked]; Matushevsky, Alexander
> <[email-masked]>; Bshara, Nafea <[email-masked]>; Dagan,
> Noam <[email-masked]>; [email-masked]; Abboud, Osama
> <[email-masked]>; Bshara, Saeed <[email-masked]>;
> Agroskin, Shay <[email-masked]>; Machulsky, Zorik
> <[email-masked]>; Iwashima, Kuniyuki <[email-masked]>
> Subject: Re: [PATCH V1 net-next 5/5] net: ena: Add devlink documentation
> 
> From:   David Arinzon <[email-masked]>
> Date:   Sun, 8 Jan 2023 10:35:33 +0000
> > Update the documentation with a devlink section, the added files, as
> > well as large LLQ enablement.
> >
> > Signed-off-by: Shay Agroskin <[email-masked]>
> > Signed-off-by: David Arinzon <[email-masked]>
> > ---
> >  .../device_drivers/ethernet/amazon/ena.rst    | 30
> +++++++++++++++++++
> 
> Each driver's devlink doc exists under Documentation/networking/devlink/
> and linked from index.html there.
> 
> We should duplicate this doc under Documentation/networking/devlink/
> or link from the index.html ?
> 
> 
> >  1 file changed, 30 insertions(+)
> >
> > diff --git
> > a/Documentation/networking/device_drivers/ethernet/amazon/ena.rst
> > b/Documentation/networking/device_drivers/ethernet/amazon/ena.rst
> > index 8bcb173e0353..1229732a8c91 100644
> > ---
> a/Documentation/networking/device_drivers/ethernet/amazon/ena.rst
> > +++
> b/Documentation/networking/device_drivers/ethernet/amazon/ena.rst
> > @@ -53,6 +53,7 @@ ena_common_defs.h   Common definitions for
> ena_com layer.
> >  ena_regs_defs.h     Definition of ENA PCI memory-mapped (MMIO)
> registers.
> >  ena_netdev.[ch]     Main Linux kernel driver.
> >  ena_ethtool.c       ethtool callbacks.
> > +ena_devlink.[ch]    devlink files (see `devlink support`_ for more info)
> >  ena_pci_id_tbl.h    Supported device IDs.
> >  =================
> ======================================================
> >
> > @@ -253,6 +254,35 @@ RSS
> >  - The user can provide a hash key, hash function, and configure the
> >    indirection table through `ethtool(8)`.
> >
> > +.. _`devlink support`:
> > +DEVLINK SUPPORT
> > +===============
> > +.. _`devlink`:
> >
> +https://www.kernel.org/doc/html/latest/networking/devlink/index.html
> > +
> > +`devlink`_ supports toggling LLQ entry size between the default 128
> > +bytes and 256 bytes.
> > +A 128 bytes entry size allows for a maximum of 96 bytes of packet
> > +header size which sometimes is not enough (e.g. when using tunneling).
> > +Increasing LLQ entry size to 256 bytes, allows a maximum header size
> > +of 224 bytes. This comes with the penalty of reducing the number of
> > +LLQ entries in the TX queue by 2 (i.e. from 1024 to 512).
> > +
> > +The entry size can be toggled by enabling/disabling the
> > +large_llq_header devlink param and reloading the driver to make it take
> effect, e.g.
> > +
> > +.. code-block:: shell
> > +
> > +  sudo devlink dev param set pci/0000:00:06.0 name large_llq_header
> > + value true cmode driverinit  sudo devlink dev reload
> > + pci/0000:00:06.0
> > +
> > +One way to verify that the TX queue entry size has indeed increased
> > +is to check that the maximum TX queue depth is 512. This can be
> > +checked, for example, by
> > +using:
> > +
> > +.. code-block:: shell
> > +
> > +  ethtool -g [interface]
> > +
> >  DATA PATH
> >  =========
> >
> > --
> > 2.38.1