Linux kernel source tree
Go to file
David S. Miller c230dc8627 mlx5-updates-2021-10-26
HW-GRO support in mlx5
 
 Beside the HW GRO this series includes two trivial non-mlx5 patches:
  - net: Prevent HW-GRO and LRO features operate together
  - lib: bitmap: Introduce node-aware alloc API
 
 Khalid Manaa Says:
 ==================
 This series implements the HW-GRO offload using the HW feature SHAMPO.
 
 HW-GRO: Hardware offload for the Generic Receive Offload feature.
 
 SHAMPO: Split Headers And Merge Payload Offload.
 
 This feature performs headers data split for each received packed and
 merge the payloads of the packets of the same session.
 
 There are new HW components for this feature:
 
 The headers buffer:
 – cyclic buffer where the packets headers will be located
 
 Reservation buffer:
 – capability to divide RQ WQEs to reservations, a definite size in
   granularity of 4KB, the reservation is used to define the largest segment
   that we can create by packets stitching.
 
 Each reservation will have a session and the new received packet can be merged
 to the session, terminate it, or open a new one according to the match criteria.
 
 When a new packet is received the headers will be written to the headers buffer
 and the data will be written to the reservation, in case the packet matches
 the session the data will be written continuously otherwise it will be written
 after performing an alignment.
 
 SHAMPO RQ, WQ and CQE changes:
 -----------------------------
 RQ (receive queue) new params:
 
  -shampo_no_match_alignment_granularity: the HW alignment granularity in case
   the received packet doesn't match the current session.
 
  -shampo_match_criteria_type: the type of match criteria.
 
  -reservation_timeout: the maximum time that the HW will hold the reservation.
 
  -Each RQ has SKB that represents the current opened flow.
 
 WQ (work queue) new params:
 
  -headers_mkey: mkey that represents the headers buffer, where the packets
   headers will be written by the HW.
 
  -shampo_enable: flag to verify if the WQ supports SHAMPO feature.
 
  -log_reservation_size: the log of the reservation size where the data of
   the packet will be written by the HW.
 
  -log_max_num_of_packets_per_reservation: log of the maximum number of packets
   that can be written to the same reservation.
 
  -log_headers_entry_size: log of the header entry size of the headers buffer.
 
  -log_headers_buffer_entry_num: log of the entries number of the headers buffer.
 
 CQEs (Completion queue entry) SHAMPO fields:
 
  -match: in case it is set, then the current packet matches the opened session.
 
  -flush: in case it is set, the opened session must be flushed.
 
  -header_size: the size of the packet’s headers.
 
  -header_entry_index: the entry index in the headers buffer of the received
   packet headers.
 
  -data_offset: the offset of the received packet data in the WQE.
 
 HW-GRO works as follow:
 ----------------------
 The feature can be enabled on the interface using the ethtool command by
 setting on rx-gro-hw. When the feature is on the mlx5 driver will reopen
 the RQ to support the SHAMPO feature:
 
 Will allocate the headers buffer and fill the parameters regarding the
 reservation and the match criteria.
 
 Receive packet flow:
 
 each RQ will hold SKB that represents the current GRO opened session.
 
 The driver has a new CQE handler mlx5e_handle_rx_cqe_mpwrq_shampo which will
 use the CQE SHAMPO params to extract the location of the packet’s headers
 in the headers buffer and the location of the packets data in the RQ.
 
 Also, the CQE has two flags flush and match that indicate if the current
 packet matches the current session or not and if we need to close the session.
 
 In case there is an opened session, and we receive a matched packet then the
 handler will merge the packet's payload to the current SKB, in case we receive
 no match then the handler will flush the SKB and create a new one for the new packet.
 
 In case the flash flag is set then the driver will close the session, the SKB
 will be passed to the network stack.
 
 In case the driver merges packets in the SKB, before passing the SKB to the network
 stack the driver will update the checksum of the packet’s headers.
 
 SKB build:
 ---------
 The driver will build a new SKB in the following situations:
 in case there is no current opened session.
 In case the current packet doesn’t match the current session.
 In case there is no place to add the packets data to the SKB that represents the
 current session.
 
 Otherwise, the driver will add the packet’s data to the SKB.
 
 When the driver builds a new SKB, the linear area will contain only the packet headers
 and the data will be added to the SKB fragments.
 
 In case the entry size of the headers buffer is sufficient to build the SKB
 it will be used, otherwise the driver will allocate new memory to build the SKB.
 
 ==================
 -----BEGIN PGP SIGNATURE-----
 
 iQEzBAABCAAdFiEEGhZs6bAKwk/OTgTpSD+KveBX+j4FAmF4udIACgkQSD+KveBX
 +j7XBgf+OOLEJrYrbQpffdZQksn37oT98XrsGAoPbcxhaqioH+yErcVPdVyK8lEK
 sERyRkjAn4+2svp15aM7VM/JSN/JbikVWY9DQ5joCVmeJ9wIKttAACybM+VmT8tw
 0RBW+XfXyAmGzlV260/MuO4tzCfyrXuCEw0jDyBgxKyFX2aIvzll64ehryv4tbFq
 tc6P60FuM9E9YTvtXY4KHYx1taIzpOOQ6FjEx4UgvcLiARmuWTYR+Gs872A/NUKb
 9KEyz+wSnX2QzpHXXVr6EP9kVzAUqlBYRYtNc55cWpcOn8zqep4T/AFr3BtB02mJ
 NylP3+EktqBV8ISNRr5QtoY95GLWcQ==
 =v8rX
 -----END PGP SIGNATURE-----

