Received: by 2002:a05:6358:9144:b0:117:f937:c515 with SMTP id r4csp5832759rwr; Tue, 9 May 2023 06:58:48 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5xI6L0tjYu75/K3cT76EL70NxwSfbZzPQQci60zefLc/SzWOKUqcgMF/y3BVURplX33xEE X-Received: by 2002:a17:90a:404b:b0:24e:3b85:a8a with SMTP id k11-20020a17090a404b00b0024e3b850a8amr14251063pjg.8.1683640727924; Tue, 09 May 2023 06:58:47 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1683640727; cv=none; d=google.com; s=arc-20160816; b=FnUjCFADcFqDB521zU/BA2rTOgey+ABSTpcVwNqedW7xkaz7MomEScDowFTfOKC68o QwcmCZjnivunbWqF3Ufw+61rRbIMRHkNR4rLyQ8CBXxTN7hJgM2g7Ytkf8HuWrmSc9Yy +0SDux8CmZzUMTCO8ZwGTV7PbP2fTBnVVGJZuW5WP6HomU7+nfiX/yioGxvA+wQdrXEF L2W8+aQK6WYsmHHmpal2xmPKfvWAdTUEREB9j4VGxi8COemg5Lfw0M5Qb9uVKIWhu0mr i2SZgJnz8wATyMC/8zF/dIx1wxn6pBa53D/I1iicGDwCl71Alf6UVLReyFlnjECD0lPb EhPA== 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=hdwI/AkyTU66buGqE7lfCVm6ldv8XBqIEgkIQZk17DM=; b=w0wIcGFuifSoHyl7gJKBuSzlDeEA4GkMqf2WVY5gaKJnRGkM8Hy6zrdnTISjloLtP4 XgsQ7EnZDem3HKA7y90mxpbm8cWoojpD6HAjKei9ZOA1i/rt7AguP5fD5vaTT/V6o1bl +YPdaNxJL2cEE835IIX75MJZl5GyUhP0glqBVEcy/mJNF2Fr63wt8wu1wirZwygazYbv mkua8u6iUVACOKIAyBxuK4V4tmrzNQbvgJ/Pj5/jcWzXrAlOuJPIPA1vyeVwosBwRVeD kLZzsYwUznMH33omvSRGdCsvmtfTfeLEA5fi/+VrFe/IW2tyhaXX78YCP9HbQYp1Ahri YSag== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b="JmNfpXc/"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id lt9-20020a17090b354900b0024df993792dsi4321035pjb.80.2023.05.09.06.58.36; Tue, 09 May 2023 06:58:47 -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=@kernel.org header.s=k20201202 header.b="JmNfpXc/"; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235613AbjEINnZ (ORCPT + 99 others); Tue, 9 May 2023 09:43:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36396 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235304AbjEINnX (ORCPT ); Tue, 9 May 2023 09:43:23 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 47D5030F3 for ; Tue, 9 May 2023 06:43:17 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id BAC8A62FEB for ; Tue, 9 May 2023 13:43:16 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 318EDC433EF; Tue, 9 May 2023 13:43:14 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1683639796; bh=wAyj0pfH0D6dPu3vwviP23w1K4Snew4vfueLBpD7evU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=JmNfpXc/WQwNWK/wVWSUGvBKFC26Vy9UCPyWwLVeIKyJ6pHVhP1myzdS6dQuy/wV0 lY7mLWdJIT0PFT1v5jnKEHxM5VhtFyGsErpEbIUDmPPg5bD8p6FKaLg3KVUR/Tohcf QjEuEWZZ+kHpYki6pmTX7lQv4RJGE7T0SFSc/Q3OiLsZ9yKax99/f1qQEhfDggxgMU DJE9PlEeEXdyhZywtR/t2KFyjo7ApljYcHkPNtZPQ89DOq8VxOwIaaKyAaCRYB9QIv XWGELz913XJ5yDJV9hRQ+pZdlSnbImHVsWNaPAi+YGA1qVLcncIPTBK+Ld4QjyeGWL TfM9B+el0ruEA== Date: Tue, 9 May 2023 16:43:11 +0300 From: Leon Romanovsky To: Yunsheng Lin Cc: davem@davemloft.net, kuba@kernel.org, pabeni@redhat.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH net-next v1 1/2] net: introduce and use skb_frag_fill_page_desc() Message-ID: <20230509134311.GN38143@unreal> References: <20230509114337.21005-1-linyunsheng@huawei.com> <20230509114337.21005-2-linyunsheng@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230509114337.21005-2-linyunsheng@huawei.com> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Tue, May 09, 2023 at 07:43:36PM +0800, Yunsheng Lin wrote: > Most users use __skb_frag_set_page()/skb_frag_off_set()/ > skb_frag_size_set() to fill the page desc for a skb frag. > > Introduce skb_frag_fill_page_desc() to do that. > > net/bpf/test_run.c does not call skb_frag_off_set() to > set the offset, "copy_from_user(page_address(page), ...)" > suggest that it is assuming offset to be initialized as > zero, so call skb_frag_fill_page_desc() with offset being > zero for this case. > > Also, skb_frag_set_page() is not used anymore, so remove > it. > > Signed-off-by: Yunsheng Lin > --- > .../net/ethernet/aquantia/atlantic/aq_ring.c | 6 ++-- > drivers/net/ethernet/broadcom/bnxt/bnxt.c | 5 ++- > drivers/net/ethernet/chelsio/cxgb3/sge.c | 5 ++- > drivers/net/ethernet/emulex/benet/be_main.c | 32 ++++++++++--------- > drivers/net/ethernet/freescale/enetc/enetc.c | 5 ++- > .../net/ethernet/fungible/funeth/funeth_rx.c | 5 ++- > drivers/net/ethernet/marvell/mvneta.c | 5 ++- > .../net/ethernet/mellanox/mlx5/core/en_rx.c | 4 +-- > drivers/net/ethernet/sun/cassini.c | 8 ++--- > drivers/net/virtio_net.c | 4 +-- > drivers/net/vmxnet3/vmxnet3_drv.c | 4 +-- > drivers/net/xen-netback/netback.c | 4 +-- > include/linux/skbuff.h | 27 ++++++---------- > net/bpf/test_run.c | 3 +- > net/core/gro.c | 4 +-- > net/core/pktgen.c | 13 +++++--- > net/core/skbuff.c | 7 ++-- > net/tls/tls_device.c | 10 +++--- > net/xfrm/xfrm_ipcomp.c | 5 +-- > 19 files changed, 64 insertions(+), 92 deletions(-) > Thanks, Reviewed-by: Leon Romanovsky