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 6292B2B86 for ; Tue, 7 Mar 2017 17:00:17 +0100 (CET) Received: from glumotte.dev.6wind.com (unknown [10.16.0.195]) by proxy.6wind.com (Postfix) with ESMTP id 5BE2D25E47; Tue, 7 Mar 2017 17:00:12 +0100 (CET) From: Olivier Matz To: dev@dpdk.org, thomas.monjalon@6wind.com, konstantin.ananyev@intel.com, wenzhuo.lu@intel.com, helin.zhang@intel.com, jingjing.wu@intel.com, adrien.mazarguil@6wind.com, nelio.laranjeiro@6wind.com Cc: ferruh.yigit@intel.com, bruce.richardson@intel.com, venky.venkatesan@intel.com, arybchenko@solarflare.com Date: Tue, 7 Mar 2017 16:59:47 +0100 Message-Id: <1488902393-7237-1-git-send-email-olivier.matz@6wind.com> X-Mailer: git-send-email 2.8.1 In-Reply-To: <1488388752-1819-1-git-send-email-olivier.matz@6wind.com> References: <1488388752-1819-1-git-send-email-olivier.matz@6wind.com> Subject: [dpdk-dev] [PATCH v2 0/6] get status of Rx and Tx descriptors 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, 07 Mar 2017 16:00:17 -0000 This patchset introduces a new ethdev API: - rte_eth_rx_descriptor_status() - rte_eth_tx_descriptor_status() The Rx API is aims to replace rte_eth_rx_descriptor_done() which does almost the same, but does not differentiate the case of a descriptor used by the driver (not returned to the hw). The usage of these functions can be: - on Rx, anticipate that the cpu is not fast enough to process all incoming packets, and take dispositions to solve the problem (add more cpus, drop specific packets, ...) - on Tx, detect that the link is overloaded, and take dispositions to solve the problem (notify flow control, drop specific packets) The patchset updates ixgbe, i40e, e1000, mlx5. The other drivers that implement the descriptor_done() API are fm10k, sfc, virtio. They are not updated. If the new API is accepted, the descriptor_done() can be deprecated, and examples/l3fwd-power will be updated to. v1->v2: - replace RTE_ETH_RX_DESC_USED by RTE_ETH_RX_DESC_UNAVAIL: it can be used when the descriptor is hold by driver or reserved by the hardware. - add RTE_ETH_TX_DESC_UNAVAIL (same for Tx) - change the ethdev callback api to use a queue pointer instead of port_id and queue_id - like rx_burst/tx_burst, do not check the validity of port_id and queue_id except in debug mode - better document the calling context, error status, possible performance impact - add the feature in NIC documentation - fix overflow of descriptor value in tx functions (ixgbe, igb, em) - fix tx function to only check descs that have the rs bit (i40e) - mlx: remove empty line RFC->v1: - instead of optimizing an API that returns the number of used descriptors like rx_queue_count(), use a more simple API that returns the status of a descriptor, like rx_descriptor_done(). - remove ethdev api rework (first 2 patches), they have been sent separately Olivier Matz (6): ethdev: add descriptor status API net/ixgbe: implement descriptor status API net/e1000: implement descriptor status API (igb) net/e1000: implement descriptor status API (em) net/mlx5: implement descriptor status API net/i40e: implement descriptor status API doc/guides/nics/features/default.ini | 2 + doc/guides/nics/features/e1000.ini | 2 + doc/guides/nics/features/i40e.ini | 2 + doc/guides/nics/features/i40e_vec.ini | 2 + doc/guides/nics/features/i40e_vf.ini | 2 + doc/guides/nics/features/i40e_vf_vec.ini | 2 + doc/guides/nics/features/igb.ini | 2 + doc/guides/nics/features/igb_vf.ini | 2 + doc/guides/nics/features/ixgbe.ini | 2 + doc/guides/nics/features/ixgbe_vec.ini | 2 + doc/guides/nics/features/ixgbe_vf.ini | 2 + doc/guides/nics/features/ixgbe_vf_vec.ini | 2 + doc/guides/nics/features/mlx5.ini | 2 + drivers/net/e1000/e1000_ethdev.h | 6 ++ drivers/net/e1000/em_ethdev.c | 2 + drivers/net/e1000/em_rxtx.c | 51 ++++++++++++ drivers/net/e1000/igb_ethdev.c | 2 + drivers/net/e1000/igb_rxtx.c | 45 +++++++++++ drivers/net/i40e/i40e_ethdev.c | 2 + drivers/net/i40e/i40e_ethdev_vf.c | 2 + drivers/net/i40e/i40e_rxtx.c | 58 ++++++++++++++ drivers/net/i40e/i40e_rxtx.h | 2 + drivers/net/ixgbe/ixgbe_ethdev.c | 4 + drivers/net/ixgbe/ixgbe_ethdev.h | 3 + drivers/net/ixgbe/ixgbe_rxtx.c | 57 ++++++++++++++ drivers/net/mlx5/mlx5.c | 2 + drivers/net/mlx5/mlx5_rxtx.c | 76 ++++++++++++++++++ drivers/net/mlx5/mlx5_rxtx.h | 2 + lib/librte_ether/rte_ethdev.h | 125 ++++++++++++++++++++++++++++++ 29 files changed, 465 insertions(+) -- 2.8.1