[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID:
<CH0PR18MB4339D23B80EE8D24113176D3CD9C2@CH0PR18MB4339.namprd18.prod.outlook.com>
Date: Wed, 4 Sep 2024 09:05:18 +0000
From: Geethasowjanya Akula <gakula@...vell.com>
To: Simon Horman <horms@...nel.org>,
Sunil Kovvuri Goutham
<sgoutham@...vell.com>,
Linu Cherian <lcherian@...vell.com>, Jerin Jacob
<jerinj@...vell.com>,
Hariprasad Kelam <hkelam@...vell.com>,
Subbaraya
Sundeep Bhatta <sbhatta@...vell.com>
CC: "David S. Miller" <davem@...emloft.net>,
Eric Dumazet
<edumazet@...gle.com>, Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni
<pabeni@...hat.com>,
Nathan Chancellor <nathan@...nel.org>,
Nick Desaulniers
<ndesaulniers@...gle.com>,
Bill Wendling <morbo@...gle.com>,
Justin Stitt
<justinstitt@...gle.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"llvm@...ts.linux.dev" <llvm@...ts.linux.dev>
Subject: RE: [EXTERNAL] [PATCH net-next 2/2] octeontx2-pf: Make iplen __be16
in otx2_sqe_add_ext()
>-----Original Message-----
>From: Simon Horman <horms@...nel.org>
>Sent: Tuesday, September 3, 2024 9:57 PM
>To: Sunil Kovvuri Goutham <sgoutham@...vell.com>; Linu Cherian
><lcherian@...vell.com>; Geethasowjanya Akula <gakula@...vell.com>;
>Jerin Jacob <jerinj@...vell.com>; Hariprasad Kelam <hkelam@...vell.com>;
>Subbaraya Sundeep Bhatta <sbhatta@...vell.com>
>Cc: David S. Miller <davem@...emloft.net>; Eric Dumazet
><edumazet@...gle.com>; Jakub Kicinski <kuba@...nel.org>; Paolo Abeni
><pabeni@...hat.com>; Nathan Chancellor <nathan@...nel.org>; Nick
>Desaulniers <ndesaulniers@...gle.com>; Bill Wendling
><morbo@...gle.com>; Justin Stitt <justinstitt@...gle.com>;
>netdev@...r.kernel.org; llvm@...ts.linux.dev
>Subject: [EXTERNAL] [PATCH net-next 2/2] octeontx2-pf: Make iplen __be16 in
>otx2_sqe_add_ext()
>
>In otx2_sqe_add_ext() iplen is used to hold a 16-bit big-endian value, but it's
>type is u16, indicating a host byte order integer.
>
>Address this mismatch by changing the type of iplen to __be16.
>
>Flagged by Sparse as:
>
>.../otx2_txrx.c:699:31: warning: incorrect type in assignment (different base
>types)
>.../otx2_txrx.c:699:31: expected unsigned short [usertype] iplen
>.../otx2_txrx.c:699:31: got restricted __be16 [usertype]
>.../otx2_txrx.c:701:54: warning: incorrect type in assignment (different base
>types)
>.../otx2_txrx.c:701:54: expected restricted __be16 [usertype] tot_len
>.../otx2_txrx.c:701:54: got unsigned short [usertype] iplen
>.../otx2_txrx.c:704:60: warning: incorrect type in assignment (different base
>types)
>.../otx2_txrx.c:704:60: expected restricted __be16 [usertype] payload_len
>.../otx2_txrx.c:704:60: got unsigned short [usertype] iplen
>
>Introduced in
>commit dc1a9bf2c816 ("octeontx2-pf: Add UDP segmentation offload
>support")
>
>No functional change intended.
>Compile tested only.
>
>Signed-off-by: Simon Horman <horms@...nel.org>
>---
> drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
>diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c
>b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c
>index 3eb85949677a..933e18ba2fb2 100644
>--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c
>+++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.c
>@@ -687,7 +687,7 @@ static void otx2_sqe_add_ext(struct otx2_nic *pfvf,
>struct otx2_snd_queue *sq,
> } else if (skb_shinfo(skb)->gso_type & SKB_GSO_UDP_L4) {
> __be16 l3_proto = vlan_get_protocol(skb);
> struct udphdr *udph = udp_hdr(skb);
>- u16 iplen;
>+ __be16 iplen;
>
> ext->lso_sb = skb_transport_offset(skb) +
> sizeof(struct udphdr);
>
>--
>2.45.2
Tested-by: Geetha sowjanya <gakula@...vell.com>
Powered by blists - more mailing lists