Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 172002
b: refs/heads/master
c: 3291b9d
h: refs/heads/master
v: v3
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Nov 29, 2009
1 parent b783870 commit 25ae529
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9b963e5d0e01461099a40117b05480f24b63381f
refs/heads/master: 3291b9db567e1ec38362024049cbd02987b1e277
9 changes: 6 additions & 3 deletions trunk/net/core/pktgen.c
Original file line number Diff line number Diff line change
Expand Up @@ -3626,6 +3626,7 @@ static int pktgen_add_device(struct pktgen_thread *t, const char *ifname)
{
struct pktgen_dev *pkt_dev;
int err;
int node = cpu_to_node(t->cpu);

/* We don't allow a device to be on several threads */

Expand All @@ -3635,12 +3636,13 @@ static int pktgen_add_device(struct pktgen_thread *t, const char *ifname)
return -EBUSY;
}

pkt_dev = kzalloc(sizeof(struct pktgen_dev), GFP_KERNEL);
pkt_dev = kzalloc_node(sizeof(struct pktgen_dev), GFP_KERNEL, node);
if (!pkt_dev)
return -ENOMEM;

strcpy(pkt_dev->odevname, ifname);
pkt_dev->flows = vmalloc(MAX_CFLOWS * sizeof(struct flow_state));
pkt_dev->flows = vmalloc_node(MAX_CFLOWS * sizeof(struct flow_state),
node);
if (pkt_dev->flows == NULL) {
kfree(pkt_dev);
return -ENOMEM;
Expand Down Expand Up @@ -3702,7 +3704,8 @@ static int __init pktgen_create_thread(int cpu)
struct proc_dir_entry *pe;
struct task_struct *p;

t = kzalloc(sizeof(struct pktgen_thread), GFP_KERNEL);
t = kzalloc_node(sizeof(struct pktgen_thread), GFP_KERNEL,
cpu_to_node(cpu));
if (!t) {
printk(KERN_ERR "pktgen: ERROR: out of memory, can't "
"create new thread.\n");
Expand Down

0 comments on commit 25ae529

Please sign in to comment.