From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out1-smtp.messagingengine.com (out1-smtp.messagingengine.com [66.111.4.25]) by dpdk.org (Postfix) with ESMTP id 514687CD2 for ; Fri, 29 Jun 2018 01:47:02 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 9D04C21CF3; Thu, 28 Jun 2018 19:47:01 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute1.internal (MEProxy); Thu, 28 Jun 2018 19:47:01 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=monjalon.net; h= cc:content-transfer-encoding:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=mesmtp; bh=dM/HeJO7A5YKCDcmUDIDp4iwHr Nmzjx5NzyShgUTIpw=; b=VTmtKC4P115CZFkk2GKQjRPZxhHGpuNxIPEOM1DzHs NoLxl6Ov3pF4szY1g57a2wYEoY+T57vSJgGex6gmwwVz/ixyD/ftliB2mNho5l/a Ara2VqLaoEC7fjbSny69d6tpNaBoQmsxhfgl2bPZZJr57eic/busex00lchL7R/p c= 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-sender:x-me-sender:x-sasl-enc; s=fm3; bh=dM/HeJ O7A5YKCDcmUDIDp4iwHrNmzjx5NzyShgUTIpw=; b=jSVz9Y+99xpyIJmAGAN/qB osWUwpQg204lFmNgIRcch3gqBMOIytSSB4PUCaMZ7S1M4EAxegqE8TGksK5Ny98f bsYkm5y+seMLCs/1s3MB9NX66uuX1LWcPWVt48fGJhBgYO+WXI8dOhI36vGEF1Ok ACWHGS5QAFYrUV/2ocwguLndyaWJ2YrNkEypSJ2X+Jk6dbHXmgn0IsUGu6bFjiCA jlzT5+Qy+zLXf/Jsg6XkO7dJKiRfmqNKszNIC/8rLfQWkU/MRjX+Jo2RrKb/Ijhj 53tUknZloejby5LpgcgEnb3qIe8R6i52Vk9+WqCnbujinUi+v2IkZD9I9PV+srZA == X-ME-Proxy: X-ME-Sender: Received: from xps.localnet (184.203.134.77.rev.sfr.net [77.134.203.184]) by mail.messagingengine.com (Postfix) with ESMTPA id 4F654E4518; Thu, 28 Jun 2018 19:46:53 -0400 (EDT) From: Thomas Monjalon To: Ferruh Yigit Cc: dev@dpdk.org, Neil Horman , John McNamara , Marko Kovacevic , "John W. Linville" , Allain Legacy , Matt Peters , Ravi Kumar , Ajit Khaparde , Somnath Kotur , Rahul Lakkireddy , Wenzhuo Lu , Qi Zhang , Xiao Wang , Beilei Xing , Konstantin Ananyev , Adrien Mazarguil , Nelio Laranjeiro , Yongseok Koh , Tomasz Duszynski , Dmitri Epshtein , Natalie Samsonov , Jianbo Liu , Alejandro Lucero , Tetsuya Mukawa , Santosh Shukla , Jerin Jacob , Rasesh Mody , Harish Patil , Shahed Shaikh , Bruce Richardson , Andrew Rybchenko , Jasvinder Singh , Cristian Dumitrescu , Matej Vido , Maciej Czekaj , Maxime Coquelin , Tiwei Bie , Zhihong Wang , Yong Wang Date: Fri, 29 Jun 2018 01:46:52 +0200 Message-ID: <2254507.T9honQIVyD@xps> In-Reply-To: <20180621131500.22460-1-ferruh.yigit@intel.com> References: <20180619180230.72585-1-ferruh.yigit@intel.com> <20180621131500.22460-1-ferruh.yigit@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 7Bit Content-Type: text/plain; charset="us-ascii" Subject: Re: [dpdk-dev] [PATCH v2] ethdev: add new offload flag to keep CRC 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: , X-List-Received-Date: Thu, 28 Jun 2018 23:47:02 -0000 21/06/2018 15:14, Ferruh Yigit: > --- a/lib/librte_ethdev/rte_ethdev.h > +++ b/lib/librte_ethdev/rte_ethdev.h > @@ -939,6 +939,11 @@ struct rte_eth_conf { > #define DEV_RX_OFFLOAD_SCATTER 0x00002000 > #define DEV_RX_OFFLOAD_TIMESTAMP 0x00004000 > #define DEV_RX_OFFLOAD_SECURITY 0x00008000 > + > +/* Invalid to set both DEV_RX_OFFLOAD_CRC_STRIP and DEV_RX_OFFLOAD_KEEP_CRC > + * No DEV_RX_OFFLOAD_CRC_STRIP flag means keep CRC > + */ > +#define DEV_RX_OFFLOAD_KEEP_CRC 0x00010000 Can we convert this comment into a doxygen one? > --- a/lib/librte_ethdev/rte_ethdev_driver.h > +++ b/lib/librte_ethdev/rte_ethdev_driver.h > +/** > + * PMD helper function to check if keeping CRC is requested > + * > + * @param rx_offloads > + * offloads variable Maybe more precise: "offload bits to be applied" > + * > + * @return > + * Return positive if keeping CRC is requested, > + * zero if stripping CRC is requested > + */ > +static inline int > +rte_eth_dev_is_keep_crc(uint64_t rx_offloads) I suggest a different name: rte_eth_dev_must_keep_crc > +{ > + if (rx_offloads & DEV_RX_OFFLOAD_CRC_STRIP) > + return 0; > + > + /* no KEEP_CRC or CRC_STRIP offload flags means keep CRC */ > + return 1; > +} Maybe add a comment to explain how the function must be replaced by a check of bit KEEP_CRC in every drivers for 18.11?