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 EE82CA04B6; Sun, 11 Oct 2020 23:41:45 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id BEA011BEE3; Sun, 11 Oct 2020 23:41:43 +0200 (CEST) Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id 6E81C1B74B for ; Sun, 11 Oct 2020 23:41:42 +0200 (CEST) Received: from compute2.internal (compute2.nyi.internal [10.202.2.42]) by mailout.nyi.internal (Postfix) with ESMTP id DD5E35C00A7; Sun, 11 Oct 2020 17:41:40 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Sun, 11 Oct 2020 17:41:40 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding:content-type; s=fm2; bh= 2MAThrHk+Yt7ivRNl+Bpo2S0ZlkdeQbwXSpQNlgcQSc=; b=kbhz87fg2TEW7Xp8 uki957v1flDNGEK0i+0S6JEWesOxHkkJSOoPzeLNyU/xGfQjZI86pSVy/1fT2+AO 02fREwppoXlx4Ak3vBj3rvOjXAINTNlnnTPmmhJGftbTIO+3hgatOGksIC0TSFeP a5sq152Ka/damfY2CHqRmeA34E+/ewAknJy08hp29HJPg3521afjxgRD4m7Z1nDh oibHB/WDFyaJ2miyRpdNZB4+STmGm4+SigeSbTssVJnBT3Bj4qNf0O/XgDdPWaCu qHSrIcjIkuyej1kl7oWrZCDLiw64vB+S1kxamlg/bkdyFeKb2bQR3j/l9xbNmDvz FGl0uQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-transfer-encoding:content-type :date:from:in-reply-to:message-id:mime-version:references :subject:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; bh=2MAThrHk+Yt7ivRNl+Bpo2S0ZlkdeQbwXSpQNlgcQ Sc=; b=ZpKbwrMfzrOLH7rwAc1O2Xe+RgsO7P1d0Bjz9Cgx/kR1S+VVMuNxNw7qQ hczSJaIEwXD4PfQECkoxBnV5NRco6zMjsLMQMkaXB2hEM+RxlTcl5QiRsfTSp2GE eyzOcx8ZYrtx+lIUaRX7TbO2KnWXchRCRKKTGuLBqT/jl9GVODBZEBb8/Gz6rh7X UNuxm/A/FtCNc1addWjyn+wG+TbANGFXDjQo+uFJZbgXO/CNSeeZMiW/wlDH42LL yZh19rNuUHj4H3UJ0N1GrKbnAIDLNs7Q8zVOsjPcKG4CukMG5cyyK55dTTDDWIXN Y4SS3OjpUID1gIEObZQR8kYeJri4g== X-ME-Sender: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedujedrheeigddtvdcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpefhvffufffkjghfggfgtgesthfuredttddtvdenucfhrhhomhepvfhhohhmrghs ucfoohhnjhgrlhhonhcuoehthhhomhgrshesmhhonhhjrghlohhnrdhnvghtqeenucggtf frrghtthgvrhhnpedugefgvdefudfftdefgeelgffhueekgfffhfeujedtteeutdejueei iedvffegheenucfkphepjeejrddufeegrddvtdefrddukeegnecuvehluhhsthgvrhfuih iivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepthhhohhmrghssehmohhnjhgrlhho nhdrnhgvth X-ME-Proxy: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 254123280059; Sun, 11 Oct 2020 17:41:39 -0400 (EDT) From: Thomas Monjalon To: Nipun Gupta Cc: dev@dpdk.org, ferruh.yigit@intel.com, arybchenko@solarflare.com, hemant.agrawal@nxp.com, sachin.saxena@nxp.com, rohit.raj@nxp.com, jerinjacobk@gmail.com, stephen@networkplumber.org, asafp@nvidia.com Date: Sun, 11 Oct 2020 23:41:38 +0200 Message-ID: <22570939.gbdeFbVOOX@thomas> In-Reply-To: <20201009131331.5897-1-nipun.gupta@nxp.com> References: <20200831075333.10135-1-nipun.gupta@nxp.com> <20201009131331.5897-1-nipun.gupta@nxp.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH 1/3 v3] 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" Hi, The configuration of this feature is not clear to me. Please see the comments below. 09/10/2020 15:13, nipun.gupta@nxp.com: > From: Nipun Gupta > > This change adds a RX offload capability and configuration to > enable hardware to drop the packets in case of any error in the > packets such as L3 checksum error or L4 checksum. > > Signed-off-by: Nipun Gupta > Signed-off-by: Rohit Raj > Reviewed-by: Asaf Penso > --- [...] > +/** > + * A structure used to enable/disable error packet drop on RX. RX -> Rx same for other occurences below > + */ > +struct rte_rx_err_pkt_drop_conf { The name should start with rte_eth_ > + /** enable/disable all RX error packet drop. > + * 0 (default) - disable, 1 enable > + */ > + uint32_t all:1; > +}; I don't understand the meaning of this struct. Is it just one bit to drop packets having an error? How do you determine what is an error? [...] > @@ -1236,6 +1246,8 @@ struct rte_eth_conf { > uint32_t dcb_capability_en; > struct rte_fdir_conf fdir_conf; /**< FDIR configuration. DEPRECATED */ > struct rte_intr_conf intr_conf; /**< Interrupt mode configuration. */ > + struct rte_rx_err_pkt_drop_conf err_pkt_drop_conf; > + /**< RX error packet drop configuration. */ Why a per-port configuration is needed in addition of the per-queue offload? [...] > @@ -1260,6 +1272,7 @@ struct rte_eth_conf { > #define DEV_RX_OFFLOAD_SCTP_CKSUM 0x00020000 > #define DEV_RX_OFFLOAD_OUTER_UDP_CKSUM 0x00040000 > #define DEV_RX_OFFLOAD_RSS_HASH 0x00080000 > +#define DEV_RX_OFFLOAD_ERR_PKT_DROP 0x00100000 New offload names should starte with RTE_ prefix. > +/** > + * RX Error Drop offload config/capabilities of a device. These > + * are valid only when RX capability DEV_RX_OFFLOAD_ERR_PKT_DROP > + * is supported by the device. > + */ > +#define DEV_RX_ERR_PKT_DROP_OFFLOAD_ALL 0x00000001 I don't understand the meaning. > @@ -1411,6 +1431,8 @@ struct rte_eth_dev_info { > /**< Device per-queue RX offload capabilities. */ > uint64_t tx_queue_offload_capa; > /**< Device per-queue TX offload capabilities. */ > + uint64_t rx_err_drop_offload_capa; > + /**< RX error packet drop offload capabilities. */ Why adding a new field here instead of reporting in rx_offload_capa?