diff options
author | WANG Cong <xiyou.wangcong@gmail.com> | 2011-05-22 02:17:11 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2011-05-23 03:01:21 +0200 |
commit | 68d5ac2ed6180567407e4187e206df3ba6466373 (patch) | |
tree | 061f3cb53c56333c72ca83c2fc7d9b34d5539a45 /net | |
parent | net: skb_trim explicitely check the linearity instead of data_len (diff) | |
download | linux-68d5ac2ed6180567407e4187e206df3ba6466373.tar.xz linux-68d5ac2ed6180567407e4187e206df3ba6466373.zip |
pktgen: use vzalloc_node() instead of vmalloc_node() + memset()
Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com>
Cc: "David S. Miller" <davem@davemloft.net>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/core/pktgen.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/net/core/pktgen.c b/net/core/pktgen.c index 67870e9fd097..3b85c0dffa61 100644 --- a/net/core/pktgen.c +++ b/net/core/pktgen.c @@ -3544,13 +3544,12 @@ static int pktgen_add_device(struct pktgen_thread *t, const char *ifname) return -ENOMEM; strcpy(pkt_dev->odevname, ifname); - pkt_dev->flows = vmalloc_node(MAX_CFLOWS * sizeof(struct flow_state), + pkt_dev->flows = vzalloc_node(MAX_CFLOWS * sizeof(struct flow_state), node); if (pkt_dev->flows == NULL) { kfree(pkt_dev); return -ENOMEM; } - memset(pkt_dev->flows, 0, MAX_CFLOWS * sizeof(struct flow_state)); pkt_dev->removal_mark = 0; pkt_dev->min_pkt_size = ETH_ZLEN; |