Merge tag 'mlx5-updates-2021-10-26' of git://git.kernel.org/pub/scm/linux/kernel/git/saeed/linux

Saeed Mahameed says:

====================
mlx5-updates-2021-10-26

HW-GRO support in mlx5

Beside the HW GRO this series includes two trivial non-mlx5 patches:
 - net: Prevent HW-GRO and LRO features operate together
 - lib: bitmap: Introduce node-aware alloc API

Khalid Manaa Says:
==================
This series implements the HW-GRO offload using the HW feature SHAMPO.

HW-GRO: Hardware offload for the Generic Receive Offload feature.

SHAMPO: Split Headers And Merge Payload Offload.

This feature performs headers data split for each received packed and
merge the payloads of the packets of the same session.

There are new HW components for this feature:

The headers buffer:
– cyclic buffer where the packets headers will be located

Reservation buffer:
– capability to divide RQ WQEs to reservations, a definite size in
  granularity of 4KB, the reservation is used to define the largest segment
  that we can create by packets stitching.

Each reservation will have a session and the new received packet can be merged
to the session, terminate it, or open a new one according to the match criteria.

When a new packet is received the headers will be written to the headers buffer
and the data will be written to the reservation, in case the packet matches
the session the data will be written continuously otherwise it will be written
after performing an alignment.

SHAMPO RQ, WQ and CQE changes:
-----------------------------
RQ (receive queue) new params:

 -shampo_no_match_alignment_granularity: the HW alignment granularity in case
  the received packet doesn't match the current session.

 -shampo_match_criteria_type: the type of match criteria.

 -reservation_timeout: the maximum time that the HW will hold the reservation.

 -Each RQ has SKB that represents the current opened flow.

WQ (work queue) new params:

 -headers_mkey: mkey that represents the headers buffer, where the packets
  headers will be written by the HW.

 -shampo_enable: flag to verify if the WQ supports SHAMPO feature.

 -log_reservation_size: the log of the reservation size where the data of
  the packet will be written by the HW.

 -log_max_num_of_packets_per_reservation: log of the maximum number of packets
  that can be written to the same reservation.

 -log_headers_entry_size: log of the header entry size of the headers buffer.

 -log_headers_buffer_entry_num: log of the entries number of the headers buffer.

CQEs (Completion queue entry) SHAMPO fields:

 -match: in case it is set, then the current packet matches the opened session.

 -flush: in case it is set, the opened session must be flushed.

 -header_size: the size of the packet’s headers.

 -header_entry_index: the entry index in the headers buffer of the received
  packet headers.

 -data_offset: the offset of the received packet data in the WQE.

HW-GRO works as follow:
----------------------
The feature can be enabled on the interface using the ethtool command by
setting on rx-gro-hw. When the feature is on the mlx5 driver will reopen
the RQ to support the SHAMPO feature:

Will allocate the headers buffer and fill the parameters regarding the
reservation and the match criteria.

Receive packet flow:

each RQ will hold SKB that represents the current GRO opened session.

The driver has a new CQE handler mlx5e_handle_rx_cqe_mpwrq_shampo which will
use the CQE SHAMPO params to extract the location of the packet’s headers
in the headers buffer and the location of the packets data in the RQ.

Also, the CQE has two flags flush and match that indicate if the current
packet matches the current session or not and if we need to close the session.

In case there is an opened session, and we receive a matched packet then the
handler will merge the packet's payload to the current SKB, in case we receive
no match then the handler will flush the SKB and create a new one for the new packet.

In case the flash flag is set then the driver will close the session, the SKB
will be passed to the network stack.

In case the driver merges packets in the SKB, before passing the SKB to the network
stack the driver will update the checksum of the packet’s headers.

SKB build:
---------
The driver will build a new SKB in the following situations:
in case there is no current opened session.
In case the current packet doesn’t match the current session.
In case there is no place to add the packets data to the SKB that represents the
current session.

Otherwise, the driver will add the packet’s data to the SKB.

