From: Jakub Kicinski <jakub.kicinski@netronome.com>
To: netdev@vger.kernel.org, daniel@iogearbox.net,
alexei.starovoitov@gmail.com
Cc: oss-drivers@netronome.com, brouer@redhat.com,
Jakub Kicinski <jakub.kicinski@netronome.com>
Subject: [PATCH bpf-next 2/2] net: free RX queue structures
Date: Wed, 10 Jan 2018 01:20:02 -0800 [thread overview]
Message-ID: <20180110092002.10420-3-jakub.kicinski@netronome.com> (raw)
In-Reply-To: <20180110092002.10420-1-jakub.kicinski@netronome.com>
Looks like commit e817f85652c1 ("xdp: generic XDP handling of
xdp_rxq_info") replaced kvfree(dev->_rx) in free_netdev() with
a call to netif_free_rx_queues() which doesn't actually free
the rings?
While at it remove the unnecessary temporary variable.
Fixes: e817f85652c1 ("xdp: generic XDP handling of xdp_rxq_info")
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Simon Horman <simon.horman@netronome.com>
---
net/core/dev.c | 7 +++----
1 file changed, 3 insertions(+), 4 deletions(-)
diff --git a/net/core/dev.c b/net/core/dev.c
index 852a54c769a3..74e1e5d31337 100644
--- a/net/core/dev.c
+++ b/net/core/dev.c
@@ -7653,16 +7653,15 @@ static int netif_alloc_rx_queues(struct net_device *dev)
static void netif_free_rx_queues(struct net_device *dev)
{
unsigned int i, count = dev->num_rx_queues;
- struct netdev_rx_queue *rx;
/* netif_alloc_rx_queues alloc failed, resources have been unreg'ed */
if (!dev->_rx)
return;
- rx = dev->_rx;
-
for (i = 0; i < count; i++)
- xdp_rxq_info_unreg(&rx[i].xdp_rxq);
+ xdp_rxq_info_unreg(&dev->_rx[i].xdp_rxq);
+
+ kvfree(dev->_rx);
}
static void netdev_init_one_queue(struct net_device *dev,
--
2.15.1
next prev parent reply other threads:[~2018-01-10 9:20 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-01-10 9:20 [PATCH bpf-next 0/2] net: more fixes to the XDP RXQ series Jakub Kicinski
2018-01-10 9:20 ` [PATCH bpf-next 1/2] net: use the right variant of kfree Jakub Kicinski
2018-01-10 10:58 ` Jesper Dangaard Brouer
2018-01-10 9:20 ` Jakub Kicinski [this message]
2018-01-10 10:59 ` [PATCH bpf-next 2/2] net: free RX queue structures Jesper Dangaard Brouer
2018-01-10 11:10 ` [PATCH bpf-next 0/2] net: more fixes to the XDP RXQ series Daniel Borkmann
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=20180110092002.10420-3-jakub.kicinski@netronome.com \
--to=jakub.kicinski@netronome.com \
--cc=alexei.starovoitov@gmail.com \
--cc=brouer@redhat.com \
--cc=daniel@iogearbox.net \
--cc=netdev@vger.kernel.org \
--cc=oss-drivers@netronome.com \
/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).