[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHNKnsTARNNeiCBtDxmiMx2gUkKDb-V3e+xtfgsc-imeWv0CLA@mail.gmail.com>
Date: Thu, 2 Dec 2021 00:09:28 +0300
From: Sergey Ryazanov <ryazanov.s.a@...il.com>
To: "Martinez, Ricardo" <ricardo.martinez@...ux.intel.com>
Cc: netdev@...r.kernel.org, linux-wireless@...r.kernel.org,
Jakub Kicinski <kuba@...nel.org>,
David Miller <davem@...emloft.net>,
Johannes Berg <johannes@...solutions.net>,
Loic Poulain <loic.poulain@...aro.org>,
M Chetan Kumar <m.chetan.kumar@...el.com>,
chandrashekar.devegowda@...el.com,
Intel Corporation <linuxwwan@...el.com>,
chiranjeevi.rapolu@...ux.intel.com, haijun.liu@...iatek.com,
amir.hanania@...el.com,
Andy Shevchenko <andriy.shevchenko@...ux.intel.com>,
dinesh.sharma@...el.com, eliot.lee@...el.com,
mika.westerberg@...ux.intel.com, moises.veleta@...el.com,
pierre-louis.bossart@...el.com, muralidharan.sethuraman@...el.com,
Soumya.Prakash.Mishra@...el.com, sreehari.kancharla@...el.com,
suresh.nagaraj@...el.com
Subject: Re: [PATCH v2 09/14] net: wwan: t7xx: Add WWAN network interface
On Wed, Dec 1, 2021 at 9:06 AM Martinez, Ricardo
<ricardo.martinez@...ux.intel.com> wrote:
> On 11/6/2021 11:08 AM, Sergey Ryazanov wrote:
>> On Mon, Nov 1, 2021 at 6:57 AM Ricardo Martinez wrote:
>>> +#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
Powered by blists - more mailing lists