Commit 961c6136 authored by Vasily Averin's avatar Vasily Averin Committed by David S. Miller
Browse files

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: default avatarVasily Averin <vvs@openvz.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent b97af722
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -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;