DPDK patches and discussions
 help / color / mirror / Atom feed
From: Stephen Hemminger <stephen@networkplumber.org>
To: dev@dpdk.org
Cc: Stephen Hemminger <stephen@networkplumber.org>
Subject: [dpdk-dev] [PATCH 2/2] net/netvsc: eliminate numa specific allocation for control messages
Date: Mon, 13 Jan 2020 11:12:39 -0800	[thread overview]
Message-ID: <20200113191239.22750-3-stephen@networkplumber.org> (raw)
In-Reply-To: <20200113191239.22750-1-stephen@networkplumber.org>

The control messages do not need NUMA specific allocation.
Numa node is not set anyway in most kernels anyway.

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
---
 drivers/net/netvsc/hn_rndis.c | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/drivers/net/netvsc/hn_rndis.c b/drivers/net/netvsc/hn_rndis.c
index 2b4714042e04..7947ca2331e2 100644
--- a/drivers/net/netvsc/hn_rndis.c
+++ b/drivers/net/netvsc/hn_rndis.c
@@ -60,10 +60,9 @@ hn_rndis_rid(struct hn_data *hv)
 	return rid;
 }
 
-static void *hn_rndis_alloc(struct hn_data *hv, size_t size)
+static void *hn_rndis_alloc(size_t size)
 {
-	return rte_zmalloc_socket("RNDIS", size, PAGE_SIZE,
-				 hv->vmbus->device.numa_node);
+	return rte_zmalloc("RNDIS", size, PAGE_SIZE);
 }
 
 #ifdef RTE_LIBRTE_NETVSC_DEBUG_DUMP
@@ -442,7 +441,7 @@ hn_rndis_query(struct hn_data *hv, uint32_t oid,
 	uint32_t rid;
 
 	reqlen = sizeof(*req) + idlen;
-	req = hn_rndis_alloc(hv, reqlen);
+	req = hn_rndis_alloc(reqlen);
 	if (req == NULL)
 		return -ENOMEM;
 
@@ -517,7 +516,7 @@ hn_rndis_halt(struct hn_data *hv)
 {
 	struct rndis_halt_req *halt;
 
-	halt = hn_rndis_alloc(hv, sizeof(*halt));
+	halt = hn_rndis_alloc(sizeof(*halt));
 	if (halt == NULL)
 		return -ENOMEM;
 
@@ -1004,7 +1003,7 @@ static int hn_rndis_init(struct hn_data *hv)
 	uint32_t comp_len, rid;
 	int error;
 
-	req = hn_rndis_alloc(hv, sizeof(*req));
+	req = hn_rndis_alloc(sizeof(*req));
 	if (!req) {
 		PMD_DRV_LOG(ERR, "no memory for RNDIS init");
 		return -ENXIO;
-- 
2.20.1


  parent reply	other threads:[~2020-01-13 19:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-01-13 19:12 [dpdk-dev] [PATCH 0/2] net/netvsc: fix secondary process issues Stephen Hemminger
2020-01-13 19:12 ` [dpdk-dev] [PATCH 1/2] net/netvsc: fix crash in secondary process Stephen Hemminger
2020-01-13 19:12 ` Stephen Hemminger [this message]
2020-01-14 16:51 ` [dpdk-dev] [PATCH 0/2] net/netvsc: fix secondary process issues Ferruh Yigit

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=20200113191239.22750-3-stephen@networkplumber.org \
    --to=stephen@networkplumber.org \
    --cc=dev@dpdk.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).