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 X-Spam-Level: X-Spam-Status: No, score=-1.1 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 118DEC282C0 for ; Fri, 25 Jan 2019 18:31:22 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id D90A12087E for ; Fri, 25 Jan 2019 18:31:21 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="fEMVEFAT" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726991AbfAYSbU (ORCPT ); Fri, 25 Jan 2019 13:31:20 -0500 Received: from mail-pl1-f195.google.com ([209.85.214.195]:37816 "EHLO mail-pl1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726335AbfAYSbU (ORCPT ); Fri, 25 Jan 2019 13:31:20 -0500 Received: by mail-pl1-f195.google.com with SMTP id b5so4928004plr.4 for ; Fri, 25 Jan 2019 10:31:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=HotnfM4yjBWrA/PxdQAFhTYzUKp2lmX+VICKJHFu83M=; b=fEMVEFATSRrqV6n5boofEcyj6YgxKIXq8HA3YdYugd6UjjSdykEBu6ldgKamEKsOXk BD3aPcaYFWbSmf7XLoMWS8Lre/hKIov6IZu0qKPcbsit+sVri0/hRXhxexRk68vL0/Qy 0LwpCuqdNtWrbYvhJg9pqAGRd8lBO4zGSwjfKuzlPiJIS5RA+8FVWenGFWsAJ8GMkYo8 rWWVNkWkz3tOfEhGYiyOU02TvbOfH6eRxNc/BbgmUQ1iXSJ2maAwFYe46MdhZBETYiCu P819AlGkxPlo6ISoa9d+qt1TbqeHYXW4RbjLwNSCfNcSKpDUj1NMzVSh3q4GqLq1K6L4 ffBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=HotnfM4yjBWrA/PxdQAFhTYzUKp2lmX+VICKJHFu83M=; b=CKsZ9bw7jFzWdEoA+Ah3GvTeNx7e02Zy9/7sDjQOcpjRrX2Fi/kkM5yvWtMUpW0pPI qxxhLAI46r+nIQb8R3h1Fq+zgM3Me/obM/nWoiL/gfns44KXXH27ibJA5N6refgP+sJ+ y++BuXRmk8kvpUq63i0c8/mPQmCzsR/JREeqDLw981C3uUK9dzhDqUKUSPCXOky+d39g 1NrWKcXaF6mo+NGmNFqdnmDjOllvc3AqXhFcqqMp807aqdxsVrBZs+lkfMfLrV1PlVug bVir5mheI+rvY63mTE1hSWMjkciW3CiFXuNFyf8i4K9wNt84WkOX3pYFUriQ4GIdhp5A L5EQ== X-Gm-Message-State: AJcUukflUilL1bjSf+3UUv5wCuel2+5Lbwdlhlf77mb96B9xnk1w3a/M WtFa3yGO4aeiRPr00f5PzfA= X-Google-Smtp-Source: ALg8bN4OQ7FUMQ/Z2ErFG1ZMx1C8oJlnFPHgE6DITAC9yP6LJIR533ehqFwn3ACAtXRgkVPWeIglvw== X-Received: by 2002:a17:902:2aaa:: with SMTP id j39mr12359439plb.335.1548441079695; Fri, 25 Jan 2019 10:31:19 -0800 (PST) Received: from ?IPv6:2620:15c:2c1:200:55c7:81e6:c7d8:94b? ([2620:15c:2c1:200:55c7:81e6:c7d8:94b]) by smtp.gmail.com with ESMTPSA id n70sm40097499pfi.185.2019.01.25.10.31.18 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 25 Jan 2019 10:31:18 -0800 (PST) Subject: Re: [net 1/4] net/mlx5e: Force CHECKSUM_UNNECESSARY for short ethernet frames To: Saeed Mahameed , "xiyou.wangcong@gmail.com" Cc: "davem@davemloft.net" , "netdev@vger.kernel.org" , Tariq Toukan , "edumazet@google.com" , "nikola.ciprich@linuxbox.cz" References: <20190119002523.16097-1-saeedm@mellanox.com> <20190119002523.16097-2-saeedm@mellanox.com> <478d619a2d677c91640294fbce403632c628050f.camel@mellanox.com> From: Eric Dumazet Message-ID: <8d7f25f7-6aa3-c5d9-084a-5202374db419@gmail.com> Date: Fri, 25 Jan 2019 10:31:17 -0800 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 MIME-Version: 1.0 In-Reply-To: <478d619a2d677c91640294fbce403632c628050f.camel@mellanox.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On 01/25/2019 10:22 AM, Saeed Mahameed wrote: > On Tue, 2019-01-22 at 13:30 -0800, Cong Wang wrote: >> On Fri, Jan 18, 2019 at 4:25 PM Saeed Mahameed >> wrote: >>> From: Cong Wang >> >> I don't know why you want to make me as the author here, but I never >> agree on _your_ updates on my previous patch. >> >> Please see below. >> > > sorry, i just took your patch and worked on top of it, i thought you > would like to get the credit for this. > I thought the issue was that the hardware csum provided by both mlx4 and mlx5 only covered the bytes included in the IP (v4 or v6) frame. Meaning that any non zero padding bytes are not checksummed. If this can not be fixed by a firmware change, then the fix has nothing to do with a frame being smaller than ETH_ZLEN + ETH_FCS_LEN Alternative would be for the driver to trim the frame (pretend the skb->len is exactly the expected one), but one could argue that tcpdump should be able to see padding bytes.