From: Subash Abhinov Kasiviswanathan <subash.a.kasiviswanathan@oss.qualcomm.com>
To: davem@davemloft.net, edumazet@google.com, kuba@kernel.org,
pabeni@redhat.com, andrew+netdev@lunn.ch, corbet@lwn.net
Cc: horms@kernel.org, skhan@linuxfoundation.org,
rdunlap@infradead.org, netdev@vger.kernel.org,
linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org,
Subash Abhinov Kasiviswanathan
<subash.a.kasiviswanathan@oss.qualcomm.com>,
Sean Tranchetti <sean.tranchetti@oss.qualcomm.com>
Subject: [PATCH net-next 7/7] docs: networking: Add documentation for the coalescing support in rmnet
Date: Tue, 29 Sep 2026 22:13:45 -0700 [thread overview]
Message-ID: <20260930051345.857443-8-subash.a.kasiviswanathan@oss.qualcomm.com> (raw)
In-Reply-To: <20260930051345.857443-1-subash.a.kasiviswanathan@oss.qualcomm.com>
Add information about the MAPv5 coalescing header covering the layout
and the information from the fields in the header.
Co-developed-by: Sean Tranchetti <sean.tranchetti@oss.qualcomm.com>
Signed-off-by: Sean Tranchetti <sean.tranchetti@oss.qualcomm.com>
Signed-off-by: Subash Abhinov Kasiviswanathan <subash.a.kasiviswanathan@oss.qualcomm.com>
---
.../cellular/qualcomm/rmnet.rst | 115 ++++++++++++++++--
1 file changed, 107 insertions(+), 8 deletions(-)
diff --git a/Documentation/networking/device_drivers/cellular/qualcomm/rmnet.rst b/Documentation/networking/device_drivers/cellular/qualcomm/rmnet.rst
index 5aedbabb7382..ba8e947d54e6 100644
--- a/Documentation/networking/device_drivers/cellular/qualcomm/rmnet.rst
+++ b/Documentation/networking/device_drivers/cellular/qualcomm/rmnet.rst
@@ -125,8 +125,8 @@ Command (1)/ Data (0) bit value is to indicate if the packet is a MAP command
or data packet. Command packet is used for transport level flow control. Data
packets are standard IP packets.
-Next header is used to indicate the presence of another header, currently is
-limited to checksum header.
+Next header is used to indicate the presence of another header, currently
+limited to the checksum and coalescing headers.
Padding is the number of bytes to be appended to the payload to
ensure 4 byte alignment.
@@ -150,11 +150,11 @@ Header Type is to indicate the type of header, this usually is set to CHECKSUM
Header types
-= ===============
+= ======================
0 Reserved
-1 Reserved
+1 coalescing header
2 checksum header
-= ===============
+= ======================
Checksum Valid is to indicate whether the header checksum is valid. Value of 1
implies that checksum is calculated on this packet and is valid, value of 0
@@ -162,8 +162,78 @@ indicates that the calculated packet checksum is invalid.
Reserved bits must be zero when sent and ignored when received.
-e. MAP packet v1/v5 (command specific)
---------------------------------------
+e. Coalescing header v5
+------------------------
+
+Hardware can coalesce multiple same-flow IP packets of the same length into
+a single MAP frame to reduce per-packet overhead at high data rates. The
+coalescing header (header type 1) describes the coalesced content.
+
+Packet format::
+
+ Bit 0 - 6 7 8 9-11 12-15
+ Function Header Type Next Header CSUM valid Num NLOs (reserved)
+
+ Bit 16-19 20-23
+ Function Close value Close type
+
+ Bit 24-27 28-31
+ Function (reserved) VEID
+
+ Bit 32 - 47 48 - 55 56 - 63
+ Function Packet length CSUM error bitmap Num packets (NLO 0)
+
+ ... (up to 6 NLO entries total, same 32-bit format per entry)
+
+Header Type is set to 1 (coalescing).
+
+Num NLOs (Number-Length Objects) is the count of active NLO entries
+(1 – 6). Each NLO describes a group of consecutive coalesced packets
+that all share the same IP packet length.
+
+CSUM valid (bit 8) indicates whether the hardware checksum is valid
+for all packets in the frame.
+
+Close type and close value encode the hardware reason that coalescing
+was terminated for this frame:
+
+Close type values:
+
+= ==============================
+0 non-coalesced (single packet)
+1 IP flow miss
+2 transport flow miss
+3 hardware limit (see value)
+4 coalescing closed (FIN/PSH)
+= ==============================
+
+Close value (used when close type is 3):
+
+= ==================
+0 NL limit reached
+1 packet limit
+2 byte limit
+3 time limit
+4 eviction
+= ==================
+
+VEID is the virtual endpoint ID of the originating flow.
+
+Each NLO entry::
+
+ Bit 0 - 15 16 - 23 24 - 31
+ Function Pkt length CSUM error bitmap Num packets
+
+Pkt length is the full IP packet length, including the IP header,
+transport header, and payload, for every packet in this NLO group.
+
+CSUM error bitmap is a per-packet bitmask. Bit N is set when packet N
+in this NLO has a bad checksum.
+
+Num packets is the count of coalesced packets described by this NLO.
+
+f. MAP packet v1/v5 (command specific)
+---------------------------------------
Packet format::
@@ -187,7 +257,7 @@ Command types
3 is for error during processing of commands
= ==========================================
-f. Aggregation
+g. Aggregation
--------------
Aggregation is multiple MAP packets (can be data or command) delivered to
@@ -208,3 +278,32 @@ rmnet userspace configuration is done through netlink using iproute2
https://git.kernel.org/pub/scm/network/iproute2/iproute2.git/
The driver uses rtnl_link_ops for communication.
+
+The data format flags controlling the ingress and egress processing
+pipeline are set via the ``IFLA_RMNET_FLAGS`` attribute
+(``struct ifla_rmnet_flags``).
+
+Relevant ingress flags:
+
+``RMNET_FLAGS_INGRESS_DEAGGREGATION``
+ Enable MAP frame de-aggregation.
+
+``RMNET_FLAGS_INGRESS_MAP_CKSUMV4``
+ Enable MAPv4 downlink checksum offload.
+
+``RMNET_FLAGS_INGRESS_MAP_CKSUMV5``
+ Enable MAPv5 downlink checksum offload (header type 2).
+
+``RMNET_FLAGS_INGRESS_COALESCE``
+ Enable MAPv5 downlink hardware coalescing (header type 1).
+ When set the driver will decode coalescing headers, reconstruct
+ individual IP packets and will deliver batched GSO SKBs to the
+ stack for efficient processing.
+
+Relevant egress flags:
+
+``RMNET_FLAGS_EGRESS_MAP_CKSUMV4``
+ Enable MAPv4 uplink checksum offload.
+
+``RMNET_FLAGS_EGRESS_MAP_CKSUMV5``
+ Enable MAPv5 uplink checksum offload.
--
2.34.1
next prev parent reply other threads:[~2026-09-30 5:14 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-09-30 5:13 [PATCH net-next 0/7] Add HW GRO handling in rmnet Subash Abhinov Kasiviswanathan
2026-09-30 5:13 ` [PATCH net-next 1/7] uapi: if_link: Add RMNET_FLAGS_INGRESS_COALESCE Subash Abhinov Kasiviswanathan
2026-10-04 6:05 ` netdev-bot+sashiko
2026-09-30 5:13 ` [PATCH net-next 2/7] net: qualcomm: rmnet: Process MAPv5 frames as a list Subash Abhinov Kasiviswanathan
2026-09-30 5:13 ` [PATCH net-next 3/7] net: qualcomm: rmnet: Restrict supported MAP checksum configurations Subash Abhinov Kasiviswanathan
2026-10-04 6:05 ` netdev-bot+sashiko
2026-09-30 5:13 ` [PATCH net-next 4/7] net: qualcomm: rmnet: Add DL packet coalescing support Subash Abhinov Kasiviswanathan
2026-10-04 6:05 ` netdev-bot+sashiko
2026-09-30 5:13 ` [PATCH net-next 5/7] net: qualcomm: rmnet: Work around coalescing hardware quirks Subash Abhinov Kasiviswanathan
2026-10-04 6:05 ` netdev-bot+sashiko
2026-09-30 5:13 ` [PATCH net-next 6/7] net: qualcomm: rmnet: Add ethtool stats for DL coalescing Subash Abhinov Kasiviswanathan
2026-10-04 6:05 ` netdev-bot+sashiko
2026-09-30 5:13 ` Subash Abhinov Kasiviswanathan [this message]
2026-10-04 6:05 ` [PATCH net-next 7/7] docs: networking: Add documentation for the coalescing support in rmnet netdev-bot+sashiko
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=20260930051345.857443-8-subash.a.kasiviswanathan@oss.qualcomm.com \
--to=subash.a.kasiviswanathan@oss.qualcomm.com \
--cc=andrew+netdev@lunn.ch \
--cc=corbet@lwn.net \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-doc@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=rdunlap@infradead.org \
--cc=sean.tranchetti@oss.qualcomm.com \
--cc=skhan@linuxfoundation.org \
/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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox