Commit 148989d8 authored by Daniel Borkmann's avatar Daniel Borkmann

Merge branch 'bpf-xdp-rxq-fixes'

Jakub Kicinski says:

====================
Two more trivial fixes to the recent XDP RXQ series.
====================
Signed-off-by: default avatarDaniel Borkmann <daniel@iogearbox.net>
parents 5896351e 82aaff2f
...@@ -7645,7 +7645,7 @@ static int netif_alloc_rx_queues(struct net_device *dev) ...@@ -7645,7 +7645,7 @@ static int netif_alloc_rx_queues(struct net_device *dev)
/* Rollback successful reg's and free other resources */ /* Rollback successful reg's and free other resources */
while (i--) while (i--)
xdp_rxq_info_unreg(&rx[i].xdp_rxq); xdp_rxq_info_unreg(&rx[i].xdp_rxq);
kfree(dev->_rx); kvfree(dev->_rx);
dev->_rx = NULL; dev->_rx = NULL;
return err; return err;
} }
...@@ -7653,16 +7653,15 @@ static int netif_alloc_rx_queues(struct net_device *dev) ...@@ -7653,16 +7653,15 @@ static int netif_alloc_rx_queues(struct net_device *dev)
static void netif_free_rx_queues(struct net_device *dev) static void netif_free_rx_queues(struct net_device *dev)
{ {
unsigned int i, count = dev->num_rx_queues; unsigned int i, count = dev->num_rx_queues;
struct netdev_rx_queue *rx;
/* netif_alloc_rx_queues alloc failed, resources have been unreg'ed */ /* netif_alloc_rx_queues alloc failed, resources have been unreg'ed */
if (!dev->_rx) if (!dev->_rx)
return; return;
rx = dev->_rx;
for (i = 0; i < count; i++) 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, static void netdev_init_one_queue(struct net_device *dev,
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment