From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id E867DC43219 for ; Wed, 6 Oct 2021 19:39:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id D3E7C611C5 for ; Wed, 6 Oct 2021 19:39:22 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S239534AbhJFTlN (ORCPT ); Wed, 6 Oct 2021 15:41:13 -0400 Received: from mxout03.lancloud.ru ([45.84.86.113]:32816 "EHLO mxout03.lancloud.ru" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239601AbhJFTkw (ORCPT ); Wed, 6 Oct 2021 15:40:52 -0400 Received: from LanCloud DKIM-Filter: OpenDKIM Filter v2.11.0 mxout03.lancloud.ru 0CD49206166A Received: from LanCloud Received: from LanCloud Received: from LanCloud Subject: Re: [RFC 07/12] ravb: Fillup ravb_rx_gbeth() stub To: Biju Das , "David S. Miller" , Jakub Kicinski CC: Sergei Shtylyov , Geert Uytterhoeven , Sergey Shtylyov , "Adam Ford" , Andrew Lunn , Yuusuke Ashizuka , Yoshihiro Shimoda , , , Chris Paterson , Biju Das , "Prabhakar Mahadev Lad" References: <20211005110642.3744-1-biju.das.jz@bp.renesas.com> <20211005110642.3744-8-biju.das.jz@bp.renesas.com> From: Sergey Shtylyov Organization: Open Mobile Platform Message-ID: <63592646-7547-1a81-e6c3-5bac413cb94a@omp.ru> Date: Wed, 6 Oct 2021 22:38:55 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.10.1 MIME-Version: 1.0 In-Reply-To: <20211005110642.3744-8-biju.das.jz@bp.renesas.com> Content-Type: text/plain; charset="utf-8" Content-Language: en-US Content-Transfer-Encoding: 7bit X-Originating-IP: [192.168.11.198] X-ClientProxiedBy: LFEXT01.lancloud.ru (fd00:f066::141) To LFEX1907.lancloud.ru (fd00:f066::207) Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On 10/5/21 2:06 PM, Biju Das wrote: > Fillup ravb_rx_gbeth() function to support RZ/G2L. > > This patch also renames ravb_rcar_rx to ravb_rx_rcar to be > consistent with the naming convention used in sh_eth driver. > > Signed-off-by: Biju Das > Reviewed-by: Lad Prabhakar [...] > diff --git a/drivers/net/ethernet/renesas/ravb_main.c b/drivers/net/ethernet/renesas/ravb_main.c > index 37164a983156..42573eac82b9 100644 > --- a/drivers/net/ethernet/renesas/ravb_main.c > +++ b/drivers/net/ethernet/renesas/ravb_main.c > @@ -720,6 +720,23 @@ static void ravb_get_tx_tstamp(struct net_device *ndev) > } > } > > +static void ravb_rx_csum_gbeth(struct sk_buff *skb) > +{ > + u8 *hw_csum; > + > + /* The hardware checksum is contained in sizeof(__sum16) (2) bytes > + * appended to packet data > + */ > + if (unlikely(skb->len < sizeof(__sum16))) > + return; > + hw_csum = skb_tail_pointer(skb) - sizeof(__sum16); Not 32-bit? The manual says the IP checksum is stored in the first 2 bytes. > + > + if (*hw_csum == 0) You only check the 1st byte, not the full checksum! > + skb->ip_summed = CHECKSUM_UNNECESSARY; > + else > + skb->ip_summed = CHECKSUM_NONE; So the TCP/UDP/ICMP checksums are not dealt with? Why enable them then? > +} > + > static void ravb_rx_csum(struct sk_buff *skb) static void ravb_rx_csum_rcar(struct sk_buff *skb)? [...] MBR, Sergey