From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id BD81EA0524 for ; Fri, 5 Feb 2021 12:23:55 +0100 (CET) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id E7CA54067B; Fri, 5 Feb 2021 12:23:54 +0100 (CET) Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) by mails.dpdk.org (Postfix) with ESMTP id CD2CA4067B for ; Fri, 5 Feb 2021 12:23:53 +0100 (CET) Received: by mail-wr1-f54.google.com with SMTP id u14so7308192wri.3 for ; Fri, 05 Feb 2021 03:23:53 -0800 (PST) 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 :mime-version:content-transfer-encoding; bh=kzqEErAFnlbGpzTngJLG75dggj/3q9yMIXLlJQYNgfA=; b=DMId2MvFWD5M7joH366flVcwhVFuTod8PpasIEc8Fnte5TN5EHNkKdZg5tiTfPZa8x rTXrLlDAYlkZ+lXkZhDaaYv7bbrsJskvzBmvRAXT7D94DFIYpFQK7hiKx6S4rlEsAMc9 4D85v7+omhHPJzKZe/ARL8rCyHt07KxbASc5KHu0KKTrt8YpTiOmM2bmTWROA45+bZGK 3A2NUjP5atdFoBDXTLva7lJ8quOvFEVlK4RXrdYa/v17zdsccAxu8W6dDaCcU//9ocsX NOE0CHbnzSLW+Kpw+m1kvGIm9JcAeNk+05f40Tz08/8sCeZi2sLsrKklykpSW5awDCvO A4GQ== 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:mime-version:content-transfer-encoding; bh=kzqEErAFnlbGpzTngJLG75dggj/3q9yMIXLlJQYNgfA=; b=oQG3BRkP5VUcVc6NDiO5YO87LimX0/pfMncCqpkvBE8Ml/ktncBkwOhm7vC2DZ97s0 n5j3WtDbWgE/b3kRgJYcPJKBOHj7r9bGH1A3K4LnjjTwjDSJVf2LD8/kMQwPzUniHXzY EVri6+Jyn/qRPguAhCfGHlP5rLAvkiZLwD3frZ0c/mD5+ASjYY6M25BBCbqozRTJX1VG MjwJROQ8Gzvm6JBhpeiP7Ttw1+p7C22cD7leensXjuqcnJuHGtwh/+yK84ymoWcUMoXJ wNqHHXW0jKkzhHu/D6bM7DUf9POxtj0MnHJjMl5gTe7l/qiO2egL4HX0yGXsKbxojml3 qTxA== X-Gm-Message-State: AOAM531vF/p2lvjqAmjzk/y47HFLvHhRHJap5zXaMvbfHALQi++9JAHD iOqrBHKvmCXIIw/7Z1htt5E= X-Google-Smtp-Source: ABdhPJwBSO+a99Z8dagb7VpDOnLTwbyEq3KL3C0CLQZmP0mdhNE3az5dPiKIp5tbuLk6R2dzwNvETA== X-Received: by 2002:adf:e80f:: with SMTP id o15mr4477040wrm.366.1612524233572; Fri, 05 Feb 2021 03:23:53 -0800 (PST) Received: from localhost ([88.98.246.218]) by smtp.gmail.com with ESMTPSA id h14sm8703714wmq.45.2021.02.05.03.23.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 05 Feb 2021 03:23:52 -0800 (PST) From: luca.boccassi@gmail.com To: Tal Shnaiderman Cc: Matan Azrad , dpdk stable Date: Fri, 5 Feb 2021 11:16:07 +0000 Message-Id: <20210205111920.1272063-81-luca.boccassi@gmail.com> X-Mailer: git-send-email 2.29.2 In-Reply-To: <20210205111920.1272063-1-luca.boccassi@gmail.com> References: <20210205111920.1272063-1-luca.boccassi@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Subject: [dpdk-stable] patch 'net/mlx5: fix device name size on Windows' has been queued to stable release 20.11.1 X-BeenThere: stable@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: patches for DPDK stable branches List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: stable-bounces@dpdk.org Sender: "stable" Hi, FYI, your patch has been queued to stable release 20.11.1 Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet. It will be pushed if I get no objections before 02/07/21. So please shout if anyone has objections. Also note that after the patch there's a diff of the upstream commit vs the patch applied to the branch. This will indicate if there was any rebasing needed to apply to the stable branch. If there were code changes for rebasing (ie: not only metadata diffs), please double check that the rebase was correctly done. Queued patches are on a temporary branch at: https://github.com/bluca/dpdk-stable This queued commit can be viewed at: https://github.com/bluca/dpdk-stable/commit/06c3e3e3c2b6d22a7bc738ba55ea2985b28f6faa Thanks. Luca Boccassi --- >From 06c3e3e3c2b6d22a7bc738ba55ea2985b28f6faa Mon Sep 17 00:00:00 2001 From: Tal Shnaiderman Date: Mon, 28 Dec 2020 14:32:57 +0200 Subject: [PATCH] net/mlx5: fix device name size on Windows [ upstream commit 28743807e8b717141eb381ce90565ce26adb93fd ] Windows Devx interface name is the same as device name with different size then IF_NAMESIZE. To support it MLX5_NAMESIZE is defined with IF_NAMESIZE value for Linux and MLX5_FS_NAME_MAX value for Windows. Fixes: e9c0b96e3526 ("net/mlx5: move Linux ifname function") Signed-off-by: Tal Shnaiderman Acked-by: Matan Azrad --- drivers/net/mlx5/linux/mlx5_ethdev_os.c | 4 ++-- drivers/net/mlx5/linux/mlx5_os.c | 2 +- drivers/net/mlx5/linux/mlx5_os.h | 6 ++---- drivers/net/mlx5/mlx5.h | 4 +++- 4 files changed, 8 insertions(+), 8 deletions(-) diff --git a/drivers/net/mlx5/linux/mlx5_ethdev_os.c b/drivers/net/mlx5/linux/mlx5_ethdev_os.c index 128845cb52..e36a78091c 100644 --- a/drivers/net/mlx5/linux/mlx5_ethdev_os.c +++ b/drivers/net/mlx5/linux/mlx5_ethdev_os.c @@ -143,7 +143,7 @@ struct ethtool_link_settings { * 0 on success, a negative errno value otherwise and rte_errno is set. */ int -mlx5_get_ifname(const struct rte_eth_dev *dev, char (*ifname)[IF_NAMESIZE]) +mlx5_get_ifname(const struct rte_eth_dev *dev, char (*ifname)[MLX5_NAMESIZE]) { struct mlx5_priv *priv = dev->data->dev_private; unsigned int ifindex; @@ -151,7 +151,7 @@ mlx5_get_ifname(const struct rte_eth_dev *dev, char (*ifname)[IF_NAMESIZE]) MLX5_ASSERT(priv); MLX5_ASSERT(priv->sh); if (priv->bond_ifindex > 0) { - memcpy(ifname, priv->bond_name, IF_NAMESIZE); + memcpy(ifname, priv->bond_name, MLX5_NAMESIZE); return 0; } ifindex = mlx5_ifindex(dev); diff --git a/drivers/net/mlx5/linux/mlx5_os.c b/drivers/net/mlx5/linux/mlx5_os.c index 750ca7557f..a77793890a 100644 --- a/drivers/net/mlx5/linux/mlx5_os.c +++ b/drivers/net/mlx5/linux/mlx5_os.c @@ -1405,7 +1405,7 @@ err_secondary: mac.addr_bytes[4], mac.addr_bytes[5]); #ifdef RTE_LIBRTE_MLX5_DEBUG { - char ifname[IF_NAMESIZE]; + char ifname[MLX5_NAMESIZE]; if (mlx5_get_ifname(eth_dev, &ifname) == 0) DRV_LOG(DEBUG, "port %u ifname is \"%s\"", diff --git a/drivers/net/mlx5/linux/mlx5_os.h b/drivers/net/mlx5/linux/mlx5_os.h index 759def2f4b..7dbacceabe 100644 --- a/drivers/net/mlx5/linux/mlx5_os.h +++ b/drivers/net/mlx5/linux/mlx5_os.h @@ -14,11 +14,9 @@ enum { DEV_SYSFS_PATH_MAX = IBV_SYSFS_PATH_MAX + 1 }; +#define MLX5_NAMESIZE IF_NAMESIZE + #define PCI_DRV_FLAGS (RTE_PCI_DRV_INTR_LSC | \ RTE_PCI_DRV_INTR_RMV | \ RTE_PCI_DRV_PROBE_AGAIN) - -/* mlx5_ethdev_os.c */ - -int mlx5_get_ifname(const struct rte_eth_dev *dev, char (*ifname)[IF_NAMESIZE]); #endif /* RTE_PMD_MLX5_OS_H_ */ diff --git a/drivers/net/mlx5/mlx5.h b/drivers/net/mlx5/mlx5.h index df27983ad9..fff2422ea6 100644 --- a/drivers/net/mlx5/mlx5.h +++ b/drivers/net/mlx5/mlx5.h @@ -939,7 +939,7 @@ struct mlx5_priv { int32_t pf_bond; /* >=0 means PF index in bonding configuration. */ unsigned int if_index; /* Associated kernel network device index. */ uint32_t bond_ifindex; /**< Bond interface index. */ - char bond_name[IF_NAMESIZE]; /**< Bond interface name. */ + char bond_name[MLX5_NAMESIZE]; /**< Bond interface name. */ /* RX/TX queues. */ unsigned int rxqs_n; /* RX queues array size. */ unsigned int txqs_n; /* TX queues array size. */ @@ -1056,6 +1056,8 @@ int mlx5_dev_configure_rss_reta(struct rte_eth_dev *dev); /* mlx5_ethdev_os.c */ +int mlx5_get_ifname(const struct rte_eth_dev *dev, + char (*ifname)[MLX5_NAMESIZE]); unsigned int mlx5_ifindex(const struct rte_eth_dev *dev); int mlx5_get_mac(struct rte_eth_dev *dev, uint8_t (*mac)[RTE_ETHER_ADDR_LEN]); int mlx5_get_mtu(struct rte_eth_dev *dev, uint16_t *mtu); -- 2.29.2 --- Diff of the applied patch vs upstream commit (please double-check if non-empty: --- --- - 2021-02-05 11:18:32.899185205 +0000 +++ 0081-net-mlx5-fix-device-name-size-on-Windows.patch 2021-02-05 11:18:28.894692787 +0000 @@ -1 +1 @@ -From 28743807e8b717141eb381ce90565ce26adb93fd Mon Sep 17 00:00:00 2001 +From 06c3e3e3c2b6d22a7bc738ba55ea2985b28f6faa Mon Sep 17 00:00:00 2001 @@ -5,0 +6,2 @@ +[ upstream commit 28743807e8b717141eb381ce90565ce26adb93fd ] + @@ -12 +13,0 @@ -Cc: stable@dpdk.org @@ -17,8 +18,5 @@ - drivers/net/mlx5/linux/mlx5_ethdev_os.c | 4 ++-- - drivers/net/mlx5/linux/mlx5_os.c | 2 +- - drivers/net/mlx5/linux/mlx5_os.h | 6 ++---- - drivers/net/mlx5/mlx5.h | 4 +++- - drivers/net/mlx5/windows/mlx5_ethdev_os.c | 4 ++-- - drivers/net/mlx5/windows/mlx5_os.c | 2 +- - drivers/net/mlx5/windows/mlx5_os.h | 2 ++ - 7 files changed, 13 insertions(+), 11 deletions(-) + drivers/net/mlx5/linux/mlx5_ethdev_os.c | 4 ++-- + drivers/net/mlx5/linux/mlx5_os.c | 2 +- + drivers/net/mlx5/linux/mlx5_os.h | 6 ++---- + drivers/net/mlx5/mlx5.h | 4 +++- + 4 files changed, 8 insertions(+), 8 deletions(-) @@ -49 +47 @@ -index 8353ac22e0..6812a1f215 100644 +index 750ca7557f..a77793890a 100644 @@ -52 +50 @@ -@@ -1411,7 +1411,7 @@ err_secondary: +@@ -1405,7 +1405,7 @@ err_secondary: @@ -62 +60 @@ -index f38c2f3015..6100a130e0 100644 +index 759def2f4b..7dbacceabe 100644 @@ -66 +64 @@ - MLX5_FS_PATH_MAX = IBV_SYSFS_PATH_MAX + 1 + DEV_SYSFS_PATH_MAX = IBV_SYSFS_PATH_MAX + 1 @@ -80 +78 @@ -index 0cb907c599..41034f5d19 100644 +index df27983ad9..fff2422ea6 100644 @@ -83 +81 @@ -@@ -950,7 +950,7 @@ struct mlx5_priv { +@@ -939,7 +939,7 @@ struct mlx5_priv { @@ -92 +90 @@ -@@ -1067,6 +1067,8 @@ int mlx5_dev_configure_rss_reta(struct rte_eth_dev *dev); +@@ -1056,6 +1056,8 @@ int mlx5_dev_configure_rss_reta(struct rte_eth_dev *dev); @@ -101,46 +98,0 @@ -diff --git a/drivers/net/mlx5/windows/mlx5_ethdev_os.c b/drivers/net/mlx5/windows/mlx5_ethdev_os.c -index f4ec855302..076c688699 100644 ---- a/drivers/net/mlx5/windows/mlx5_ethdev_os.c -+++ b/drivers/net/mlx5/windows/mlx5_ethdev_os.c -@@ -56,7 +56,7 @@ mlx5_get_mac(struct rte_eth_dev *dev, uint8_t (*mac)[RTE_ETHER_ADDR_LEN]) - * 0 on success, a negative errno value otherwise and rte_errno is set. - */ - int --mlx5_get_ifname(const struct rte_eth_dev *dev, char (*ifname)[IF_NAMESIZE]) -+mlx5_get_ifname(const struct rte_eth_dev *dev, char (*ifname)[MLX5_NAMESIZE]) - { - struct mlx5_priv *priv; - mlx5_context_st *context_obj; -@@ -67,7 +67,7 @@ mlx5_get_ifname(const struct rte_eth_dev *dev, char (*ifname)[IF_NAMESIZE]) - } - priv = dev->data->dev_private; - context_obj = (mlx5_context_st *)priv->sh->ctx; -- strncpy(*ifname, context_obj->mlx5_dev.name, IF_NAMESIZE); -+ strncpy(*ifname, context_obj->mlx5_dev.name, MLX5_NAMESIZE); - return 0; - } - -diff --git a/drivers/net/mlx5/windows/mlx5_os.c b/drivers/net/mlx5/windows/mlx5_os.c -index 4fbd8893cf..fdd69fd3c1 100644 ---- a/drivers/net/mlx5/windows/mlx5_os.c -+++ b/drivers/net/mlx5/windows/mlx5_os.c -@@ -550,7 +550,7 @@ mlx5_dev_spawn(struct rte_device *dpdk_dev, - mac.addr_bytes[4], mac.addr_bytes[5]); - #ifdef RTE_LIBRTE_MLX5_DEBUG - { -- char ifname[IF_NAMESIZE]; -+ char ifname[MLX5_NAMESIZE]; - - if (mlx5_get_ifname(eth_dev, &ifname) == 0) - DRV_LOG(DEBUG, "port %u ifname is \"%s\"", -diff --git a/drivers/net/mlx5/windows/mlx5_os.h b/drivers/net/mlx5/windows/mlx5_os.h -index b94f588461..7fe41d4e90 100644 ---- a/drivers/net/mlx5/windows/mlx5_os.h -+++ b/drivers/net/mlx5/windows/mlx5_os.h -@@ -14,4 +14,6 @@ enum { - - #define PCI_DRV_FLAGS 0 - -+#define MLX5_NAMESIZE MLX5_FS_NAME_MAX -+ - #endif /* RTE_PMD_MLX5_OS_H_ */