summaryrefslogtreecommitdiff
path: root/drivers/net/veth.c
diff options
context:
space:
mode:
authorVasily Averin <vvs@openvz.org>2022-04-29 08:17:35 +0300
committerDavid S. Miller <davem@davemloft.net>2022-05-01 13:15:16 +0100
commit961c6136359eef38a8c023d02028fdcd123f02a6 (patch)
tree6a873ac6f3a8a553173d16e43baf28e5c81fc533 /drivers/net/veth.c
parentb97af72209eedccb79a146b7b6243cffb20739b2 (diff)
downloadlwn-961c6136359eef38a8c023d02028fdcd123f02a6.tar.gz
lwn-961c6136359eef38a8c023d02028fdcd123f02a6.zip
net: enable memcg accounting for veth queues
veth netdevice defines own rx queues and allocates array containing up to 4095 ~750-bytes-long 'struct veth_rq' elements. Such allocation is quite huge and should be accounted to memcg. Signed-off-by: Vasily Averin <vvs@openvz.org> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/veth.c')
-rw-r--r--drivers/net/veth.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/net/veth.c b/drivers/net/veth.c
index eb0121a64d6d..3592014e50cc 100644
--- a/drivers/net/veth.c
+++ b/drivers/net/veth.c
@@ -1375,7 +1375,7 @@ static int veth_alloc_queues(struct net_device *dev)
struct veth_priv *priv = netdev_priv(dev);
int i;
- priv->rq = kcalloc(dev->num_rx_queues, sizeof(*priv->rq), GFP_KERNEL);
+ priv->rq = kcalloc(dev->num_rx_queues, sizeof(*priv->rq), GFP_KERNEL_ACCOUNT);
if (!priv->rq)
return -ENOMEM;