Received: by 10.223.164.202 with SMTP id h10csp255288wrb; Wed, 22 Nov 2017 20:20:38 -0800 (PST) X-Google-Smtp-Source: AGs4zMa4c4yqj+FgfBM13VNyFtB/HWqE1miYeCfuGWoNO+bDgCdglp+TvYe4ABRggChkYtglUdje X-Received: by 10.101.102.66 with SMTP id z2mr11540961pgv.352.1511410837946; Wed, 22 Nov 2017 20:20:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1511410837; cv=none; d=google.com; s=arc-20160816; b=mP5KKcQuyIfDVnHDC4SGNTrIjJdX39vR6EsXe4/vT6VnE3VNeHioO4MyXjZRFm8EAt EScumvUcnPAh/10EHEMfJQigYnKOgRfpOoB/4aVig/nE9CJrQopLY6Cikx7eluFcnnRn 64CUnBMqCXq2zxNsjDlxbWwnbdEOpiFWa50Nb2kLVd/L37kFrinPOyk1cC/IhYdAX80V VLkzBd0Wbq2A1YqqBosqhdWDS+pkzRLvqOrerbQFPlOEKLeI+GPaseVe7Ckh2fYYUCeO Nlwmfk5x8EXZonkfVXMindB274dm+JokdbDKBJfAShEqGzY/Y6qCOp2UnKeKVFs2dDle rmCw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=oM+Nc9iP+K7LgxpAu2cGk5FqdjP4vvBqpp1VZIheUU8=; b=jeVJBvsFATAJnZvMsnm7n2n+yAQ1DsuHBUKsEGjd4umqCTJor5xMrS4kDtEpEd9SbM fy5l4kE0vExCc2oVNanmacgoTVX6jh9kSFnm819j9jIN+BTyxP2XKseyppbdZ3eL7Je4 6LWtHLt0x8wdrSk9LtaJmKqLrFie1PuQ41Nr0U59GYshC296hfgV3pYNv89FMoPHm8fh ZLBMKfVEEa3xpoiS03T8LyBrgWvzJXaVgqmSe4Vge0S1+a6S7BtW+i/sCGSQACaRaKSc unLOm7ihACPJniyPA8Bsvc+yyFgnMFFLS9HutoEsRZYpeWyqdasJaLWOAPRMHT94G7ZW LsyA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=etyjI4B1; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y6si14676306pgp.746.2017.11.22.20.20.26; Wed, 22 Nov 2017 20:20:37 -0800 (PST) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=etyjI4B1; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752401AbdKWETk (ORCPT + 77 others); Wed, 22 Nov 2017 23:19:40 -0500 Received: from mail-wm0-f68.google.com ([74.125.82.68]:43648 "EHLO mail-wm0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752148AbdKWETi (ORCPT ); Wed, 22 Nov 2017 23:19:38 -0500 Received: by mail-wm0-f68.google.com with SMTP id x63so14100615wmf.2; Wed, 22 Nov 2017 20:19:37 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=oM+Nc9iP+K7LgxpAu2cGk5FqdjP4vvBqpp1VZIheUU8=; b=etyjI4B1W9DLTj8xVxW7w2Z46BBfr6WxYD4gGZ80S4je4k/+tkkTxTj6VoVgYegvR+ IqTiNXT7gzPUuyCZOlAEX/j3D/K0KbqmEjdh1Nao4eMAzWOXD4Zj56X4ZOjo1lTWbb/X qwOUTc7RvVhdJOIQUgqgw8y1zBSGHZoPMNA7nLrvwX8C5ar7tB7wKGPLzzSAovuwkiCd YgeD/3dgaDWiy69rTDL5EcSHAlNzxPtw7jltROKuIf9mAqVsCiDrN5jAiP9PHBk5jw+Q tPQETun8iS4J8VMD4l8UheVg9dVDqfWd9dT58X3q3AfIDcNE2+AaDFiNC10UWG5e8bf4 hI8Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=oM+Nc9iP+K7LgxpAu2cGk5FqdjP4vvBqpp1VZIheUU8=; b=EVUtMEqK5zJ+osvSHouNI6vkrX48Ca8qLNy+NoiRnvtgHugJsXX42n+5yAWw6hejT4 ICTBIlBazuVrtGRBfTu7qEvyj77F+dKg+kCcb/PdxsyAsenVOnnhcWOwSU5ZgFACwkT4 O6L4AQzY1ep4uL6Kjtp/n24QHQOJLy/X2+J64qc+on2hpFbsgEZllWXOaZE0h+tC8mDn 7fx+cArloR8Gj7geAW0EMYF6PqY807EcIHd+AzeRnhj0z9yi2IxTbQANC0K3IQCc0kL7 qoBYR8Qpo55okoubsSPGj1863h8aj2E0T5J8CL//OAMPp42rm+oalbyQwT3KHQvnwqA7 EFAg== X-Gm-Message-State: AJaThX4vkjU2RmL21i4QkoAXzA0YypI5oaofjz3RfutLMSfHvebQOoPW JE8GmGKFJxs7XLxDNwlkdzQRLaumlvkJDElG1g4= X-Received: by 10.28.238.221 with SMTP id j90mr6062960wmi.44.1511410776687; Wed, 22 Nov 2017 20:19:36 -0800 (PST) MIME-Version: 1.0 Received: by 10.28.235.5 with HTTP; Wed, 22 Nov 2017 20:19:36 -0800 (PST) In-Reply-To: <1511366238.16595.1.camel@gmail.com> References: <20171122123727.23580-1-aleksey.makarov@auriga.com> <1511366238.16595.1.camel@gmail.com> From: Sunil Kovvuri Date: Thu, 23 Nov 2017 09:49:36 +0530 Message-ID: Subject: Re: [PATCH net] net: thunderx: Fix TCP/UDP checksum offload for IPv6 pkts To: Eric Dumazet Cc: Aleksey Makarov , Linux Netdev List , Robert Richter , Aleksey Makarov , "Goutham, Sunil" , Florian Westphal , LKML , Sunil Goutham , LAKML Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Nov 22, 2017 at 9:27 PM, Eric Dumazet wrote: > On Wed, 2017-11-22 at 15:37 +0300, Aleksey Makarov wrote: >> From: Sunil Goutham >> >> This fixes a previous patch which missed some changes >> and due to which L3 checksum offload was getting enabled >> for IPv6 pkts. And HW is dropping these pkts as it assumes >> the pkt is IPv4 when IP csum offload is set in the SQ >> descriptor. >> >> Fixes: bbbb494fd005 ("net: thunderx: Enable TSO and checksum offloads >> for ipv6") >> Signed-off-by: Sunil Goutham >> Signed-off-by: Aleksey Makarov >> --- >> drivers/net/ethernet/cavium/thunder/nicvf_queues.c | 3 ++- >> 1 file changed, 2 insertions(+), 1 deletion(-) >> >> diff --git a/drivers/net/ethernet/cavium/thunder/nicvf_queues.c >> b/drivers/net/ethernet/cavium/thunder/nicvf_queues.c >> index d4496e9afcdf..184d5bdbe7e0 100644 >> --- a/drivers/net/ethernet/cavium/thunder/nicvf_queues.c >> +++ b/drivers/net/ethernet/cavium/thunder/nicvf_queues.c >> @@ -1355,10 +1355,11 @@ nicvf_sq_add_hdr_subdesc(struct nicvf *nic, >> struct snd_queue *sq, int qentry, >> >> /* Offload checksum calculation to HW */ >> if (skb->ip_summed == CHECKSUM_PARTIAL) { >> - hdr->csum_l3 = 1; /* Enable IP csum calculation */ >> hdr->l3_offset = skb_network_offset(skb); >> hdr->l4_offset = skb_transport_offset(skb); >> >> + /* Enable IP HDR csum calculation for V4 pkts */ >> + hdr->csum_l3 = (ip.v4->version == 4) ? 1 : 0; > > Have you tried to set hdr->csum_l3 to 0 regardless of version being 4 > or 6 ? > > This would remove the need for yet another conditional. > > AFAIK, linux does not offload IPv4 header checksums to NIC, it is not > worth the trouble. Looks like I misunderstood the IPSUM netdev feature flag. Thanks, will check. Sunil. > > > > _______________________________________________ > linux-arm-kernel mailing list > linux-arm-kernel@lists.infradead.org > http://lists.infradead.org/mailman/listinfo/linux-arm-kernel From 1584782432146813643@xxx Wed Nov 22 15:58:22 +0000 2017 X-GM-THRID: 1584770830225116679 X-Gmail-Labels: Inbox,Category Forums,HistoricalUnread