From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm0-f65.google.com (mail-wm0-f65.google.com [74.125.82.65]) by dpdk.org (Postfix) with ESMTP id 9A828F64 for ; Mon, 30 Apr 2018 16:08:02 +0200 (CEST) Received: by mail-wm0-f65.google.com with SMTP id f6so13402756wmc.4 for ; Mon, 30 Apr 2018 07:08:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=GYo7ZbU3/xPuW85+PQlB0RDi7FQUfGuHNac8LUxIieo=; b=DQXW1s1Y9mwAylVSgKBgwtY9TsLncvJLGwBaujAqJhVokto1V5DkTi0yFDhx4WuWqD Cqc0fvbV4R+vbvd+ETjNRYR98AV9WBcXuH+Ue2Td0ywDveUz5/sKBBolGOIcK0srI0yf xWuO8wKchr17bSlBK40gLgze2ltqeii9fN0CTrS54copsfs/P9ffadXkn6jPaRxvQSsH +ehMg0F5BQG6Mhwdny3bFBNwmR/I8QXKNN06nlUNQQSHSGLaCSSY6F9cEz+5ct5fchvl bhPNCRRWu/OyC4in1Ku16M4J1PSKQUqzBKqcsduJ6pe3c8Vh8DQMgx5jXy/n3vh8Y6pp 8ERA== 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=GYo7ZbU3/xPuW85+PQlB0RDi7FQUfGuHNac8LUxIieo=; b=png+1Opp322/YgpcTCmAdl5of0UdpgHyCHEjRwJCM6H99ZAPHG7WaslTZtMkpP3zgt u/Uu3/DPgv0jTs5QcYS1Fxb0nZjv55qta2Ozpk44meHxxF1HxZM5HSgD50/iWcAn2QX0 y0Q7c9gKv3j9ZbnDulbKHXWpYPcumX5k6ZFH5uULMPJSdT6PfpL/seLz19yde9jsASUd 6Lfc4qRDQkZd7k1RuZYG9NjXF2KyftynMFzCO39uqoT1gF4IsNxY/WBFj8DoeSXTnXFP sDILBc+VzWQwu1J6nAOxJacBwvXt2r5KDb2fRx712yGTyloxtIkWF5ophT7oboC9dkDR EUbA== X-Gm-Message-State: ALQs6tBuDT5ETg3wTy4BAOPtCHqF0mtH7YPH6AFeElc1AQJ2v4Lnbssw 6GozsPsiKYcOKZZ9uHpgLa7DrwVCqSs= X-Google-Smtp-Source: AB8JxZoo8DisSIkwBDkVQUCrpJ2YK+pIx/xNXghonpMt5oQYfzU41/fTcztz5qyqUJqZZPnPfRvbSg== X-Received: by 10.28.3.197 with SMTP id 188mr7114001wmd.43.1525097282334; Mon, 30 Apr 2018 07:08:02 -0700 (PDT) Received: from localhost ([2a00:23c5:be9a:5200:ce4c:82c0:d567:ecbb]) by smtp.gmail.com with ESMTPSA id e7-v6sm7752866wrn.88.2018.04.30.07.08.01 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Mon, 30 Apr 2018 07:08:01 -0700 (PDT) From: luca.boccassi@gmail.com To: =?UTF-8?q?N=C3=A9lio=20Laranjeiro?= Cc: Adrien Mazarguil , dpdk stable Date: Mon, 30 Apr 2018 15:03:40 +0100 Message-Id: <20180430140606.4615-62-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.14.2 In-Reply-To: <20180430140606.4615-1-luca.boccassi@gmail.com> References: <20180430140606.4615-1-luca.boccassi@gmail.com> Subject: [dpdk-stable] patch 'net/mlx5: fix sriov flag' has been queued to stable release 18.02.2 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 30 Apr 2018 14:08:02 -0000 Hi, FYI, your patch has been queued to stable release 18.02.2 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 05/02/18. So please shout if anyone has objections. Thanks. Luca Boccassi --- >>From cc5ff84fd50d1bc6aad8cd0fda2e60f3bb1531c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?N=C3=A9lio=20Laranjeiro?= Date: Mon, 5 Mar 2018 13:20:57 +0100 Subject: [PATCH] net/mlx5: fix sriov flag [ upstream commit a61888c8f297eac7e917850e2a4f66601bb715c1 ] priv_get_num_vfs() was used to help the PMD in prefetching the mbuf in datapath when the PMD was behaving in VF mode. This knowledge is no more used. Fixes: 528a9fbec6de ("net/mlx5: support ConnectX-5 devices") Signed-off-by: Nelio Laranjeiro Acked-by: Adrien Mazarguil --- drivers/net/mlx5/mlx5.c | 18 ++---------------- drivers/net/mlx5/mlx5.h | 2 -- drivers/net/mlx5/mlx5_ethdev.c | 32 -------------------------------- 3 files changed, 2 insertions(+), 50 deletions(-) diff --git a/drivers/net/mlx5/mlx5.c b/drivers/net/mlx5/mlx5.c index 0ca16d11d..03a6a05de 100644 --- a/drivers/net/mlx5/mlx5.c +++ b/drivers/net/mlx5/mlx5.c @@ -578,7 +578,6 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev) int err = 0; struct ibv_context *attr_ctx = NULL; struct ibv_device_attr_ex device_attr; - unsigned int sriov; unsigned int mps; unsigned int cqe_comp; unsigned int tunnel_en = 0; @@ -625,18 +624,8 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev) (pci_dev->addr.devid != pci_addr.devid) || (pci_dev->addr.function != pci_addr.function)) continue; - sriov = ((pci_dev->id.device_id == - PCI_DEVICE_ID_MELLANOX_CONNECTX4VF) || - (pci_dev->id.device_id == - PCI_DEVICE_ID_MELLANOX_CONNECTX4LXVF) || - (pci_dev->id.device_id == - PCI_DEVICE_ID_MELLANOX_CONNECTX5VF) || - (pci_dev->id.device_id == - PCI_DEVICE_ID_MELLANOX_CONNECTX5EXVF)); - INFO("PCI information matches, using device \"%s\"" - " (SR-IOV: %s)", - list[i]->name, - sriov ? "true" : "false"); + INFO("PCI information matches, using device \"%s\"", + list[i]->name); attr_ctx = mlx5_glue->open_device(list[i]); err = errno; break; @@ -709,7 +698,6 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev) struct rte_eth_dev *eth_dev; struct ibv_device_attr_ex device_attr_ex; struct ether_addr mac; - uint16_t num_vfs = 0; struct ibv_device_attr_ex device_attr; struct mlx5_dev_config config = { .cqe_comp = cqe_comp, @@ -870,8 +858,6 @@ mlx5_pci_probe(struct rte_pci_driver *pci_drv, struct rte_pci_device *pci_dev) DEBUG("hardware RX end alignment padding is %ssupported", (config.hw_padding ? "" : "not ")); - priv_get_num_vfs(priv, &num_vfs); - config.sriov = (num_vfs || sriov); config.tso = ((device_attr_ex.tso_caps.max_tso > 0) && (device_attr_ex.tso_caps.supported_qpts & (1 << IBV_QPT_RAW_PACKET))); diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h index 3e2d96abc..d1f5b13e7 100644 --- a/drivers/net/mlx5/mlx5.h +++ b/drivers/net/mlx5/mlx5.h @@ -78,7 +78,6 @@ struct mlx5_dev_config { unsigned int hw_vlan_strip:1; /* VLAN stripping is supported. */ unsigned int hw_fcs_strip:1; /* FCS stripping is supported. */ unsigned int hw_padding:1; /* End alignment padding is supported. */ - unsigned int sriov:1; /* This is a VF or PF with VF devices. */ unsigned int mps:2; /* Multi-packet send supported mode. */ unsigned int tunnel_en:1; /* Whether tunnel stateless offloads are supported. */ @@ -211,7 +210,6 @@ int priv_get_ifname(const struct priv *, char (*)[IF_NAMESIZE]); int priv_ifreq(const struct priv *, int req, struct ifreq *); int priv_is_ib_cntr(const char *); int priv_get_cntr_sysfs(struct priv *, const char *, uint64_t *); -int priv_get_num_vfs(struct priv *, uint16_t *); int priv_get_mtu(struct priv *, uint16_t *); int priv_set_flags(struct priv *, unsigned int, unsigned int); int mlx5_dev_configure(struct rte_eth_dev *); diff --git a/drivers/net/mlx5/mlx5_ethdev.c b/drivers/net/mlx5/mlx5_ethdev.c index 666507691..d5b755f54 100644 --- a/drivers/net/mlx5/mlx5_ethdev.c +++ b/drivers/net/mlx5/mlx5_ethdev.c @@ -374,38 +374,6 @@ priv_ifreq(const struct priv *priv, int req, struct ifreq *ifr) return ret; } -/** - * Return the number of active VFs for the current device. - * - * @param[in] priv - * Pointer to private structure. - * @param[out] num_vfs - * Number of active VFs. - * - * @return - * 0 on success, -1 on failure and errno is set. - */ -int -priv_get_num_vfs(struct priv *priv, uint16_t *num_vfs) -{ - /* The sysfs entry name depends on the operating system. */ - const char **name = (const char *[]){ - "device/sriov_numvfs", - "device/mlx5_num_vfs", - NULL, - }; - int ret; - - do { - unsigned long ulong_num_vfs; - - ret = priv_get_sysfs_ulong(priv, *name, &ulong_num_vfs); - if (!ret) - *num_vfs = ulong_num_vfs; - } while (*(++name) && ret); - return ret; -} - /** * Get device MTU. * -- 2.14.2