Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp3038832rwb; Mon, 19 Sep 2022 14:02:36 -0700 (PDT) X-Google-Smtp-Source: AMsMyM68M/GONhtiZ4fk9TVqhotSqba+YT99l2yRZcalb6SPc/G3mOwYXu7l1kk4k+FcASH24NwW X-Received: by 2002:a05:6a00:1ad0:b0:545:b61b:fe7 with SMTP id f16-20020a056a001ad000b00545b61b0fe7mr20029691pfv.25.1663621356282; Mon, 19 Sep 2022 14:02:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1663621356; cv=none; d=google.com; s=arc-20160816; b=E9yQ40jnZGIC5zyBZZVUR6zWHvK163vps+j67G1pAOsJLJByjuUPYlG+O9yyBHLWNE olPhTkbQ1aVaK3FJcpxS5CE7ffsWFxVRa1Qk8VZZn4OvYVrF/5AZIhZz9KmEuVpge2BC 3jEwbXzTgi6jLLiN23u27/AtO6gGZBt+a52vpxUqYnNZgq5mGzSmbQkrialXmERw7Mdu QqQ7o14R8mADpW4FG6od+J+lMq1UTU+vgPkBV8uMbq0CQtrCgdI5P1u0PVgj1Mz6nBU2 mXOtp4C0Gn3nmRshDGjHJFSXI0oWCcJD0lDK9cqmPup0UqpWE80BnVeiIyshrcbZvhJY by1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature; bh=9a5eFcihQUq7qy0i7HSgljUqDP86sFxHsEy34RhOaEc=; b=H0A9oBbxliSpMFbHjJQaGrGov+VInVs2su1R3QNTzKWElL3TaZYRrs+X8MwAtrsu51 Dyp2XWH3Ch7ywZMIyxP/tSlci8QrVCOBXQIo7qZiyOmCVKQtwMqWwk10wFd0OvMNtwP1 IP/Rd1LIzMOEKv5r+FjfIRO/yPUdQl0AO+ntUgJ+C3bxXxovSNhBjSmlXMrdHTSHCV9k s7i068II57VM/PlICRyO4QbjFWVRtqMwUgyVVCnTlk+dJnTVEtgq0qE/5fi71zdfx9HC UYp9qma9Mekw+KWhZrhsd/fJr8cibZ4PnCvKjoh+Hrxxkl6LdfU8LBuRQGOUZK3hxhDB AR2w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=RgDwR82r; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h123-20020a636c81000000b004393c9493ecsi708707pgc.568.2022.09.19.14.02.23; Mon, 19 Sep 2022 14:02:36 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@lunn.ch header.s=20171124 header.b=RgDwR82r; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229724AbiISUjY (ORCPT + 99 others); Mon, 19 Sep 2022 16:39:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36738 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229546AbiISUjX (ORCPT ); Mon, 19 Sep 2022 16:39:23 -0400 Received: from vps0.lunn.ch (vps0.lunn.ch [185.16.172.187]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 913D745F64; Mon, 19 Sep 2022 13:39:22 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lunn.ch; s=20171124; h=In-Reply-To:Content-Disposition:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:From:Sender:Reply-To:Subject: Date:Message-ID:To:Cc:MIME-Version:Content-Type:Content-Transfer-Encoding: Content-ID:Content-Description:Content-Disposition:In-Reply-To:References; bh=9a5eFcihQUq7qy0i7HSgljUqDP86sFxHsEy34RhOaEc=; b=RgDwR82rK1dtGtdMvjGJDG0xb1 jVNfbiEFzydQWYnJMbomUOd+PhU3g5fFQmPSoCDbh5zNig7MlRovJA8YLtgqzMhgPGOgo2W7f1/p7 PmKNhLohVvohRGTrMCzlu/+CjDAzAIDS8F99YXE5RqJpjTbmYcEeUcSG5wllP0AHKNnI=; Received: from andrew by vps0.lunn.ch with local (Exim 4.94.2) (envelope-from ) id 1oaNXn-00HAtX-RS; Mon, 19 Sep 2022 22:39:07 +0200 Date: Mon, 19 Sep 2022 22:39:07 +0200 From: Andrew Lunn To: Sean Anderson Cc: "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , netdev@vger.kernel.org, Zheyu Ma , open list , Rolf Eike Beer , Nick Bowler Subject: Re: [PATCH] net: sunhme: Fix packet reception for len < RX_COPY_THRESHOLD Message-ID: References: <20220918215534.1529108-1-seanga2@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220918215534.1529108-1-seanga2@gmail.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Sun, Sep 18, 2022 at 05:55:34PM -0400, Sean Anderson wrote: > There is a separate receive path for small packets (under 256 bytes). > Instead of allocating a new dma-capable skb to be used for the next packet, > this path allocates a skb and copies the data into it (reusing the existing > sbk for the next packet). There are two bytes of junk data at the beginning > of every packet. I believe these are inserted in order to allow aligned > DMA and IP headers. We skip over them using skb_reserve. Before copying > over the data, we must use a barrier to ensure we see the whole packet. The > current code only synchronizes len bytes, starting from the beginning of > the packet, including the junk bytes. However, this leaves off the final > two bytes in the packet. Synchronize the whole packet. > > To reproduce this problem, ping a HME with a payload size between 17 and 214 > > $ ping -s 17 > > which will complain rather loudly about the data mismatch. Small packets > (below 60 bytes on the wire) do not have this issue. I suspect this is > related to the padding added to increase the minimum packet size. > > Signed-off-by: Sean Anderson Hi Sean > Patch-prefix: net This should be in the Subject of the email. Various tools look for the netdev tree there. Please try to remember that for future patches. Please could you add a Fixes: tag indicating when the problem was introduced. Its O.K. if that was when the driver was added. It just helps getting the patch back ported to older stable kernels. I think patchwork allows you to just reply to your post, and it will automagically append the Fixes: tag when the Maintainer actually applies the patch. Reviewed-by: Andrew Lunn Andrew