Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 315767
b: refs/heads/master
c: b92ad72
h: refs/heads/master
i:
  315765: 502d3f9
  315763: 593d686
  315759: 96dad23
v: v3
  • Loading branch information
Alexander Duyck authored and Jeff Kirsher committed Jul 21, 2012
1 parent 166f403 commit ed50389
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 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: 252562c207a850106d9d5b41a41d29f96c0530b7
refs/heads/master: b92ad72dea9925359e9dfa70c4cbf8db6f1b2d65
12 changes: 8 additions & 4 deletions trunk/drivers/net/ethernet/intel/ixgbe/ixgbe_dcb.c
Original file line number Diff line number Diff line change
Expand Up @@ -232,18 +232,22 @@ u8 ixgbe_dcb_get_tc_from_up(struct ixgbe_dcb_config *cfg, int direction, u8 up)
{
struct tc_configuration *tc_config = &cfg->tc_config[0];
u8 prio_mask = 1 << up;
u8 tc;
u8 tc = cfg->num_tcs.pg_tcs;

/* If tc is 0 then DCB is likely not enabled or supported */
if (!tc)
goto out;

/*
* Test for TCs 7 through 1 and report the first match we find. If
* Test from maximum TC to 1 and report the first match we find. If
* we find no match we can assume that the TC is 0 since the TC must
* be set for all user priorities
*/
for (tc = MAX_TRAFFIC_CLASS - 1; tc; tc--) {
for (tc--; tc; tc--) {
if (prio_mask & tc_config[tc].path[direction].up_to_tc_bitmap)
break;
}

out:
return tc;
}

Expand Down

0 comments on commit ed50389

Please sign in to comment.