From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pl1-x629.google.com (mail-pl1-x629.google.com [IPv6:2607:f8b0:4864:20::629]) by mail.toke.dk (Postfix) with ESMTPS id 72C50A1AE36 for ; Wed, 19 Jul 2023 20:59:39 +0200 (CEST) Authentication-Results: mail.toke.dk; dkim=pass (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20221208 header.b=CbsznE8d Received: by mail-pl1-x629.google.com with SMTP id d9443c01a7336-1b8b318c5cfso57306125ad.1 for ; Wed, 19 Jul 2023 11:59:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1689793177; x=1692385177; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=5ke2+UctC+DoOwplZHrK3x2BR06F4065MTKEWhT518s=; b=CbsznE8dvx8wKJEQAxpORbIXdmli5Zh/FPlmQ4MIyqQYlQlNjsA5dP40FCBBYE+eQY 4/+4JI9nwSc9KoqplrIaeDxJ0dydcLJ2b5q9tzkzky9Sd40Y5guMJY70lstH44YvnLGr U1KlW4zL7ZqqCi5Q05CgPJEwjYxGbfvMMRPaxxJQGYEPTF3ljzUWl1nmZyuzp1FZNJKB LVl3xkYBzyK+8E1mHV8Bx+M+Cdj9c8VF2zzhhajhxy7BeAmrZQMBZcv6p++uDIAj67PP jnO/iqLE891qEavXM+s5x9i9CNqWRTlgOMfgUrE7TPggt3g0e/mFo+tACWmH+drqStJA Yprw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689793177; x=1692385177; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=5ke2+UctC+DoOwplZHrK3x2BR06F4065MTKEWhT518s=; b=XeCY9oR/Ap5GB50Y0mWTnvodfUlms+0VzLMhvU8ZuCBssuzN/eLeDSUde2iT6oUKU6 F/zPKdJzQivutQdy2yhGxN6x1AAeEGSw3g+77m7Eldm+ryG1Z2kLCR7ipvB+8wyRJcrC P+0IpllL/XFqG5snqIy/QrryDqaU0JFOJnU5TpVejnCJsoChQPjwWva1Vt1Xoq1RYT2R LWnfNZSw9A9Ga8sr0nxc2NWtERFis7u08ntF1QeHY8Tr1g6JSY6hBJKQ8XxqTdUmiPNP TnBiVwS/4OIhoObCTc40ifPPAGb4P2w502/etHPlCx6bBDWmI40XzoJlldZtYFvV6ZLg 0iCQ== X-Gm-Message-State: ABy/qLYUXLS2N3O8QZENu2WVly0mAzKlEOL+deB+Jooly58ePVEFxJVV d63ICl4I11Lmdw9cGMzBGug= X-Google-Smtp-Source: APBJJlFFs6ZPqDq5j/f2gL+3ynFPPHBUrnM/pdVxNM3ZzTJGDgYheYOnkkODQvN1NPk3F+2i0jkrtQ== X-Received: by 2002:a17:902:cec3:b0:1b8:971c:b7b7 with SMTP id d3-20020a170902cec300b001b8971cb7b7mr23731180plg.56.1689793177405; Wed, 19 Jul 2023 11:59:37 -0700 (PDT) Received: from macbook-pro-8.dhcp.thefacebook.com ([2620:10d:c090:500::4:8907]) by smtp.gmail.com with ESMTPSA id l8-20020a170902f68800b001b892aac5c9sm4305624plg.298.2023.07.19.11.59.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 19 Jul 2023 11:59:37 -0700 (PDT) Date: Wed, 19 Jul 2023 11:59:30 -0700 From: Alexei Starovoitov To: Larysa Zaremba Message-ID: <20230719185930.6adapqctxfdsfmye@macbook-pro-8.dhcp.thefacebook.com> References: <20230719183734.21681-1-larysa.zaremba@intel.com> <20230719183734.21681-14-larysa.zaremba@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230719183734.21681-14-larysa.zaremba@intel.com> Message-ID-Hash: 2NWW77KME3EDSIQC7MRACVII5M5JDOKZ X-Message-ID-Hash: 2NWW77KME3EDSIQC7MRACVII5M5JDOKZ X-MailFrom: alexei.starovoitov@gmail.com X-Mailman-Rule-Misses: dmarc-mitigation; no-senders; approved; emergency; loop; banned-address; member-moderation; nonmember-moderation; administrivia; implicit-dest; max-recipients; max-size; news-moderation; no-subject; digests; suspicious-header CC: bpf@vger.kernel.org, ast@kernel.org, daniel@iogearbox.net, andrii@kernel.org, martin.lau@linux.dev, song@kernel.org, yhs@fb.com, john.fastabend@gmail.com, kpsingh@kernel.org, sdf@google.com, haoluo@google.com, jolsa@kernel.org, David Ahern , Jakub Kicinski , Willem de Bruijn , Jesper Dangaard Brouer , Anatoly Burakov , Alexander Lobakin , Magnus Karlsson , Maryam Tahhan , xdp-hints@xdp-project.net, netdev@vger.kernel.org X-Mailman-Version: 3.3.8 Precedence: list Subject: [xdp-hints] Re: [PATCH bpf-next v3 13/21] ice: Implement checksum hint List-Id: XDP hardware hints design discussion Archived-At: List-Archive: List-Help: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: On Wed, Jul 19, 2023 at 08:37:26PM +0200, Larysa Zaremba wrote: > Implement .xmo_rx_csum callback to allow XDP code to determine, > whether HW has validated any checksums. > > Signed-off-by: Larysa Zaremba > --- > drivers/net/ethernet/intel/ice/ice_txrx_lib.c | 29 +++++++++++++++++++ > 1 file changed, 29 insertions(+) > > diff --git a/drivers/net/ethernet/intel/ice/ice_txrx_lib.c b/drivers/net/ethernet/intel/ice/ice_txrx_lib.c > index 54685d0747aa..6647a7e55ac8 100644 > --- a/drivers/net/ethernet/intel/ice/ice_txrx_lib.c > +++ b/drivers/net/ethernet/intel/ice/ice_txrx_lib.c > @@ -660,8 +660,37 @@ static int ice_xdp_rx_vlan_tag(const struct xdp_md *ctx, u16 *vlan_tci, > return 0; > } > > +/** > + * ice_xdp_rx_csum_lvl - Get level, at which HW has checked the checksum > + * @ctx: XDP buff pointer > + * @csum_status: destination address > + * @csum_info: destination address > + * > + * Copy HW checksum level (if was checked) to the destination address. > + */ > +static int ice_xdp_rx_csum(const struct xdp_md *ctx, > + enum xdp_csum_status *csum_status, > + union xdp_csum_info *csum_info) > +{ > + const struct ice_xdp_buff *xdp_ext = (void *)ctx; > + const union ice_32b_rx_flex_desc *eop_desc; > + enum ice_rx_csum_status status; > + u16 ptype; > + > + eop_desc = xdp_ext->pkt_ctx.eop_desc; > + ptype = ice_get_ptype(eop_desc); > + > + status = ice_get_rx_csum_status(eop_desc, ptype); > + if (status & ICE_RX_CSUM_NONE) > + return -ENODATA; > + > + *csum_status = ice_rx_csum_lvl(status) + 1; > + return 0; > +} and xdp_csum_info from previous patch left uninitialized? What was the point adding it then?