From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wr0-f175.google.com (mail-wr0-f175.google.com [209.85.128.175]) by dpdk.org (Postfix) with ESMTP id D7C577CF2 for ; Fri, 1 Sep 2017 10:07:29 +0200 (CEST) Received: by mail-wr0-f175.google.com with SMTP id z91so4524241wrc.1 for ; Fri, 01 Sep 2017 01:07:29 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:subject:date:message-id:in-reply-to:references; bh=zqcEfefk3jtZa/+JhyH1M4wfVT+MmdlH4caM5LxoQ80=; b=a3CvQ6PNAByelmvhrShOGDPP8AFivI7/x9uPlbpa6IaKHX7qabjoP/I2jtA635+QFx TIdAK5awgWzr7ROHtIdOakWscKhXo/CQ/9d4zpTddb87rPkrR5lNaPEEUoUQlou5DeZk 3WqJlzqPMq5dGxFL8+lP+AmqGqymfuGqB4ma2qN6vOFN2++n6WznsJ5Usp5Dy6RhacE3 QL5Ym+UQnNGHqsteWwoMkWERPsQlfbJY1EkfD+jKNBqWMcapl9MA5d8owkWQuNScjxOl 7UxiRs9tlOvGWXHMurJVAP7Vqm7+SGpFDjxGWklnIysOHGmY5tC5vRTpOISZcA8Db9vp lPVQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references; bh=zqcEfefk3jtZa/+JhyH1M4wfVT+MmdlH4caM5LxoQ80=; b=AEre6KOHBuHG0GlceqGym1vfTunm3N/KYxA7HPh+6h4QV06rhJBgpjBT6M6TXrRpNn 8yvFevYOM/bsN2bRdfk4qfsjYigENAK0UOqHatbSugSezUPdksF9GqbldwD4TG9SJ3Ph Mfir6m79xRqItyRYUapm9Gj4jYvBdFYZcipE1ftaiR8mpytEeoiwpaf2MI1y6owlPuto rqkPLlbYzYJj8YmH9Hhn8VFFjNl2SRA1bAcMZFWlI6zw7BygzPN4YtMe+mb9h6j633GY eginfDOu46rZpASt5+u3joKjnTjbxFv/98ouOYibWwQG/m+M92B2+Kv+djFn1h1xACas +Ltw== X-Gm-Message-State: AHPjjUh9IiXehzH0pNDF5atl1sn9t/6GyCi4PihHZ7QQoYm2n+9YPFlL x7ozCwySv8wEY9LaMB0= X-Google-Smtp-Source: ADKCNb7O/xOXp8UqatX5LQarKVWK5pJaYzXYTuUTS4MFo5RTqhGEs/B3SXsdP58Szwcn4wRQc+nfig== X-Received: by 10.223.129.200 with SMTP id 66mr52413wra.25.1504253249178; Fri, 01 Sep 2017 01:07:29 -0700 (PDT) Received: from 6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id 136sm1388675wmo.48.2017.09.01.01.07.28 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 01 Sep 2017 01:07:28 -0700 (PDT) From: Adrien Mazarguil To: dev@dpdk.org Date: Fri, 1 Sep 2017 10:06:19 +0200 Message-Id: <274b7a3cf91a271b460d0f72589d7aaa95895489.1504252977.git.adrien.mazarguil@6wind.com> X-Mailer: git-send-email 2.1.4 In-Reply-To: References: Subject: [dpdk-dev] [PATCH v2 04/51] net/mlx4: remove useless compilation checks 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: Fri, 01 Sep 2017 08:07:30 -0000 Verbs support for RSS, inline receive and extended device query calls has not been optional for a while. Their absence is untested and is therefore unsupported. Remove the related compilation checks and assume Mellanox OFED is up to date, as described in the documentation. Use this opportunity to remove a few useless data path debugging messages behind compilation checks on never defined macros. Signed-off-by: Adrien Mazarguil --- drivers/net/mlx4/Makefile | 12 ------------ drivers/net/mlx4/mlx4.c | 35 ----------------------------------- drivers/net/mlx4/mlx4.h | 2 -- drivers/net/mlx4/mlx4_flow.c | 3 --- 4 files changed, 52 deletions(-) diff --git a/drivers/net/mlx4/Makefile b/drivers/net/mlx4/Makefile index b2ef128..07a66c4 100644 --- a/drivers/net/mlx4/Makefile +++ b/drivers/net/mlx4/Makefile @@ -104,18 +104,6 @@ mlx4_autoconf.h.new: FORCE mlx4_autoconf.h.new: $(RTE_SDK)/buildtools/auto-config-h.sh $Q $(RM) -f -- '$@' $Q sh -- '$<' '$@' \ - RSS_SUPPORT \ - infiniband/verbs.h \ - enum IBV_EXP_DEVICE_UD_RSS $(AUTOCONF_OUTPUT) - $Q sh -- '$<' '$@' \ - INLINE_RECV \ - infiniband/verbs.h \ - enum IBV_EXP_DEVICE_ATTR_INLINE_RECV_SZ $(AUTOCONF_OUTPUT) - $Q sh -- '$<' '$@' \ - HAVE_EXP_QUERY_DEVICE \ - infiniband/verbs.h \ - type 'struct ibv_exp_device_attr' $(AUTOCONF_OUTPUT) - $Q sh -- '$<' '$@' \ HAVE_EXP_QP_BURST_CREATE_DISABLE_ETH_LOOPBACK \ infiniband/verbs.h \ enum IBV_EXP_QP_BURST_CREATE_DISABLE_ETH_LOOPBACK \ diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c index 7a93462..cef024a 100644 --- a/drivers/net/mlx4/mlx4.c +++ b/drivers/net/mlx4/mlx4.c @@ -1103,10 +1103,6 @@ txq_complete(struct txq *txq) if (unlikely(elts_comp == 0)) return 0; -#ifdef DEBUG_SEND - DEBUG("%p: processing %u work requests completions", - (void *)txq, elts_comp); -#endif wcs_n = txq->if_cq->poll_cnt(txq->cq, elts_comp); if (unlikely(wcs_n == 0)) return 0; @@ -3155,9 +3151,6 @@ mlx4_rx_burst_sp(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n) return 0; *next = NULL; /* Repost WRs. */ -#ifdef DEBUG_RECV - DEBUG("%p: reposting %d WRs", (void *)rxq, i); -#endif ret = ibv_post_recv(rxq->qp, head.next, &bad_wr); if (unlikely(ret)) { /* Inability to repost WRs is fatal. */ @@ -3318,9 +3311,6 @@ mlx4_rx_burst(void *dpdk_rxq, struct rte_mbuf **pkts, uint16_t pkts_n) if (unlikely(i == 0)) return 0; /* Repost WRs. */ -#ifdef DEBUG_RECV - DEBUG("%p: reposting %u WRs", (void *)rxq, i); -#endif ret = rxq->if_qp->recv_burst(rxq->qp, sges, i); if (unlikely(ret)) { /* Inability to repost WRs is fatal. */ @@ -3418,15 +3408,11 @@ rxq_setup_qp(struct priv *priv, struct ibv_cq *cq, uint16_t desc, .res_domain = rd, }; -#ifdef INLINE_RECV attr.max_inl_recv = priv->inl_recv_size; attr.comp_mask |= IBV_EXP_QP_INIT_ATTR_INL_RECV; -#endif return ibv_exp_create_qp(priv->ctx, &attr); } -#ifdef RSS_SUPPORT - /** * Allocate a RSS Queue Pair. * Optionally setup inline receive if supported. @@ -3474,10 +3460,8 @@ rxq_setup_qp_rss(struct priv *priv, struct ibv_cq *cq, uint16_t desc, .res_domain = rd, }; -#ifdef INLINE_RECV attr.max_inl_recv = priv->inl_recv_size, attr.comp_mask |= IBV_EXP_QP_INIT_ATTR_INL_RECV; -#endif if (children_n > 0) { attr.qpg.qpg_type = IBV_EXP_QPG_PARENT; /* TSS isn't necessary. */ @@ -3493,8 +3477,6 @@ rxq_setup_qp_rss(struct priv *priv, struct ibv_cq *cq, uint16_t desc, return ibv_exp_create_qp(priv->ctx, &attr); } -#endif /* RSS_SUPPORT */ - /** * Reconfigure a RX queue with new parameters. * @@ -3728,13 +3710,11 @@ rxq_create_qp(struct rxq *rxq, int parent = (children_n > 0); struct priv *priv = rxq->priv; -#ifdef RSS_SUPPORT if (priv->rss && !inactive && (rxq_parent || parent)) rxq->qp = rxq_setup_qp_rss(priv, rxq->cq, desc, children_n, rxq->rd, rxq_parent); else -#endif /* RSS_SUPPORT */ rxq->qp = rxq_setup_qp(priv, rxq->cq, desc, rxq->rd); if (rxq->qp == NULL) { ret = (errno ? errno : EINVAL); @@ -3750,9 +3730,7 @@ rxq_create_qp(struct rxq *rxq, }; ret = ibv_exp_modify_qp(rxq->qp, &mod, (IBV_EXP_QP_STATE | -#ifdef RSS_SUPPORT (parent ? IBV_EXP_QP_GROUP_RSS : 0) | -#endif /* RSS_SUPPORT */ IBV_EXP_QP_PORT)); if (ret) { ERROR("QP state to IBV_QPS_INIT failed: %s", @@ -6115,20 +6093,14 @@ mlx4_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev) struct ibv_pd *pd = NULL; struct priv *priv = NULL; struct rte_eth_dev *eth_dev = NULL; -#ifdef HAVE_EXP_QUERY_DEVICE struct ibv_exp_device_attr exp_device_attr; -#endif /* HAVE_EXP_QUERY_DEVICE */ struct ether_addr mac; /* If port is not enabled, skip. */ if (!(conf.ports.enabled & (1 << i))) continue; -#ifdef HAVE_EXP_QUERY_DEVICE exp_device_attr.comp_mask = IBV_EXP_DEVICE_ATTR_EXP_CAP_FLAGS; -#ifdef RSS_SUPPORT exp_device_attr.comp_mask |= IBV_EXP_DEVICE_ATTR_RSS_TBL_SZ; -#endif /* RSS_SUPPORT */ -#endif /* HAVE_EXP_QUERY_DEVICE */ DEBUG("using port %u", port); @@ -6181,13 +6153,11 @@ mlx4_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev) priv->port = port; priv->pd = pd; priv->mtu = ETHER_MTU; -#ifdef HAVE_EXP_QUERY_DEVICE if (ibv_exp_query_device(ctx, &exp_device_attr)) { ERROR("ibv_exp_query_device() failed"); err = ENODEV; goto port_error; } -#ifdef RSS_SUPPORT if ((exp_device_attr.exp_device_cap_flags & IBV_EXP_DEVICE_QPG) && (exp_device_attr.exp_device_cap_flags & @@ -6212,7 +6182,6 @@ mlx4_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev) if (priv->hw_rss) DEBUG("maximum RSS indirection table size: %u", exp_device_attr.max_rss_tbl_sz); -#endif /* RSS_SUPPORT */ priv->hw_csum = ((exp_device_attr.exp_device_cap_flags & @@ -6227,7 +6196,6 @@ mlx4_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev) DEBUG("L2 tunnel checksum offloads are %ssupported", (priv->hw_csum_l2tun ? "" : "not ")); -#ifdef INLINE_RECV priv->inl_recv_size = mlx4_getenv_int("MLX4_INLINE_RECV_SIZE"); if (priv->inl_recv_size) { @@ -6251,10 +6219,7 @@ mlx4_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev) INFO("Set inline receive size to %u", priv->inl_recv_size); } -#endif /* INLINE_RECV */ -#endif /* HAVE_EXP_QUERY_DEVICE */ - (void)mlx4_getenv_int; priv->vf = vf; /* Configure the first MAC address by default. */ if (priv_get_mac(priv, &mac.addr_bytes)) { diff --git a/drivers/net/mlx4/mlx4.h b/drivers/net/mlx4/mlx4.h index 109cd1b..a12d1fa 100644 --- a/drivers/net/mlx4/mlx4.h +++ b/drivers/net/mlx4/mlx4.h @@ -344,9 +344,7 @@ struct priv { unsigned int vf:1; /* This is a VF device. */ unsigned int pending_alarm:1; /* An alarm is pending. */ unsigned int isolated:1; /* Toggle isolated mode. */ -#ifdef INLINE_RECV unsigned int inl_recv_size; /* Inline recv size */ -#endif unsigned int max_rss_tbl_sz; /* Maximum number of RSS queues. */ /* RX/TX queues. */ unsigned int rxqs_n; /* RX queues array size. */ diff --git a/drivers/net/mlx4/mlx4_flow.c b/drivers/net/mlx4/mlx4_flow.c index ab37e7d..f5c015e 100644 --- a/drivers/net/mlx4/mlx4_flow.c +++ b/drivers/net/mlx4/mlx4_flow.c @@ -37,9 +37,6 @@ #include #include -/* Generated configuration header. */ -#include "mlx4_autoconf.h" - /* PMD headers. */ #include "mlx4.h" #include "mlx4_flow.h" -- 2.1.4