From patchwork Fri Sep 1 08:06:35 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Adrien Mazarguil X-Patchwork-Id: 28224 X-Patchwork-Delegate: ferruh.yigit@amd.com Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id D18FB9129; Fri, 1 Sep 2017 10:07:50 +0200 (CEST) Received: from mail-wm0-f43.google.com (mail-wm0-f43.google.com [74.125.82.43]) by dpdk.org (Postfix) with ESMTP id CDE3190FF for ; Fri, 1 Sep 2017 10:07:48 +0200 (CEST) Received: by mail-wm0-f43.google.com with SMTP id 187so3715479wmn.1 for ; Fri, 01 Sep 2017 01:07:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=6wind-com.20150623.gappssmtp.com; s=20150623; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=T+hFiKRUMXSn2AgG4c9nMTNVhIc2pIrBM99qxKWcbzM=; b=1veI+oph8kk9n2ebACAdRi7QrOTCc57p+wztxFNfcfo2H+ADoWovyyhPzjQzMOL9Z3 VvNEm32kuSgN+GkOMSdnGTHV1MenWT5V0w70MP5KbNEWzfyLvagVEYYEvQ3/exhNWuEo +eI3b1++pMONO6CutBZtPIz5Uj0y03UwDKt4L3nE/I1YrOLYYkdKCRhiQOJNt9qG8v+8 JjaGTNwFOdYBnzOAaD5fS+6q5s9nnTgO3fFx+AzTyUGI1fQHtLpZkjV0hik2mrmvY6h9 hQIDlhPVwR1UqOVHXJ0MquqwRHieh71gf3xGBMqUFMdNxY3kuvAy8y2/sdLihvqFuEP9 d0DQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=T+hFiKRUMXSn2AgG4c9nMTNVhIc2pIrBM99qxKWcbzM=; b=S37Fvww/uSLs5/m07yvgsI5lU2sIXMnQQVd71sKmfbdH60AvjmdSST22pB1R2nwCsi aVFygK1Dl1sfN9MS8Vlq/3gZG4LUadmRQOXzrqVh27Qf9omuJGAP3LPxWjZnLUmcmY/J /2eYfO6NPZ5rMrcULU8x2WEXqL0WujFXhkIrK0Pj8wE9L2mw2RRBp96ZWtnWTgI+10uT xLlb8vxTXAl59PV8TSwSJcnSe62A9iHZRjIh5/dfHalsXWkJ2IGCpTFuAQ6dHQY2/FNM qiI77WUqUiX/1zV6K8qiAfySIgIODwRjhk8IGddBO48dzaSKEJQ14I9yaPAv3AcvKIXa SD+A== X-Gm-Message-State: AHPjjUhTmvbUQxHqHn2hmTJ8r898XX+QzgTukCbhG2pFCq8YXNKjt/gY CaAW/rAvjKi/EGy+I3c= X-Google-Smtp-Source: ADKCNb6tHfKE4bhS+WyXelguGAjSkPBVn31AivgUfSb3ONo5yBFQrKq+SlfbRJMvK1H+sL8sMnTg9Q== X-Received: by 10.28.194.4 with SMTP id s4mr674772wmf.62.1504253268272; Fri, 01 Sep 2017 01:07:48 -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 b72sm7869809wmd.0.2017.09.01.01.07.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Fri, 01 Sep 2017 01:07:47 -0700 (PDT) From: Adrien Mazarguil To: dev@dpdk.org Cc: Moti Haimovsky Date: Fri, 1 Sep 2017 10:06:35 +0200 Message-Id: X-Mailer: git-send-email 2.1.4 In-Reply-To: References: Subject: [dpdk-dev] [PATCH v2 20/51] net/mlx4: drop inline receive support 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: , Errors-To: dev-bounces@dpdk.org Sender: "dev" The Verbs API used to implement inline receive is deprecated. Support will be added back after refactoring the PMD. Signed-off-by: Moti Haimovsky Signed-off-by: Adrien Mazarguil --- drivers/net/mlx4/mlx4.c | 52 -------------------------------------------- drivers/net/mlx4/mlx4.h | 1 - 2 files changed, 53 deletions(-) diff --git a/drivers/net/mlx4/mlx4.c b/drivers/net/mlx4/mlx4.c index 0a71e2c..30c70ee 100644 --- a/drivers/net/mlx4/mlx4.c +++ b/drivers/net/mlx4/mlx4.c @@ -1914,8 +1914,6 @@ rxq_setup_qp(struct priv *priv, struct ibv_cq *cq, uint16_t desc, .res_domain = rd, }; - attr.max_inl_recv = priv->inl_recv_size, - attr.comp_mask |= IBV_EXP_QP_INIT_ATTR_INL_RECV; return ibv_exp_create_qp(priv->ctx, &attr); } @@ -2977,25 +2975,6 @@ priv_get_mac(struct priv *priv, uint8_t (*mac)[ETHER_ADDR_LEN]) return 0; } -/** - * Retrieve integer value from environment variable. - * - * @param[in] name - * Environment variable name. - * - * @return - * Integer value, 0 if the variable is not set. - */ -static int -mlx4_getenv_int(const char *name) -{ - const char *val = getenv(name); - - if (val == NULL) - return 0; - return atoi(val); -} - static void mlx4_dev_link_status_handler(void *); static void @@ -3644,13 +3623,11 @@ 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; - struct ibv_exp_device_attr exp_device_attr; struct ether_addr mac; /* If port is not enabled, skip. */ if (!(conf.ports.enabled & (1 << i))) continue; - exp_device_attr.comp_mask = IBV_EXP_DEVICE_ATTR_EXP_CAP_FLAGS; DEBUG("using port %u", port); @@ -3703,35 +3680,6 @@ 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; - if (ibv_exp_query_device(ctx, &exp_device_attr)) { - ERROR("ibv_exp_query_device() failed"); - err = ENODEV; - goto port_error; - } - - priv->inl_recv_size = mlx4_getenv_int("MLX4_INLINE_RECV_SIZE"); - - if (priv->inl_recv_size) { - exp_device_attr.comp_mask = - IBV_EXP_DEVICE_ATTR_INLINE_RECV_SZ; - if (ibv_exp_query_device(ctx, &exp_device_attr)) { - INFO("Couldn't query device for inline-receive" - " capabilities."); - priv->inl_recv_size = 0; - } else { - if ((unsigned)exp_device_attr.inline_recv_sz < - priv->inl_recv_size) { - INFO("Max inline-receive (%d) <" - " requested inline-receive (%u)", - exp_device_attr.inline_recv_sz, - priv->inl_recv_size); - priv->inl_recv_size = - exp_device_attr.inline_recv_sz; - } - } - INFO("Set inline receive size to %u", - priv->inl_recv_size); - } priv->vf = vf; /* Configure the first MAC address by default. */ diff --git a/drivers/net/mlx4/mlx4.h b/drivers/net/mlx4/mlx4.h index cc36d29..9cbde1d 100644 --- a/drivers/net/mlx4/mlx4.h +++ b/drivers/net/mlx4/mlx4.h @@ -223,7 +223,6 @@ 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. */ - unsigned int inl_recv_size; /* Inline recv size */ /* RX/TX queues. */ unsigned int rxqs_n; /* RX queues array size. */ unsigned int txqs_n; /* TX queues array size. */