提交 1e76a2ff 编写于 作者: R Rahul Kundu 提交者: David S. Miller

cxgb4: insert IPv6 filter rules in next free region

IPv6 filters can occupy up to 4 slots and will exhaust HPFILTER
region much sooner. So, continue searching for free slots in the
HASH or NORMAL filter regions, as long as the rule's priority does
not conflict with existing rules in those regions.
Signed-off-by: NRahul Kundu <rahul.kundu@chelsio.com>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 e5b15f5a
......@@ -604,17 +604,14 @@ int cxgb4_get_free_ftid(struct net_device *dev, u8 family, bool hash_en,
/* If the new rule wants to get inserted into
* HPFILTER region, but its prio is greater
* than the rule with the highest prio in HASH
* region, then reject the rule.
*/
if (t->tc_hash_tids_max_prio &&
tc_prio > t->tc_hash_tids_max_prio)
break;
/* If there's not enough slots available
* in HPFILTER region, then move on to
* normal FILTER region immediately.
* region, or if there's not enough slots
* available in HPFILTER region, then skip
* trying to insert this rule into HPFILTER
* region and directly go to the next region.
*/
if (ftid + n > t->nhpftids) {
if ((t->tc_hash_tids_max_prio &&
tc_prio > t->tc_hash_tids_max_prio) ||
(ftid + n) > t->nhpftids) {
ftid = t->nhpftids;
continue;
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册