Skip to content

Commit 339f571

Browse files
committed
Fix an ff_rss_tbl_init issue for single process, has no impact.
TODO: Optimize the performance of the function in_pcblookup_local().
1 parent e54aa43 commit 339f571

File tree

1 file changed

+11
-1
lines changed

1 file changed

+11
-1
lines changed

lib/ff_dpdk_if.c

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2569,7 +2569,17 @@ ff_rss_tbl_init(void)
25692569
prev_dport = j;
25702570
}
25712571
}
2572-
ff_rss_tbl[idx].dip_tbl[daddr_idx].last_idx = k - 1;
2572+
/*
2573+
* If num and k set 65536, it will be 0, otherwise will set portrange failed.
2574+
* It only appears in a single process, has no impact.
2575+
* And 65535 only used for comparative testing.
2576+
*/
2577+
if (k == FF_RSS_TBL_MAX_DPORT + 1) {
2578+
ff_rss_tbl[idx].dip_tbl[daddr_idx].num = k -2;
2579+
ff_rss_tbl[idx].dip_tbl[daddr_idx].last_idx = k - 2;
2580+
} else
2581+
ff_rss_tbl[idx].dip_tbl[daddr_idx].last_idx = k - 1;
2582+
25732583
ff_rss_tbl[idx].dip_tbl[daddr_idx].last = prev_dport;
25742584
ff_rss_tbl[idx].dip_tbl[daddr_idx].daddr = daddr;
25752585

0 commit comments

Comments
 (0)