From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from out5-smtp.messagingengine.com (out5-smtp.messagingengine.com [66.111.4.29]) by dpdk.org (Postfix) with ESMTP id 1B268271 for ; Thu, 29 Mar 2018 09:43:36 +0200 (CEST) Received: from compute1.internal (compute1.nyi.internal [10.202.2.41]) by mailout.nyi.internal (Postfix) with ESMTP id 9F58D21820; Thu, 29 Mar 2018 03:43:35 -0400 (EDT) Received: from mailfrontend2 ([10.202.2.163]) by compute1.internal (MEProxy); Thu, 29 Mar 2018 03:43:35 -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=xRbGyJ9cnTfPYgnOxkMug83GdT w69JbKxqA5DosSGos=; b=dU7cvHfHTgy8/zM5++aiXKATgJXDdXE9v757tGUjJY 5UqXRI67OpvkjAADoO8Np47TDq4/zdOnBg0Oa2wpTqwuKktr1cOdI/9nHYjIj8mK Fz4BojnpIuUB5kXn5BznDjS7ZzfZjPBbM4KXaG7Zjqr/n61/78ilFKXKRDb9sFRW U= 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=fm2; bh=xRbGyJ 9cnTfPYgnOxkMug83GdTw69JbKxqA5DosSGos=; b=OMnXOD7vrWN2bnpKDJiUhX TuplVJQgde1KLidUIjhxX7BD5bFk6uMpfTeh78bCLpjupOmyS2APXYM9pCn16x8M 9b6xAcSB8s0Y2Rp7tjNLBk+oOqODhETrqg4mA/sY0jqVStLbRLhYS4k+Sv+9uNRS Yc4VUmbX9nS3wD2h/A3OsFULz0QuX2qi/K6VH6Hp6m9QFlthXJ5HUwSC+IPVmJVd Y7E4Jk1FldS7qjihI5gdvzS7bn+ue7UExLCqDJnT56k0NwwSBElJCR/ft8slCisy vgnWu4BWHRxNk5Q/TKr/OheySXKsGOtNgFgnxg23BOGcj9sBpkicFfq+fh75stqQ == 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 CBD2910339; Thu, 29 Mar 2018 03:43:34 -0400 (EDT) From: Thomas Monjalon To: Shahaf Shuler Cc: Ferruh Yigit , Neil Horman , John McNamara , Marko Kovacevic , "dev@dpdk.org" Date: Thu, 29 Mar 2018 09:43:12 +0200 Message-ID: <15555561.lU3UqzoiBB@xps> In-Reply-To: References: <20180320112631.107105-1-ferruh.yigit@intel.com> <20180321194730.52068-2-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 2/2] 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, 29 Mar 2018 07:43:36 -0000 29/03/2018 07:38, Shahaf Shuler: > Wednesday, March 21, 2018 9:48 PM, Ferruh Yigit: > > DEV_RX_OFFLOAD_KEEP_CRC offload flag added. > > > > DEV_RX_OFFLOAD_CRC_STRIP flag will remain one more release but default > > behavior in PMDs is to strip the CRC independent from this flag. > > > > Until DEV_RX_OFFLOAD_CRC_STRIP flag is removed: > > - Setting both KEEP_CRC & CRC_STRIP is INVALID > > - Setting only CRC_STRIP PMD should strip the CRC > > - Setting only KEEP_CRC PMD should keep the CRC > > - Not setting both PMD should strip the CRC > > We cannot have such default behavior, it may break existing applications. > > The API of ethdev offloads says (even though it is not well documented) : DEV_RX_OFFLOAD_CRC_STRIP (emphasis the STRIP). > meaning, if set -> STRIP, if not set -> don't strip. I am aware to at least one application which wants to have the CRC, and for that purpose it naturally don't set the offload flag. > > The fact some PMDs lack the ability to toggle the CRC stripping should be exposed in the "limitations" section of their related guide. > > Up to here, this is the behavior as defined by the API. > > Now, we want to change it, and I think it makes sense. However I think we should take similar approach to what we did with the ethdev offloads API: > 1. at first stage a new offload flag is exposed DEV_RX_OFFLOAD_KEEP_CRC and implemented on the PMDs. This is what is proposed above, except that we change the default behaviour. If we introduce a new flag which is the contrary of the old one, we need to choose which one is the default, so which one has no effect. > 2. there is a conversion function on ethdev. Which for example converts ~DEV_RX_OFFLOAD_CRC_STRIP -> DEV_RX_OFFLOAD_KEEP_CRC for the PMDs. > 3. deprecation of DEV_RX_OFFLOAD_CRC_STRIP for applications and remove of the conversion functions.