Thread (43 messages) 43 messages, 4 authors, 2022-01-12

Re: [PATCH v2 09/14] net: wwan: t7xx: Add WWAN network interface

From: Sergey Ryazanov <ryazanov.s.a@gmail.com>
Date: 2021-12-01 21:09:47
Also in: linux-wireless

On Wed, Dec 1, 2021 at 9:06 AM Martinez, Ricardo
[off-list ref] wrote:
On 11/6/2021 11:08 AM, Sergey Ryazanov wrote:
quoted
On Mon, Nov 1, 2021 at 6:57 AM Ricardo Martinez wrote:
quoted
+#define IPV4_VERSION           0x40
+#define IPV6_VERSION           0x60
Just curious why the _VERSION suffix? Why not, for example, PKT_TYPE_ prefix?
Nothing special about _VERSION, but it does look a bit weird, will use
PKT_TYPE_  as suggested
I checked the driver code again and found that these constants are
really used to distinguish between IPv4 and IPv6 packets by checking
the first byte of the data packet (IP header version field).

Now I am wondering, does the modem firmware report a packet type in
one of the BAT or PIT headers? If the modem is already reporting a
packet type, then it is better to use the provided information instead
of touching the packet data. Otherwise, if the modem does not
explicitly report a packet type, and you have to check the version
field of the IP header, then it seems Ok to keep the names of these
constants as they are (with the _VERSION suffix).

-- 
Sergey
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help