Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 237299
b: refs/heads/master
c: 26f70e1
h: refs/heads/master
i:
  237297: 2ebf2c2
  237295: 7e292d8
v: v3
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Feb 25, 2011
1 parent 4206c54 commit 93dc8be
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 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: 250a65f78265940ac33a2dd2002924e6126efe14
refs/heads/master: 26f70e1202b3c66c4f63b8b25e0419dd0b3a91e3
15 changes: 13 additions & 2 deletions trunk/net/sched/sch_choke.c
Original file line number Diff line number Diff line change
Expand Up @@ -219,14 +219,25 @@ static bool choke_match_flow(struct sk_buff *skb1,
return *ports1 == *ports2;
}

struct choke_skb_cb {
u16 classid;
};

static inline struct choke_skb_cb *choke_skb_cb(const struct sk_buff *skb)
{
BUILD_BUG_ON(sizeof(skb->cb) <
sizeof(struct qdisc_skb_cb) + sizeof(struct choke_skb_cb));
return (struct choke_skb_cb *)qdisc_skb_cb(skb)->data;
}

static inline void choke_set_classid(struct sk_buff *skb, u16 classid)
{
*(unsigned int *)(qdisc_skb_cb(skb)->data) = classid;
choke_skb_cb(skb)->classid = classid;
}

static u16 choke_get_classid(const struct sk_buff *skb)
{
return *(unsigned int *)(qdisc_skb_cb(skb)->data);
return choke_skb_cb(skb)->classid;
}

/*
Expand Down

0 comments on commit 93dc8be

Please sign in to comment.