Skip to content

Commit c42340d

Browse files
committed
Fix rss_check IPv4 reverse-path misqueue and add key_sync option
1 parent 1f29590 commit c42340d

8 files changed

Lines changed: 470 additions & 66 deletions

File tree

freebsd/netinet/in_pcb.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -961,7 +961,7 @@ in_pcb_lport_dest(const struct inpcb *inp, struct sockaddr *lsa,
961961
for (rss_fast = 0; rss_fast < 8; rss_fast++) {
962962
if (ff_rss_adjust_sport(ifp->if_softc,
963963
faddr.s_addr, laddr.s_addr, fport,
964-
&rss_sel) != 0)
964+
&rss_sel, first, last) != 0)
965965
break;
966966
lport = htons(rss_sel);
967967
if (in_pcblookup_local(pcbinfo, laddr,

lib/ff_config.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -943,6 +943,7 @@ rss_check_cfg_handler(struct ff_config *cfg, __rte_unused const char *section,
943943
fprintf(stderr, "rss_check_cfg_handler malloc failed\n");
944944
return 0;
945945
}
946+
rcc->key_sync = 1; /* default on; "key_sync=" may override */
946947
cfg->dpdk.rss_check_cfgs = rcc;
947948
}
948949

@@ -952,6 +953,8 @@ rss_check_cfg_handler(struct ff_config *cfg, __rte_unused const char *section,
952953
cur->enable = atoi(value);
953954
} else if (strcmp(name, "recheck") == 0) {
954955
cur->recheck = atoi(value);
956+
} else if (strcmp(name, "key_sync") == 0) {
957+
cur->key_sync = atoi(value);
955958
} else if (strcmp(name, "rss_tbl") == 0) {
956959
cur->rss_tbl_str = strdup(value);
957960
if (cur->rss_tbl_str) {

lib/ff_config.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -241,6 +241,7 @@ struct ff_rss_tbl_cfg {
241241
struct ff_rss_check_cfg {
242242
int enable;
243243
int recheck;
244+
int key_sync; /* 1=sync NIC key (default); 0=soft scan fallback */
244245
int nb_rss_tbl;
245246
char *rss_tbl_str;
246247
struct ff_rss_tbl_cfg rss_tbl_cfgs[FF_RSS_TBL_MAX_ENTRIES];

0 commit comments

Comments
 (0)