Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 279169
b: refs/heads/master
c: fa0f5aa
h: refs/heads/master
i:
  279167: c0b1871
v: v3
  • Loading branch information
Eric Dumazet authored and David S. Miller committed Jan 3, 2012
1 parent 053e888 commit 1ffc641
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 6 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: d32ae76f2b776347051cf821ebe690602e38dfc7
refs/heads/master: fa0f5aa74316c636427ac92dad0bc5714c34ca17
14 changes: 9 additions & 5 deletions trunk/net/sched/sch_api.c
Original file line number Diff line number Diff line change
Expand Up @@ -618,20 +618,24 @@ void qdisc_class_hash_remove(struct Qdisc_class_hash *clhash,
}
EXPORT_SYMBOL(qdisc_class_hash_remove);

/* Allocate an unique handle from space managed by kernel */

/* Allocate an unique handle from space managed by kernel
* Possible range is [8000-FFFF]:0000 (0x8000 values)
*/
static u32 qdisc_alloc_handle(struct net_device *dev)
{
int i = 0x10000;
int i = 0x8000;
static u32 autohandle = TC_H_MAKE(0x80000000U, 0);

do {
autohandle += TC_H_MAKE(0x10000U, 0);
if (autohandle == TC_H_MAKE(TC_H_ROOT, 0))
autohandle = TC_H_MAKE(0x80000000U, 0);
} while (qdisc_lookup(dev, autohandle) && --i > 0);
if (!qdisc_lookup(dev, autohandle))
return autohandle;
cond_resched();
} while (--i > 0);

return i > 0 ? autohandle : 0;
return 0;
}

void qdisc_tree_decrease_qlen(struct Qdisc *sch, unsigned int n)
Expand Down

0 comments on commit 1ffc641

Please sign in to comment.