[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID:
<TYCPR01MB112695545C77D41544D8DEFCB867A2@TYCPR01MB11269.jpnprd01.prod.outlook.com>
Date: Thu, 25 Jan 2024 06:45:17 +0000
From: Biju Das <biju.das.jz@...renesas.com>
To: Sergey Shtylyov <s.shtylyov@....ru>, Jakub Kicinski <kuba@...nel.org>
CC: "David S. Miller" <davem@...emloft.net>, Eric Dumazet
<edumazet@...gle.com>, Paolo Abeni <pabeni@...hat.com>, Claudiu Beznea
<claudiu.beznea.uj@...renesas.com>, Yoshihiro Shimoda
<yoshihiro.shimoda.uh@...esas.com>, Wolfram Sang
<wsa+renesas@...g-engineering.com>, nikita.yoush
<nikita.yoush@...entembedded.com>, "netdev@...r.kernel.org"
<netdev@...r.kernel.org>, "linux-renesas-soc@...r.kernel.org"
<linux-renesas-soc@...r.kernel.org>, Geert Uytterhoeven
<geert+renesas@...der.be>, Prabhakar Mahadev Lad
<prabhakar.mahadev-lad.rj@...renesas.com>, biju.das.au
<biju.das.au@...il.com>
Subject: RE: [PATCH net-next 1/2] ravb: Add Rx checksum offload support
Hi Sergey Shtylyov,
> -----Original Message-----
> From: Sergey Shtylyov <s.shtylyov@....ru>
> Sent: Wednesday, January 24, 2024 8:51 PM
> Subject: Re: [PATCH net-next 1/2] ravb: Add Rx checksum offload support
>
> On 1/24/24 11:31 AM, Biju Das wrote:
> [...]
>
> >> -----Original Message-----
> >> From: Jakub Kicinski <kuba@...nel.org>
> >> Sent: Wednesday, January 24, 2024 1:09 AM
> >> Subject: Re: [PATCH net-next 1/2] ravb: Add Rx checksum offload
> >> support
> >>
> >> On Tue, 23 Jan 2024 15:19:23 +0000 Biju Das wrote:
> >>> +static void ravb_rx_csum_gbeth(struct sk_buff *skb) {
> >>> + __sum16 csum_ip_hdr, csum_proto;
> >>> + u8 *hw_csum;
> >>> +
> >>> + /* The hardware checksum status is contained in sizeof(__sum16) *
> >>> +2
> >> = 4
> >>> + * bytes appended to packet data. First 2 bytes is ip header csum
> >> and
> >>> + * last 2 bytes is protocol csum.
> >>> + */
> >>> + if (unlikely(skb->len < sizeof(__sum16) * 2))
> >>> + return;
> >>> +
> >>> + hw_csum = skb_tail_pointer(skb) - sizeof(__sum16);
> >>> + csum_proto = csum_unfold((__force
> >>> +__sum16)get_unaligned_le16(hw_csum));
> >>> +
> >>> + hw_csum -= sizeof(__sum16);
> >>> + csum_ip_hdr = csum_unfold((__force
> >> __sum16)get_unaligned_le16(hw_csum));
> >>> + skb_trim(skb, skb->len - 2 * sizeof(__sum16));
> >>> +
> >>> + /* TODO: IPV6 Rx csum */
> >>> + if (skb->protocol == htons(ETH_P_IP) && csum_ip_hdr ==
> >> TOE_RX_CSUM_OK &&
> >>> + csum_proto == TOE_RX_CSUM_OK)
> >>> + /* Hardware validated our checksum */
> >>> + skb->ip_summed = CHECKSUM_UNNECESSARY; }
> >>
> >> sparse does not seem to be onboard:
> >>
> >> drivers/net/ethernet/renesas/ravb_main.c:771:20: warning: incorrect
> >> type in assignment (different base types)
> >> drivers/net/ethernet/renesas/ravb_main.c:771:20: expected restricted
> >> __sum16 [usertype] csum_proto
> >> drivers/net/ethernet/renesas/ravb_main.c:771:20: got restricted
> __wsum
> >> drivers/net/ethernet/renesas/ravb_main.c:774:21: warning: incorrect
> >> type in assignment (different base types)
> >> drivers/net/ethernet/renesas/ravb_main.c:774:21: expected restricted
> >> __sum16 [usertype] csum_ip_hdr
> >> drivers/net/ethernet/renesas/ravb_main.c:774:21: got restricted
> __wsum
> >
> > I have reproduced this issue and the warning is fixed by replacing
> > __sum16->__wsum.
> >
> > I will send v2 with this fix.
>
> You could have waited for my review...
Please review the latest version v2[2] as it is fixing bot error.
It is straight forward, and simpler patches should be fast to review.
[2] https://lore.kernel.org/all/20240124102115.132154-1-biju.das.jz@bp.renesas.com/
Cheers,
Biju
> Dave, Jakub, please don't merge these patches before I have a chance to
> review them. I'm overwhelmed by reviews (both internal and public)
> ATM... :-/
>
> > Cheers,
> > Biju
>
> MBR, Sergey
Powered by blists - more mailing lists