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=-10.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,MAILING_LIST_MULTI, NICE_REPLY_A,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 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 83C5CC2B9F4 for ; Mon, 28 Jun 2021 14:35:44 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 69A8C61CA0 for ; Mon, 28 Jun 2021 14:35:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234151AbhF1OiF (ORCPT ); Mon, 28 Jun 2021 10:38:05 -0400 Received: from www62.your-server.de ([213.133.104.62]:55000 "EHLO www62.your-server.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234578AbhF1Of4 (ORCPT ); Mon, 28 Jun 2021 10:35:56 -0400 Received: from sslproxy03.your-server.de ([88.198.220.132]) by www62.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92.3) (envelope-from ) id 1lxsKC-0002mF-GH; Mon, 28 Jun 2021 16:33:24 +0200 Received: from [85.7.101.30] (helo=linux.home) by sslproxy03.your-server.de with esmtpsa (TLSv1.3:TLS_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lxsKB-000XfH-Fo; Mon, 28 Jun 2021 16:33:24 +0200 Subject: Re: [PATCH net v3] xdp, net: fix for construct skb by xdp inside xsk zc rx To: Xuan Zhuo , netdev@vger.kernel.org, bpf@vger.kernel.org Cc: Jesse Brandeburg , Tony Nguyen , "David S. Miller" , Jakub Kicinski , Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , Maxime Coquelin , =?UTF-8?B?QmrDtnJuIFTDtnBlbA==?= , Magnus Karlsson , Jonathan Lemon , Alexei Starovoitov , Jesper Dangaard Brouer , John Fastabend , Jeff Kirsher , Krzysztof Kazimierczak , Maciej Fijalkowski , Ong Boon Leong , intel-wired-lan@lists.osuosl.org, linux-stm32@st-md-mailman.stormreply.com, maximmi@nvidia.com References: <20210628114647.75449-1-xuanzhuo@linux.alibaba.com> From: Daniel Borkmann Message-ID: <0a1614c4-19b7-2665-8eb9-7df776fa4c13@iogearbox.net> Date: Mon, 28 Jun 2021 16:33:10 +0200 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.7.2 MIME-Version: 1.0 In-Reply-To: <20210628114647.75449-1-xuanzhuo@linux.alibaba.com> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit X-Authenticated-Sender: daniel@iogearbox.net X-Virus-Scanned: Clear (ClamAV 0.103.2/26215/Mon Jun 28 13:09:26 2021) Precedence: bulk List-ID: X-Mailing-List: bpf@vger.kernel.org Hi Xuan, On 6/28/21 1:46 PM, Xuan Zhuo wrote: > When each driver supports xsk rx, if the received buff returns XDP_PASS > after run xdp prog, it must construct skb based on xdp. This patch > extracts this logic into a public function xdp_construct_skb(). > > There is a bug in the original logic. When constructing skb, we should > copy the meta information to skb and then use __skb_pull() to correct > the data. > > Fixes: 0a714186d3c0f ("i40e: add AF_XDP zero-copy Rx support") > Fixes: 2d4238f556972 ("ice: Add support for AF_XDP") > Fixes: bba2556efad66 ("net: stmmac: Enable RX via AF_XDP zero-copy") > Fixes: d0bcacd0a1309 ("ixgbe: add AF_XDP zero-copy Rx support") > Signed-off-by: Xuan Zhuo There was still an ongoing discussion on the v2 of your patch between Maciej and Maxim (Cc). Before you submit a v3, please let the discussion conclude first. Thanks, Daniel