From mboxrd@z Thu Jan 1 00:00:00 1970 From: Thomas Monjalon Subject: Re: [PATCH v2] ethdev: check Rx/Tx offloads Date: Sun, 15 Apr 2018 12:37:27 +0200 Message-ID: <8859984.fs3nS3s03y@xps> References: <1517493186-6687-1-git-send-email-wei.dai@intel.com> <20180328085709.28310-1-wei.dai@intel.com> <7148c9d5-cf94-66db-1a1f-42c522c3edc0@intel.com> Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7Bit Cc: dev@dpdk.org To: Ferruh Yigit , Wei Dai Return-path: Received: from out3-smtp.messagingengine.com (out3-smtp.messagingengine.com [66.111.4.27]) by dpdk.org (Postfix) with ESMTP id 2A3B11B424 for ; Sun, 15 Apr 2018 12:37:30 +0200 (CEST) In-Reply-To: <7148c9d5-cf94-66db-1a1f-42c522c3edc0@intel.com> List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" 13/04/2018 19:31, Ferruh Yigit: > On 3/28/2018 9:57 AM, Wei Dai wrote: > > This patch check if a requested offloading > > is supported in the device capability. > > A per port offloading feature should be enabled or > > disabled at same time in both rte_eth_dev_configure( ) > > and rte_eth_rx_queue_setup( )/rte_eth_tx_queue_setup( ). > > This patch check if a per port offloading flag has > > same configuration in rte_eth_dev_configure( ) and > > rte_eth_rx_queue_setup( )/rte_eth_tx_queue_setup( ). > > This patch can make such checking in a common way in > > rte_ethdev layer to avoid same checking in underlying PMD. > > I think it is good idea to move common check to the abstraction layer as much as > possible. > > But for this case we are targeting an API change in rc2, I believe better wait > that API change for this update. I think Wei could implement some filtering of offload flags: If an offload is already enabled at port level, we can filter out them when enabling again at queue level. By removing such repetition in ethdev, before calling the PMD op, the PMD does not need to bother for offloads enabled twice.