From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id C23F9A04BB; Tue, 6 Oct 2020 15:13:57 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 1DA751B28E; Tue, 6 Oct 2020 15:13:56 +0200 (CEST) Received: from mail-io1-f67.google.com (mail-io1-f67.google.com [209.85.166.67]) by dpdk.org (Postfix) with ESMTP id 683531B222 for ; Tue, 6 Oct 2020 15:13:54 +0200 (CEST) Received: by mail-io1-f67.google.com with SMTP id u6so12916188iow.9 for ; Tue, 06 Oct 2020 06:13:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=2mhgzeuVirjmnyaA7C7LhLqKoVYFzVssguMC9Ke6Ac0=; b=m/xVDKuxQQ+1e7V40ZhWw4MT2dvicwWbmwEl7pvdSz3Ztun/+0B3nDWr/seeK0YM8k EOwDzBD9vjzLPqcNFSvKoMiAFfaNOqgrYpqG6yhFOBVQ69ADB6lOncl0LbNqTzNPHOKN YCfuqKynkj6mQC0IZp7SHA+HUK5NZawmWWnGOosuHUpLHz0z18AyFQpWX9o+pOKr7IPX M/kPRU3nthHQ8BXJU+ZmhaQ7o8A8+lZCJRT0/YeNBKrXDc/+tWS+bPPaJ0RgWeJS0ulY Y99xNC9VyFrWRucXAcEl/38oVpinMGWVWhMeA1kpW23b8Aa/HgxvFIdApTqvNsEPt14G uXug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=2mhgzeuVirjmnyaA7C7LhLqKoVYFzVssguMC9Ke6Ac0=; b=SX7roa9XEn2O6+p86T3/ryssJodbkadrksWJnk86j0c4msYCqq5DgdEYHBw4QDGVPr ZIn1e6o+awRu0Awshv8RROrJALtXeiEERPjeAJNE28ZJm9Rwb3psN1VQYzc/V/xMajti mTrRrt8I1jj7BBLctKYkS8JYBEod2p2mKUT/mL5Sq4EbG/soLGJdDW3+60YnJZVKIPDB 2lOBF5CvyOuX5M+D+bpeaVskTC2kZkF7kQv33fF3nmZDTy/wKPL2VNq0+bOhDru1incl 8lif2wzA3uZj0qdLHrvyo/QMd1VXQQOCQ6FEXLD8hQPKRK6MKWHMCanY0Krb7+3L3fZl nSYg== X-Gm-Message-State: AOAM531upzRXzvJwUb4iMiYPkCJgX9+Lbl5UJQ2Q+i5MEcfceNDK1Ujp QED0f8ewfy9+6HItQZGoWA7TLBRcvf4Z6l1B49E= X-Google-Smtp-Source: ABdhPJzDYdZStpkGv14cx1/DW9SuOCRxofpVlZSm9Y5EXDgCjn8Ew+aYhbm+Nn6xp1g/5wX9X2osdeEB0zlVU/Ve7ts= X-Received: by 2002:a02:a196:: with SMTP id n22mr1201358jah.104.1601990032636; Tue, 06 Oct 2020 06:13:52 -0700 (PDT) MIME-Version: 1.0 References: <20200831075333.10135-1-nipun.gupta@nxp.com> <20201005071506.28861-1-nipun.gupta@nxp.com> <20201005083455.2fdf57f2@hermes.local> In-Reply-To: From: Jerin Jacob Date: Tue, 6 Oct 2020 18:43:36 +0530 Message-ID: To: Nipun Gupta Cc: Stephen Hemminger , dpdk-dev , Thomas Monjalon , Ferruh Yigit , Andrew Rybchenko , Hemant Agrawal , Sachin Saxena , Rohit Raj Content-Type: text/plain; charset="UTF-8" Subject: Re: [dpdk-dev] [PATCH 1/3 v2] ethdev: add rx offload to drop error packets X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" On Tue, Oct 6, 2020 at 6:40 PM Nipun Gupta wrote: > > > > > -----Original Message----- > > From: Jerin Jacob > > Sent: Tuesday, October 6, 2020 5:31 PM > > To: Nipun Gupta > > Cc: Stephen Hemminger ; dpdk-dev > > ; Thomas Monjalon ; Ferruh Yigit > > ; Andrew Rybchenko ; > > Hemant Agrawal ; Sachin Saxena > > ; Rohit Raj > > Subject: Re: [dpdk-dev] [PATCH 1/3 v2] ethdev: add rx offload to drop error > > packets > > > > On Tue, Oct 6, 2020 at 4:07 PM Nipun Gupta wrote: > > > > > > > > > > > > > -----Original Message----- > > > > From: Jerin Jacob > > > > Sent: Monday, October 5, 2020 9:40 PM > > > > To: Stephen Hemminger > > > > Cc: Nipun Gupta ; dpdk-dev ; > > Thomas > > > > Monjalon ; Ferruh Yigit ; > > > > Andrew Rybchenko ; Hemant Agrawal > > > > ; Sachin Saxena ; > > Rohit > > > > Raj > > > > Subject: Re: [dpdk-dev] [PATCH 1/3 v2] ethdev: add rx offload to drop error > > > > packets > > > > > > > > On Mon, Oct 5, 2020 at 9:05 PM Stephen Hemminger > > > > wrote: > > > > > > > > > > On Mon, 5 Oct 2020 12:45:04 +0530 > > > > > nipun.gupta@nxp.com wrote: > > > > > > > > > > > From: Nipun Gupta > > > > > > > > > > > > This change adds a RX offload capability, which once enabled, > > > > > > hardware will drop the packets in case there of any error in > > > > > > the packet such as L3 checksum error or L4 checksum. > > > > > > > > IMO, Providing additional support up to the level to choose the errors > > > > to drops give more control to the application. Meaning, > > > > L1 errors such as FCS error > > > > L2 errors .. > > > > L3 errors such checksum > > > > i.e ethdev spec need to have error level supported by PMD and the > > > > application can set the layers interested to drop. > > > > > > Agree, but 'DEV_RX_OFFLOAD_ERR_PKT_DROP' shall also be there to drop all > > the > > > error packets? Maybe we can rename it to > > DEV_RX_OFFLOAD_ALL_ERR_PKT_DROP. > > > > IMHO, we introduce such shortcut for a single flag for all err drop > > then we can not change the scheme > > without an API/ABI break. > > Are the following offloads fine: > DEV_RX_OFFLOAD_L1_FCS_ERR_PKT_DROP > DEV_RX_OFFLOAD_L3_CSUM_ERR_PKT_DROP > DEV_RX_OFFLOAD_L4_CSUM_ERR_PKT_DROP > DEV_RX_OFFLOAD_ALL_ERR_PKT_DROP > > Please let me know in case I need to add any other too. I think, single offload flags and some config/capability structure to define the additional layer selection would be good, instead of adding a lot of new offload flags. > Ill send a v3. > > Thanks, > Nipun > > > > > > > > > Currently we have not planned to add separate knobs for separate error in > > > the driver, maybe we can define them separately, or we need have them in > > > this series itself? > > > > I think, ethdev API can have the capability on what are levels it > > supported, in your > > driver case, you can express the same. > > > > > > > > > > > > > > > > > > > > > > > Signed-off-by: Nipun Gupta > > > > > > Signed-off-by: Rohit Raj > > > > > > --- > > > > > > These patches are based over series: > > > > > > > > > > > > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fpatchwo > > > > > > rk.dpdk.org%2Fpatch%2F78630%2F&data=02%7C01%7Cnipun.gupta%40nx > > > > > > p.com%7C90b516fd465c48945e7008d869492b3e%7C686ea1d3bc2b4c6fa92cd9 > > > > > > 9c5c301635%7C0%7C0%7C637375110263097933&sdata=RBQswMBsfpM6 > > > > nyKur%2FaHvOMvNK7RU%2BRyhHt%2FXBsP1OM%3D&reserved=0 > > > > > > > > > > > > Changes in v2: > > > > > > - Add support in DPAA1 driver (patch 2/3) > > > > > > - Add support and config parameter in testpmd (patch 3/3) > > > > > > > > > > > > lib/librte_ethdev/rte_ethdev.h | 1 + > > > > > > 1 file changed, 1 insertion(+) > > > > > > > > > > Maybe this should be an rte_flow match/action which would then make it > > > > > more flexible? > > > > > > > > I think, it is not based on any Patten matching. So IMO, it should be best if it > > > > is part of RX offload. > > > > > > > > > > > > > > There is not much of a performance gain for this in real life and > > > > > if only one driver supports it then I am not convinced this is needed. > > > > > > > > Marvell HW has this feature.