From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: <arybchenko@solarflare.com> Received: from dispatch1-us1.ppe-hosted.com (dispatch1-us1.ppe-hosted.com [67.231.154.164]) by dpdk.org (Postfix) with ESMTP id AA314F04 for <dev@dpdk.org>; Mon, 18 Sep 2017 09:50:42 +0200 (CEST) Received: from pure.maildistiller.com (unknown [10.110.50.29]) by dispatch1-us1.ppe-hosted.com (Proofpoint Essentials ESMTP Server) with ESMTP id 4A99A8004A; Mon, 18 Sep 2017 07:50:42 +0000 (UTC) X-Virus-Scanned: Proofpoint Essentials engine Received: from mx1-us3.ppe-hosted.com (unknown [10.110.49.251]) by pure.maildistiller.com (Proofpoint Essentials ESMTP Server) with ESMTPS id BABA380049; Mon, 18 Sep 2017 07:50:41 +0000 (UTC) Received: from webmail.solarflare.com (webmail.solarflare.com [12.187.104.26]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1-us3.ppe-hosted.com (Proofpoint Essentials ESMTP Server) with ESMTPS id 7B2EE60062; Mon, 18 Sep 2017 07:50:41 +0000 (UTC) Received: from [192.168.38.17] (84.52.114.114) by ocex03.SolarFlarecom.com (10.20.40.36) with Microsoft SMTP Server (TLS) id 15.0.1044.25; Mon, 18 Sep 2017 00:50:37 -0700 To: Shahaf Shuler <shahafs@mellanox.com>, <thomas@monjalon.net>, <jerin.jacob@caviumnetworks.com>, <konstantin.ananyev@intel.com> CC: <dev@dpdk.org> References: <cover.1505284270.git.shahafs@mellanox.com> <cover.1505630554.git.shahafs@mellanox.com> <ecb46b66cda58177b1ba306ca519d0574651d1ab.1505630554.git.shahafs@mellanox.com> From: Andrew Rybchenko <arybchenko@solarflare.com> Message-ID: <77712a79-c8ee-802e-ea7d-f6cae9a7530b@solarflare.com> Date: Mon, 18 Sep 2017 10:50:35 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.3.0 MIME-Version: 1.0 In-Reply-To: <ecb46b66cda58177b1ba306ca519d0574651d1ab.1505630554.git.shahafs@mellanox.com> Content-Language: en-GB X-Originating-IP: [84.52.114.114] X-ClientProxiedBy: ocex03.SolarFlarecom.com (10.20.40.36) To ocex03.SolarFlarecom.com (10.20.40.36) X-MDID: 1505721042-x8hV5Ucb51BB Content-Type: text/plain; charset="utf-8"; format=flowed Content-Transfer-Encoding: 8bit X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-dev] [PATCH v4 2/3] ethdev: introduce Tx queue offloads API X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions <dev.dpdk.org> List-Unsubscribe: <http://dpdk.org/ml/options/dev>, <mailto:dev-request@dpdk.org?subject=unsubscribe> List-Archive: <http://dpdk.org/ml/archives/dev/> List-Post: <mailto:dev@dpdk.org> List-Help: <mailto:dev-request@dpdk.org?subject=help> List-Subscribe: <http://dpdk.org/ml/listinfo/dev>, <mailto:dev-request@dpdk.org?subject=subscribe> X-List-Received-Date: Mon, 18 Sep 2017 07:50:43 -0000 On 09/17/2017 09:54 AM, Shahaf Shuler wrote: > Introduce a new API to configure Tx offloads. > > In the new API, offloads are divided into per-port and per-queue > offloads. The PMD reports capability for each of them. > Offloads are enabled using the existing DEV_TX_OFFLOAD_* flags. > To enable per-port offload, the offload should be set on both device > configuration and queue configuration. To enable per-queue offload, the > offloads can be set only on queue configuration. > > In addition the Tx offloads will be disabled by default and be > enabled per application needs. This will much simplify PMD management of > the different offloads. > > Applications should set the ETH_TXQ_FLAGS_IGNORE flag on txq_flags > field in order to move to the new API. > > The old Tx offloads API is kept for the meanwhile, in order to enable a > smooth transition for PMDs and application to the new API. > > Signed-off-by: Shahaf Shuler <shahafs@mellanox.com> > --- > doc/guides/nics/features.rst | 33 ++++++++++++++----- > lib/librte_ether/rte_ethdev.c | 67 +++++++++++++++++++++++++++++++++++++- > lib/librte_ether/rte_ethdev.h | 38 ++++++++++++++++++++- > 3 files changed, 128 insertions(+), 10 deletions(-) <...> > diff --git a/lib/librte_ether/rte_ethdev.h b/lib/librte_ether/rte_ethdev.h > index 6a2af355a..0a75b1b1e 100644 > --- a/lib/librte_ether/rte_ethdev.h > +++ b/lib/librte_ether/rte_ethdev.h <...> > @@ -744,6 +759,12 @@ struct rte_eth_txconf { > > uint32_t txq_flags; /**< Set flags for the Tx queue */ > uint8_t tx_deferred_start; /**< Do not start queue with rte_eth_dev_start(). */ > + /** > + * Per-queue Tx offloads to be set using DEV_TX_OFFLOAD_* flags. > + * Only offloads set on tx_queue_offload_capa field on rte_eth_dev_info > + * structure are allowed to be set. It contradicts to the statements that: - tx_queue_offload_capa is per-queue offloads only - to enable per-port offload, the offload should be set on both device configuration and queue configuration. Similar is applicable to Rx offloads as well. > + */ > + uint64_t offloads; > }; > > /** <...>