When the driver builds a new SKB, the linear area will contain only the packet headers
and the data will be added to the SKB fragments.

In case the entry size of the headers buffer is sufficient to build the SKB
it will be used, otherwise the driver will allocate new memory to build the SKB.

==================

====================

Signed-off-by: David S. Miller <davem@davemloft.net>
2021-10-27 14:39:57 +01:00
arch s390/qeth: move qdio's QAOB cache into qeth 2021-10-25 13:58:19 +01:00
block block-5.15-2021-10-17 2021-10-17 19:25:20 -10:00
certs certs: Add support for using elliptic curve keys for signing modules 2021-08-23 19:55:42 +03:00
crypto Merge branch 'linus' of git://git.kernel.org/pub/scm/linux/kernel/git/herbert/crypto-2.6 2021-08-30 12:57:10 -07:00
Documentation net/mlx5: remove the recent devlink params 2021-10-26 10:18:32 -07:00
drivers net/mlx5: Lag, Make mlx5_lag_is_multipath() be static inline 2021-10-26 19:30:42 -07:00
fs Two important filesystem fixes, marked for stable. The blocklisted 2021-10-20 10:23:05 -10:00
include net/mlx5e: Add handle SHAMPO cqe support 2021-10-26 19:30:40 -07:00
init bootconfig: init: Fix memblock leak in xbc_make_cmdline() 2021-10-10 22:27:40 -04:00
ipc ipc: remove memcg accounting for sops objects in do_semtimedop() 2021-09-14 10:22:11 -07:00
kernel Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-10-22 11:41:16 +01:00
lib lib: bitmap: Introduce node-aware alloc API 2021-10-26 19:30:38 -07:00
LICENSES LICENSES/dual/CC-BY-4.0: Git rid of "smart quotes" 2021-07-15 06:31:24 -06:00
mm memblock: exclude MEMBLOCK_NOMAP regions from kmemleak 2021-10-21 18:30:49 -10:00
net net: Prevent HW-GRO and LRO features operate together 2021-10-26 19:30:38 -07:00
samples Merge git://git.kernel.org/pub/scm/linux/kernel/git/netdev/net 2021-10-07 15:24:06 -07:00
scripts Tracing fixes for 5.15: 2021-10-16 10:51:41 -07:00
security Merge branch 'ucount-fixes-for-v5.15' of git://git.kernel.org/pub/scm/linux/kernel/git/ebiederm/user-namespace 2021-10-21 17:27:17 -10:00
sound ALSA: usb-audio: Fix microphone sound on Jieli webcam. 2021-10-19 08:07:01 +02:00
tools selftests: mlxsw: Remove deprecated test cases 2021-10-26 13:35:58 +01:00
usr .gitignore: prefix local generated files with a slash 2021-05-02 00:43:35 +09:00
virt KVM: Remove tlbs_dirty 2021-09-23 11:01:12 -04:00
.clang-format clang-format: Update with the latest for_each macro list 2021-05-12 23:32:39 +02:00
.cocciconfig
.get_maintainer.ignore Opt out of scripts/get_maintainer.pl 2019-05-16 10:53:40 -07:00
.gitattributes .gitattributes: use 'dts' diff driver for dts files 2019-12-04 19:44:11 -08:00
.gitignore .gitignore: ignore only top-level modules.builtin 2021-05-02 00:43:35 +09:00
.mailmap mailmap: add Andrej Shadura 2021-10-18 20:22:03 -10:00
COPYING COPYING: state that all contributions really are covered by this file 2020-02-10 13:32:20 -08:00
CREDITS MAINTAINERS: Move Daniel Drake to credits 2021-09-21 08:34:58 +03:00
Kbuild kbuild: rename hostprogs-y/always to hostprogs/always-y 2020-02-04 01:53:07 +09:00
Kconfig kbuild: ensure full rebuild when the compiler is updated 2020-05-12 13:28:33 +09:00
MAINTAINERS selftests: net: dsa: add a stress test for unlocked FDB operations 2021-10-25 12:59:42 +01:00
Makefile Linux 5.15-rc6 2021-10-17 20:00:13 -10:00
README Drop all 00-INDEX files from Documentation/ 2018-09-09 15:08:58 -06:00

Linux kernel
============

There are several guides for kernel developers and users. These guides can
be rendered in a number of formats, like HTML and PDF. Please read
Documentation/admin-guide/README.rst first.

In order to build the documentation, use ``make htmldocs`` or
``make pdfdocs``.  The formatted documentation can also be read online at:

    https://www.kernel.org/doc/html/latest/

There are various text files in the Documentation/ subdirectory,
several of them using the Restructured Text markup notation.

Please read the Documentation/process/changes.rst file, as it contains the
requirements for building and running the kernel, and information about
the problems which may result by upgrading your kernel.