Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 134759
b: refs/heads/master
c: 86dc1ad
h: refs/heads/master
i:
  134757: f651c50
  134755: 81a5e9b
  134751: d2729a2
v: v3
  • Loading branch information
Wei Yongjun authored and David S. Miller committed Feb 27, 2009
1 parent 8f9fb2f commit 239c114
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 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: 6f961068671698c242f1828960485fef1392916f
refs/heads/master: 86dc1ad2be17a7436ee8c6799f6b55e5a5b930f4
18 changes: 6 additions & 12 deletions trunk/net/core/pktgen.c
Original file line number Diff line number Diff line change
Expand Up @@ -3275,8 +3275,7 @@ static void pktgen_stop(struct pktgen_thread *t)

list_for_each_entry(pkt_dev, &t->if_list, list) {
pktgen_stop_device(pkt_dev);
if (pkt_dev->skb)
kfree_skb(pkt_dev->skb);
kfree_skb(pkt_dev->skb);

pkt_dev->skb = NULL;
}
Expand All @@ -3303,8 +3302,7 @@ static void pktgen_rem_one_if(struct pktgen_thread *t)
if (!cur->removal_mark)
continue;

if (cur->skb)
kfree_skb(cur->skb);
kfree_skb(cur->skb);
cur->skb = NULL;

pktgen_remove_device(t, cur);
Expand All @@ -3328,8 +3326,7 @@ static void pktgen_rem_all_ifs(struct pktgen_thread *t)
list_for_each_safe(q, n, &t->if_list) {
cur = list_entry(q, struct pktgen_dev, list);

if (cur->skb)
kfree_skb(cur->skb);
kfree_skb(cur->skb);
cur->skb = NULL;

pktgen_remove_device(t, cur);
Expand Down Expand Up @@ -3393,8 +3390,7 @@ static __inline__ void pktgen_xmit(struct pktgen_dev *pkt_dev)

if (!netif_running(odev)) {
pktgen_stop_device(pkt_dev);
if (pkt_dev->skb)
kfree_skb(pkt_dev->skb);
kfree_skb(pkt_dev->skb);
pkt_dev->skb = NULL;
goto out;
}
Expand All @@ -3415,8 +3411,7 @@ static __inline__ void pktgen_xmit(struct pktgen_dev *pkt_dev)
if ((++pkt_dev->clone_count >= pkt_dev->clone_skb)
|| (!pkt_dev->skb)) {
/* build a new pkt */
if (pkt_dev->skb)
kfree_skb(pkt_dev->skb);
kfree_skb(pkt_dev->skb);

pkt_dev->skb = fill_packet(odev, pkt_dev);
if (pkt_dev->skb == NULL) {
Expand Down Expand Up @@ -3498,8 +3493,7 @@ static __inline__ void pktgen_xmit(struct pktgen_dev *pkt_dev)

/* Done with this */
pktgen_stop_device(pkt_dev);
if (pkt_dev->skb)
kfree_skb(pkt_dev->skb);
kfree_skb(pkt_dev->skb);
pkt_dev->skb = NULL;
}
out:;
Expand Down

0 comments on commit 239c114

Please sign in to comment.