Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Jakub Kicinski <kuba@kernel.org>
To: davem@davemloft.net
Cc: netdev@vger.kernel.org, cong.wang@bytedance.com,
peilin.ye@bytedance.com, Jakub Kicinski <kuba@kernel.org>
Subject: [PATCH net-next] Revert "netdevsim: Add multi-queue support"
Date: Tue, 3 Aug 2021 05:39:21 -0700 [thread overview]
Message-ID: <20210803123921.2374485-1-kuba@kernel.org> (raw)
This reverts commit d4861fc6be581561d6964700110a4dede54da6a6.
netdevsim is for enabling upstream tests, two weeks in
and there's no sign of upstream test using the "mutli-queue"
option.
We can add this option back when such test materializes.
Right now it's dead code.
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
---
drivers/net/netdevsim/bus.c | 17 +++++++----------
drivers/net/netdevsim/netdev.c | 6 ++----
drivers/net/netdevsim/netdevsim.h | 1 -
3 files changed, 9 insertions(+), 15 deletions(-)
diff --git a/drivers/net/netdevsim/bus.c b/drivers/net/netdevsim/bus.c
index ff01e5bdc72e..ccec29970d5b 100644
--- a/drivers/net/netdevsim/bus.c
+++ b/drivers/net/netdevsim/bus.c
@@ -262,31 +262,29 @@ static struct device_type nsim_bus_dev_type = {
};
static struct nsim_bus_dev *
-nsim_bus_dev_new(unsigned int id, unsigned int port_count, unsigned int num_queues);
+nsim_bus_dev_new(unsigned int id, unsigned int port_count);
static ssize_t
new_device_store(struct bus_type *bus, const char *buf, size_t count)
{
- unsigned int id, port_count, num_queues;
struct nsim_bus_dev *nsim_bus_dev;
+ unsigned int port_count;
+ unsigned int id;
int err;
- err = sscanf(buf, "%u %u %u", &id, &port_count, &num_queues);
+ err = sscanf(buf, "%u %u", &id, &port_count);
switch (err) {
case 1:
port_count = 1;
fallthrough;
case 2:
- num_queues = 1;
- fallthrough;
- case 3:
if (id > INT_MAX) {
pr_err("Value of \"id\" is too big.\n");
return -EINVAL;
}
break;
default:
- pr_err("Format for adding new device is \"id port_count num_queues\" (uint uint unit).\n");
+ pr_err("Format for adding new device is \"id port_count\" (uint uint).\n");
return -EINVAL;
}
@@ -297,7 +295,7 @@ new_device_store(struct bus_type *bus, const char *buf, size_t count)
goto err;
}
- nsim_bus_dev = nsim_bus_dev_new(id, port_count, num_queues);
+ nsim_bus_dev = nsim_bus_dev_new(id, port_count);
if (IS_ERR(nsim_bus_dev)) {
err = PTR_ERR(nsim_bus_dev);
goto err;
@@ -399,7 +397,7 @@ static struct bus_type nsim_bus = {
#define NSIM_BUS_DEV_MAX_VFS 4
static struct nsim_bus_dev *
-nsim_bus_dev_new(unsigned int id, unsigned int port_count, unsigned int num_queues)
+nsim_bus_dev_new(unsigned int id, unsigned int port_count)
{
struct nsim_bus_dev *nsim_bus_dev;
int err;
@@ -415,7 +413,6 @@ nsim_bus_dev_new(unsigned int id, unsigned int port_count, unsigned int num_queu
nsim_bus_dev->dev.bus = &nsim_bus;
nsim_bus_dev->dev.type = &nsim_bus_dev_type;
nsim_bus_dev->port_count = port_count;
- nsim_bus_dev->num_queues = num_queues;
nsim_bus_dev->initial_net = current->nsproxy->net_ns;
nsim_bus_dev->max_vfs = NSIM_BUS_DEV_MAX_VFS;
mutex_init(&nsim_bus_dev->nsim_bus_reload_lock);
diff --git a/drivers/net/netdevsim/netdev.c b/drivers/net/netdevsim/netdev.c
index 50572e0f1f52..c3aeb15843e2 100644
--- a/drivers/net/netdevsim/netdev.c
+++ b/drivers/net/netdevsim/netdev.c
@@ -347,8 +347,7 @@ nsim_create(struct nsim_dev *nsim_dev, struct nsim_dev_port *nsim_dev_port)
struct netdevsim *ns;
int err;
- dev = alloc_netdev_mq(sizeof(*ns), "eth%d", NET_NAME_UNKNOWN, nsim_setup,
- nsim_dev->nsim_bus_dev->num_queues);
+ dev = alloc_netdev(sizeof(*ns), "eth%d", NET_NAME_UNKNOWN, nsim_setup);
if (!dev)
return ERR_PTR(-ENOMEM);
@@ -393,8 +392,7 @@ void nsim_destroy(struct netdevsim *ns)
static int nsim_validate(struct nlattr *tb[], struct nlattr *data[],
struct netlink_ext_ack *extack)
{
- NL_SET_ERR_MSG_MOD(extack,
- "Please use: echo \"[ID] [PORT_COUNT] [NUM_QUEUES]\" > /sys/bus/netdevsim/new_device");
+ NL_SET_ERR_MSG_MOD(extack, "Please use: echo \"[ID] [PORT_COUNT]\" > /sys/bus/netdevsim/new_device");
return -EOPNOTSUPP;
}
diff --git a/drivers/net/netdevsim/netdevsim.h b/drivers/net/netdevsim/netdevsim.h
index 1c20bcbd9d91..ae462957dcee 100644
--- a/drivers/net/netdevsim/netdevsim.h
+++ b/drivers/net/netdevsim/netdevsim.h
@@ -352,7 +352,6 @@ struct nsim_bus_dev {
struct device dev;
struct list_head list;
unsigned int port_count;
- unsigned int num_queues; /* Number of queues for each port on this bus */
struct net *initial_net; /* Purpose of this is to carry net pointer
* during the probe time only.
*/
--
2.31.1
next reply other threads:[~2021-08-03 12:39 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-08-03 12:39 Jakub Kicinski [this message]
2021-08-03 17:11 ` Cong Wang
2021-08-03 21:18 ` Jakub Kicinski
2021-08-03 21:32 ` Cong Wang
2021-08-03 21:51 ` Jakub Kicinski
2021-08-03 22:04 ` Cong Wang
2021-08-04 7:14 ` Leon Romanovsky
2021-08-04 11:52 ` Jakub Kicinski
2021-08-04 12:49 ` Leon Romanovsky
2021-08-04 15:56 ` Jakub Kicinski
2021-08-04 17:25 ` Leon Romanovsky
2021-08-03 22:16 ` [PATCH net-next] tc-testing: Add control-plane selftests for sch_mq Peilin Ye
2021-08-03 22:21 ` Cong Wang
2021-08-04 11:50 ` patchwork-bot+netdevbpf
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=20210803123921.2374485-1-kuba@kernel.org \
--to=kuba@kernel.org \
--cc=cong.wang@bytedance.com \
--cc=davem@davemloft.net \
--cc=netdev@vger.kernel.org \
--cc=peilin.ye@bytedance.com \
--subject='Re: [PATCH net-next] Revert "netdevsim: Add multi-queue support"' \
/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
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).