From: David Marchand <david.marchand@redhat.com> To: dev@dpdk.org Cc: viktorin@rehivetech.com, ruifeng.wang@arm.com, jerinj@marvell.com, drc@linux.vnet.ibm.com, bruce.richardson@intel.com, konstantin.ananyev@intel.com, ciara.power@intel.com, Qi Zhang <qi.z.zhang@intel.com> Subject: [dpdk-dev] [PATCH v10 07/18] net/fm10k: check max SIMD bitwidth Date: Mon, 19 Oct 2020 15:48:47 +0200 Message-ID: <20201019134858.32507-8-david.marchand@redhat.com> (raw) In-Reply-To: <20201019134858.32507-1-david.marchand@redhat.com> From: Ciara Power <ciara.power@intel.com> When choosing a vector path to take, an extra condition must be satisfied to ensure the max SIMD bitwidth allows for the CPU enabled path. Signed-off-by: Ciara Power <ciara.power@intel.com> Acked-by: Qi Zhang <qi.z.zhang@intel.com> --- v4: Updated enum name. --- drivers/net/fm10k/fm10k_ethdev.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/drivers/net/fm10k/fm10k_ethdev.c b/drivers/net/fm10k/fm10k_ethdev.c index dc2979bdd2..c187088a33 100644 --- a/drivers/net/fm10k/fm10k_ethdev.c +++ b/drivers/net/fm10k/fm10k_ethdev.c @@ -10,6 +10,7 @@ #include <rte_dev.h> #include <rte_spinlock.h> #include <rte_kvargs.h> +#include <rte_vect.h> #include "fm10k.h" #include "base/fm10k_api.h" @@ -2939,7 +2940,8 @@ fm10k_set_tx_function(struct rte_eth_dev *dev) if (rte_eal_process_type() != RTE_PROC_PRIMARY) { /* primary process has set the ftag flag and offloads */ txq = dev->data->tx_queues[0]; - if (fm10k_tx_vec_condition_check(txq)) { + if (fm10k_tx_vec_condition_check(txq) || + rte_vect_get_max_simd_bitwidth() < RTE_VECT_SIMD_128) { dev->tx_pkt_burst = fm10k_xmit_pkts; dev->tx_pkt_prepare = fm10k_prep_pkts; PMD_INIT_LOG(DEBUG, "Use regular Tx func"); @@ -2958,7 +2960,8 @@ fm10k_set_tx_function(struct rte_eth_dev *dev) txq = dev->data->tx_queues[i]; txq->tx_ftag_en = tx_ftag_en; /* Check if Vector Tx is satisfied */ - if (fm10k_tx_vec_condition_check(txq)) + if (fm10k_tx_vec_condition_check(txq) || + rte_vect_get_max_simd_bitwidth() < RTE_VECT_SIMD_128) use_sse = 0; } @@ -2992,7 +2995,8 @@ fm10k_set_rx_function(struct rte_eth_dev *dev) * conditions to be met. */ if (!fm10k_rx_vec_condition_check(dev) && - dev_info->rx_vec_allowed && !rx_ftag_en) { + dev_info->rx_vec_allowed && !rx_ftag_en && + rte_vect_get_max_simd_bitwidth() >= RTE_VECT_SIMD_128) { if (dev->data->scattered_rx) dev->rx_pkt_burst = fm10k_recv_scattered_pkts_vec; else -- 2.23.0
next prev parent reply other threads:[~2020-10-19 13:52 UTC|newest] Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top 2020-10-19 13:48 [dpdk-dev] [PATCH v10 00/18] add max SIMD bitwidth to EAL David Marchand 2020-10-19 13:48 ` [dpdk-dev] [PATCH v10 01/18] eal: control max SIMD bitwidth David Marchand 2020-10-19 13:48 ` [dpdk-dev] [PATCH v10 02/18] doc: describe how to enable AVX512 David Marchand 2020-10-19 13:48 ` [dpdk-dev] [PATCH v10 03/18] net/i40e: check max SIMD bitwidth David Marchand 2020-10-19 13:48 ` [dpdk-dev] [PATCH v10 04/18] net/axgbe: " David Marchand 2020-10-19 13:48 ` [dpdk-dev] [PATCH v10 05/18] net/bnxt: " David Marchand 2020-10-19 13:48 ` [dpdk-dev] [PATCH v10 06/18] net/enic: " David Marchand 2020-10-19 13:48 ` David Marchand [this message] 2020-10-19 13:48 ` [dpdk-dev] [PATCH v10 08/18] net/iavf: " David Marchand 2020-10-19 13:48 ` [dpdk-dev] [PATCH v10 09/18] net/ice: " David Marchand 2020-10-19 13:48 ` [dpdk-dev] [PATCH v10 10/18] net/ixgbe: " David Marchand 2020-10-19 13:48 ` [dpdk-dev] [PATCH v10 11/18] net/mlx5: " David Marchand 2020-10-19 13:48 ` [dpdk-dev] [PATCH v10 12/18] net/virtio: " David Marchand 2020-10-19 13:48 ` [dpdk-dev] [PATCH v10 13/18] distributor: " David Marchand 2020-10-19 13:48 ` [dpdk-dev] [PATCH v10 14/18] member: " David Marchand 2020-10-19 13:48 ` [dpdk-dev] [PATCH v10 15/18] efd: " David Marchand 2020-10-19 13:48 ` [dpdk-dev] [PATCH v10 16/18] net: " David Marchand 2020-10-19 13:48 ` [dpdk-dev] [PATCH v10 17/18] node: choose vector path at runtime David Marchand 2020-10-19 13:48 ` [dpdk-dev] [PATCH v10 18/18] acl: check max SIMD bitwidth David Marchand 2020-10-19 14:41 ` [dpdk-dev] [PATCH v10 00/18] add max SIMD bitwidth to EAL David Marchand
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=20201019134858.32507-8-david.marchand@redhat.com \ --to=david.marchand@redhat.com \ --cc=bruce.richardson@intel.com \ --cc=ciara.power@intel.com \ --cc=dev@dpdk.org \ --cc=drc@linux.vnet.ibm.com \ --cc=jerinj@marvell.com \ --cc=konstantin.ananyev@intel.com \ --cc=qi.z.zhang@intel.com \ --cc=ruifeng.wang@arm.com \ --cc=viktorin@rehivetech.com \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
DPDK patches and discussions This inbox may be cloned and mirrored by anyone: git clone --mirror https://inbox.dpdk.org/dev/0 dev/git/0.git # If you have public-inbox 1.1+ installed, you may # initialize and index your mirror using the following commands: public-inbox-init -V2 dev dev/ https://inbox.dpdk.org/dev \ dev@dpdk.org public-inbox-index dev Example config snippet for mirrors. Newsgroup available over NNTP: nntp://inbox.dpdk.org/inbox.dpdk.dev AGPL code for this site: git clone https://public-inbox.org/public-inbox.git