From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id E59C645D22; Wed, 27 Nov 2024 01:16:41 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id D006840EE3; Wed, 27 Nov 2024 01:16:41 +0100 (CET) Received: from mail-pg1-f173.google.com (mail-pg1-f173.google.com [209.85.215.173]) by mails.dpdk.org (Postfix) with ESMTP id 44EDF402A7 for ; Wed, 27 Nov 2024 01:16:40 +0100 (CET) Received: by mail-pg1-f173.google.com with SMTP id 41be03b00d2f7-7fbd9be84bdso3883613a12.1 for ; Tue, 26 Nov 2024 16:16:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1732666599; x=1733271399; darn=dpdk.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=QBFY6H9LgFQn3yTJpL0zRZcLBSDRTuWoBWCCxPm5GqI=; b=HZ43z9Kgk7ZhkXHWrT7exRLKHVQZzqyVGxDR6CytGgKBFksvKU2iykF+2vABgAdnTk bJdruZIlLNXz63catoc4juqyeMwQOljKFQtBGbe9h5SYurHNdQeskM5Yan6IXLSuqJgb 5Nt0jwscsXfLNWAxZsyyES7LbWHpdeLFPeQk0vHaHC0YyOyeHbXwkF8iYQMTGrtkjurT LhL/EAejvIoHgIjUnrVLlB3rti9mxZFiPr9EjkKUyJRcgnvyo6tMbKR87MQ2/8cbUezX 7HVoj6x6HnutJwcumDTtkhfWRmEcszQq3iCHUfYyzQ9L2/AuwCySNcad6mMY787+QdPh p0Xg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1732666599; x=1733271399; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=QBFY6H9LgFQn3yTJpL0zRZcLBSDRTuWoBWCCxPm5GqI=; b=mDKhdfP/21J7Mby4JcSp7nSvfhMw6nxw2xzEjsIbaSpbPRue/bRQ3fnqEStH69nak4 EOcGm0JRBdNoVOlKg1rD4NkkMT1+lZCMCkDvnMts0iWI1Nz0BgfycKcaXZ09ze0YSWem eFpPZQyxVMfW0S1W2gV0/WYE2Xk5SOktHzbWRqE6YovVOXyS+btGJWjH89BJE6TxlDtW eugnohZtmmF6p8t5qwQF30CLUh5AItt4u/Xaq31uj/6rNs9THPgrn1Ppk23zMqkxNhQG 32BYP4qP2FSaBiVaDZSVg5axiDhHCn5ypJQB2kGckgXucdBZCPLbCtFgQcrWyw6hM1E7 QWww== X-Gm-Message-State: AOJu0Yx/yDFNleXIm7TKpH1vJKtMip+6jiLDcc3CiVi+qyIt/FqrYHF7 DErZOqxXvb26tXKK+7YbOeMFQLk/cnv2M+GmhCjCXHEL4pVce+zH/aBQTs6c0iI= X-Gm-Gg: ASbGncvTkvS4czEbl60aUbLynkIl4hMFoOV2wnZFoZHxdl8wKJp8se++A13+qwZxGuX dKuCq6nZhW0v3GiQdmD4JgxuJ/ISrp0D2jRYoVxDk0WV3T/ir9e0R2rvR3p3lX8wYdfcOmkg3Si hlqS98K77iWLiJG4qG0zeUjspQpkfcctfz5+k76DQoDtTDu1JZ0OQPoHaPOK1v0Bh4VkjzbtohV ZOYbAGSLIGN+XpPfsN2c8KWicFPrUHe6XW0fN85Pts35WxEocf1EyUSn+nvIvneo8CHco/wijWU ECsIZgVly1ruONVl/6RynB/hlh0= X-Google-Smtp-Source: AGHT+IEe8D/bFw/ZZPFBOByBJrXhSbORYWi4XYpo6l74F9q52ovpVcV18eptZKZkgczjXIvphuiEpQ== X-Received: by 2002:a05:6a20:6f0a:b0:1e0:d1c5:123 with SMTP id adf61e73a8af0-1e0e0ac58a4mr1838682637.12.1732666599300; Tue, 26 Nov 2024 16:16:39 -0800 (PST) Received: from hermes.local (204-195-96-226.wavecable.com. [204.195.96.226]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-724de531b68sm8990917b3a.111.2024.11.26.16.16.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 26 Nov 2024 16:16:39 -0800 (PST) Date: Tue, 26 Nov 2024 16:16:37 -0800 From: Stephen Hemminger To: Jie Hai Cc: , , , , Yisen Zhuang , "Wei Hu (Xavier)" , "Min Hu (Connor)" , , , Subject: Re: [PATCH v3 3/3] net/hns3: fix Rx packet without CRC data Message-ID: <20241126161637.4d37c237@hermes.local> In-Reply-To: <20240719090415.1513301-4-haijie1@huawei.com> References: <20240206011030.2007689-1-haijie1@huawei.com> <20240719090415.1513301-1-haijie1@huawei.com> <20240719090415.1513301-4-haijie1@huawei.com> MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On Fri, 19 Jul 2024 17:04:15 +0800 Jie Hai wrote: > From: Dengdui Huang > > When KEEP_CRC offload is enabled, the CRC data is still stripped > in following cases: > 1. For HIP08 network engine, the packet type is TCP and the length > is less than or equal to 60B. > 2. For HIP09 network engine, the packet type is IP and the length > is less than or equal to 60B. > > So driver has to recaculate packet CRC for this rare scenarios. > > In addition, to avoid impacting performance, KEEP_CRC is not > supported when NEON or SVE algorithm is used. > > Fixes: 8973d7c4ca12 ("net/hns3: support keeping CRC") > Cc: stable@dpdk.org > > Signed-off-by: Dengdui Huang > Acked-by: Huisong Li > Acked-by: Jie Hai Changed my mind on these patches after digging deeper into what other drivers are doing. The proposed patches for hns3 do the opposite of what the consensus of drivers is. When looking at internals, all other drivers do not include the CRC in the packet length calculation. It is hard to go back and determine the rational for this, but my assumption is that if a packet is received (with KEEP_CRC enabled), the application will likely want to send that packet to another location, and the transmit side doesn't want the CRC. There are a couple of related driver bugs in some drivers in handling of the flag as well. One driver (idpf) thinks the CRC should count for the byte statistics. This should be clarified and fixed. One driver (atlantic) adds a check but doesn't implement the flag; the check for valid offload flags is already handled by ethdev API. Please resubmit for a later release, and can be picked up then by 24.11 stable. You have found an area of DPDK which is poorly documented. Will raise an agenda at next techboard to get a final agreement, then put that into the programmer's guide.