From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from proxy.6wind.com (host.76.145.23.62.rev.coltfrance.com [62.23.145.76]) by dpdk.org (Postfix) with ESMTP id 95C927CEF for ; Tue, 23 Jan 2018 14:53:20 +0100 (CET) Received: from core.dev.6wind.com (unknown [10.0.0.1]) by proxy.6wind.com (Postfix) with ESMTPS id D2C82125F49; Tue, 23 Jan 2018 14:51:32 +0100 (CET) Received: from [10.16.0.195] (helo=6wind.com) by core.dev.6wind.com with smtp (Exim 4.84_2) (envelope-from ) id 1edz0e-0006sg-Nv; Tue, 23 Jan 2018 14:53:09 +0100 Received: by 6wind.com (sSMTP sendmail emulation); Tue, 23 Jan 2018 14:53:08 +0100 Date: Tue, 23 Jan 2018 14:53:08 +0100 From: Olivier Matz To: dev@dpdk.org, "Ananyev, Konstantin" , Shahaf Shuler , Ferruh Yigit , Thomas Monjalon , Bruce Richardson , Andrew Rybchenko Message-ID: <20180123135308.tr7nmuqsdeogm7bl@glumotte.dev.6wind.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: NeoMutt/20170113 (1.7.2) Subject: [dpdk-dev] questions about new offload ethdev api 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: Tue, 23 Jan 2018 13:53:20 -0000 Hi, I'm currently porting an application to the new ethdev offload api, and I have two questions about it. 1/ inconsistent offload capa for PMDs using the old API? It is stated in struct rte_eth_txmode: /** * Per-port Tx offloads to be set using DEV_TX_OFFLOAD_* flags. * Only offloads set on tx_offload_capa field on rte_eth_dev_info * structure are allowed to be set. */ uint64_t offloads; So, if I want to enable DEV_TX_OFFLOAD_MULTI_SEGS for the whole ethdev, I must check that DEV_TX_OFFLOAD_MULTI_SEGS is advertised in dev_info->tx_offload_capa. In my understanding, many PMDs are still using the old API, and there is a conversion layer in ethdev when doing dev_configure(). But I don't see any similar mechanism for the dev_info. Therefore, DEV_TX_OFFLOAD_MULTI_SEGS is not present in tx_offload_capa, and if I follow the API comment, I'm not allowed to use this feature. Am I missing something or is it a bug? It looks that testpmd does not check the capa before setting the an offload flag. This could be a workaround in my application. 2/ meaning of rxmode.jumbo_frame, rxmode.enable_scatter, rxmode.max_rx_pkt_len While it's not related to the new API, it is probably a good opportunity to clarify the meaning of these flags. I'm not able to find a good documentation about them. Here is my understanding, the configuration only depends on: - the maximum rx frame length - the amount of data available in a mbuf (minus headroom) Flags to set in rxmode (example): +---------------+----------------+----------------+-----------------+ | |mbuf_data_len=1K|mbuf_data_len=2K|mbuf_data_len=16K| +---------------+----------------+----------------+-----------------+ |max_rx_len=1500|enable_scatter | | | +---------------+----------------+----------------+-----------------+ |max_rx_len=9000|enable_scatter, |enable_scatter, |jumbo_frame | | |jumbo_frame |jumbo_frame | | +---------------+----------------+----------------+-----------------+ If this table is correct, the flag jumbo_frame would be equivalent to check if max_rx_pkt_len is above a threshold. And enable_scatter could be deduced from the mbuf size of the given rxq (which is a bit harder but maybe doable). Thanks, Olivier