From: Sergey Shtylyov <s.shtylyov@omp.ru>
To: Biju Das <biju.das.jz@bp.renesas.com>, Jakub Kicinski <kuba@kernel.org>
Cc: "David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Paolo Abeni <pabeni@redhat.com>,
Claudiu Beznea <claudiu.beznea.uj@bp.renesas.com>,
Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>,
Wolfram Sang <wsa+renesas@sang-engineering.com>,
nikita.yoush <nikita.yoush@cogentembedded.com>,
"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
"linux-renesas-soc@vger.kernel.org"
<linux-renesas-soc@vger.kernel.org>,
Geert Uytterhoeven <geert+renesas@glider.be>,
Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj@bp.renesas.com>,
biju.das.au <biju.das.au@gmail.com>
Subject: Re: [PATCH net-next 1/2] ravb: Add Rx checksum offload support
Date: Wed, 24 Jan 2024 23:50:42 +0300 [thread overview]
Message-ID: <e71607dc-d51f-d5b9-e95a-c11b149083cb@omp.ru> (raw)
In-Reply-To: <TYCPR01MB11269BEF48F2C2C111C91858A867B2@TYCPR01MB11269.jpnprd01.prod.outlook.com>
On 1/24/24 11:31 AM, Biju Das wrote:
[...]
>> -----Original Message-----
>> From: Jakub Kicinski <kuba@kernel.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...
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
next prev parent reply other threads:[~2024-01-24 20:50 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-01-23 15:19 [PATCH net-next 0/2] Add HW check sum of load for RZ/G2L GbEthernet IP Biju Das
2024-01-23 15:19 ` [PATCH net-next 1/2] ravb: Add Rx checksum offload support Biju Das
2024-01-24 1:09 ` Jakub Kicinski
2024-01-24 8:31 ` Biju Das
2024-01-24 20:50 ` Sergey Shtylyov [this message]
2024-01-25 6:45 ` Biju Das
2024-01-23 15:19 ` [PATCH net-next 2/2] ravb: Add Tx " Biju Das
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=e71607dc-d51f-d5b9-e95a-c11b149083cb@omp.ru \
--to=s.shtylyov@omp.ru \
--cc=biju.das.au@gmail.com \
--cc=biju.das.jz@bp.renesas.com \
--cc=claudiu.beznea.uj@bp.renesas.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=geert+renesas@glider.be \
--cc=kuba@kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nikita.yoush@cogentembedded.com \
--cc=pabeni@redhat.com \
--cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
--cc=wsa+renesas@sang-engineering.com \
--cc=yoshihiro.shimoda.uh@renesas.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.