-
Notifications
You must be signed in to change notification settings - Fork 4
[PWCI] "net/txgbe: fix the missing old mailbox interface calls" #460
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
61ccab8
8724a85
9a1073c
66fe109
4623d9f
91a226f
b060d31
9ac3d9c
743bbd3
19d7188
bd96307
33800b5
b5b5d16
d9a6291
5a75391
c054608
52123cc
6565191
141e9a8
ba7254a
bf9a339
f3c15bb
c993d8f
9188d72
9d845a3
52ff61c
a8b2e7b
5a06d69
8da4eaf
b581982
9396a93
7d2c9da
b595d05
31f1e4e
9adc7b2
f87fa31
c58bdc7
945e9be
0c271de
581f250
d77d7f0
3ffcfc4
dec4636
cfd851f
4f69c54
8e1bdc6
a273a0e
4e8a41a
f36df6a
d21c2fe
dba51a2
ce19d0a
ee46024
3b82253
360a8d6
46d02ee
b5721f2
39454e2
82ff0aa
2c5b18a
53fdc23
d1ac7b6
ae57af8
750f635
15501c4
472b099
1c23465
c41f621
29a4d53
868a3ab
603caa2
2db9ce1
dbaed15
aef9434
8d1fe10
860f6c6
7429374
d5a8211
3087db1
970309c
df19cf4
3276821
ad7db90
aff44ad
e0b87fa
2f3b51d
a0b1480
1adf5b8
9727c1b
554192d
d24b503
2c82b4f
22fc97b
928f43e
cf1e03f
8103884
54fe337
ef98b88
6b2df31
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1 @@ | ||
| 25.11.0-rc2 | ||
| 25.11.0-rc3 |
| Original file line number | Diff line number | Diff line change | ||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -511,6 +511,9 @@ static void cmd_help_long_parsed(void *parsed_result, | |||||||||||||
| "set fwd (%s)\n" | ||||||||||||||
| " Set packet forwarding mode.\n\n" | ||||||||||||||
|
|
||||||||||||||
| "set dcb fwd_tc (tc_mask)\n" | ||||||||||||||
| " Set DCB forwarding on specify TCs, if bit-n in tc-mask is 1, then TC-n's forwarding is enabled\n\n" | ||||||||||||||
|
Comment on lines
+514
to
+515
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Polish DCB fwd help text and include both new commands in The new
- "set dcb fwd_tc (tc_mask)\n"
- " Set DCB forwarding on specify TCs, if bit-n in tc-mask is 1, then TC-n's forwarding is enabled\n\n"
+ "set dcb fwd_tc (tc_mask)\n"
+ " Enable DCB forwarding only on selected TCs; if bit n in tc_mask is 1, TC n is enabled for forwarding.\n"
+ "set dcb fwd_tc_cores (cores_per_tc)\n"
+ " Set number of cores used per enabled TC in DCB forwarding.\n\n"This keeps CLI and docs aligned and makes both knobs discoverable from in-app help. 📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||
|
|
||||||||||||||
| "mac_addr add (port_id) (XX:XX:XX:XX:XX:XX)\n" | ||||||||||||||
| " Add a MAC address on port_id.\n\n" | ||||||||||||||
|
|
||||||||||||||
|
|
@@ -6224,6 +6227,106 @@ static void cmd_set_fwd_retry_mode_init(void) | |||||||||||||
| token_struct->string_data.str = token; | ||||||||||||||
| } | ||||||||||||||
|
|
||||||||||||||
| /* *** set DCB forward TCs *** */ | ||||||||||||||
| struct cmd_set_dcb_fwd_tc_result { | ||||||||||||||
| cmdline_fixed_string_t set; | ||||||||||||||
| cmdline_fixed_string_t dcb; | ||||||||||||||
| cmdline_fixed_string_t fwd_tc; | ||||||||||||||
| uint8_t tc_mask; | ||||||||||||||
| }; | ||||||||||||||
|
|
||||||||||||||
| static void cmd_set_dcb_fwd_tc_parsed(void *parsed_result, | ||||||||||||||
| __rte_unused struct cmdline *cl, | ||||||||||||||
| __rte_unused void *data) | ||||||||||||||
| { | ||||||||||||||
| struct cmd_set_dcb_fwd_tc_result *res = parsed_result; | ||||||||||||||
| int i; | ||||||||||||||
| if (res->tc_mask == 0) { | ||||||||||||||
| fprintf(stderr, "TC mask should not be zero!\n"); | ||||||||||||||
| return; | ||||||||||||||
| } | ||||||||||||||
| printf("Enabled DCB forwarding TC list:"); | ||||||||||||||
| dcb_fwd_tc_mask = res->tc_mask; | ||||||||||||||
| for (i = 0; i < RTE_ETH_8_TCS; i++) { | ||||||||||||||
| if (dcb_fwd_tc_mask & (1u << i)) | ||||||||||||||
| printf(" %d", i); | ||||||||||||||
| } | ||||||||||||||
| printf("\n"); | ||||||||||||||
| } | ||||||||||||||
|
|
||||||||||||||
| static cmdline_parse_token_string_t cmd_set_dcb_fwd_tc_set = | ||||||||||||||
| TOKEN_STRING_INITIALIZER(struct cmd_set_dcb_fwd_tc_result, | ||||||||||||||
| set, "set"); | ||||||||||||||
| static cmdline_parse_token_string_t cmd_set_dcb_fwd_tc_dcb = | ||||||||||||||
| TOKEN_STRING_INITIALIZER(struct cmd_set_dcb_fwd_tc_result, | ||||||||||||||
| dcb, "dcb"); | ||||||||||||||
| static cmdline_parse_token_string_t cmd_set_dcb_fwd_tc_fwdtc = | ||||||||||||||
| TOKEN_STRING_INITIALIZER(struct cmd_set_dcb_fwd_tc_result, | ||||||||||||||
| fwd_tc, "fwd_tc"); | ||||||||||||||
| static cmdline_parse_token_num_t cmd_set_dcb_fwd_tc_tcmask = | ||||||||||||||
| TOKEN_NUM_INITIALIZER(struct cmd_set_dcb_fwd_tc_result, | ||||||||||||||
| tc_mask, RTE_UINT8); | ||||||||||||||
|
|
||||||||||||||
| static cmdline_parse_inst_t cmd_set_dcb_fwd_tc = { | ||||||||||||||
| .f = cmd_set_dcb_fwd_tc_parsed, | ||||||||||||||
| .data = NULL, | ||||||||||||||
| .help_str = "config DCB forwarding on specify TCs, if bit-n in tc-mask is 1, then TC-n's forwarding is enabled, and vice versa.", | ||||||||||||||
| .tokens = { | ||||||||||||||
| (void *)&cmd_set_dcb_fwd_tc_set, | ||||||||||||||
| (void *)&cmd_set_dcb_fwd_tc_dcb, | ||||||||||||||
| (void *)&cmd_set_dcb_fwd_tc_fwdtc, | ||||||||||||||
| (void *)&cmd_set_dcb_fwd_tc_tcmask, | ||||||||||||||
| NULL, | ||||||||||||||
| }, | ||||||||||||||
| }; | ||||||||||||||
|
|
||||||||||||||
| /* *** set DCB forward cores per TC *** */ | ||||||||||||||
| struct cmd_set_dcb_fwd_tc_cores_result { | ||||||||||||||
| cmdline_fixed_string_t set; | ||||||||||||||
| cmdline_fixed_string_t dcb; | ||||||||||||||
| cmdline_fixed_string_t fwd_tc_cores; | ||||||||||||||
| uint8_t tc_cores; | ||||||||||||||
| }; | ||||||||||||||
|
|
||||||||||||||
| static void cmd_set_dcb_fwd_tc_cores_parsed(void *parsed_result, | ||||||||||||||
| __rte_unused struct cmdline *cl, | ||||||||||||||
| __rte_unused void *data) | ||||||||||||||
| { | ||||||||||||||
| struct cmd_set_dcb_fwd_tc_cores_result *res = parsed_result; | ||||||||||||||
| if (res->tc_cores == 0) { | ||||||||||||||
| fprintf(stderr, "Cores per-TC should not be zero!\n"); | ||||||||||||||
| return; | ||||||||||||||
| } | ||||||||||||||
| dcb_fwd_tc_cores = res->tc_cores; | ||||||||||||||
| printf("Set cores-per-TC: %u\n", dcb_fwd_tc_cores); | ||||||||||||||
| } | ||||||||||||||
|
|
||||||||||||||
| static cmdline_parse_token_string_t cmd_set_dcb_fwd_tc_cores_set = | ||||||||||||||
| TOKEN_STRING_INITIALIZER(struct cmd_set_dcb_fwd_tc_cores_result, | ||||||||||||||
| set, "set"); | ||||||||||||||
| static cmdline_parse_token_string_t cmd_set_dcb_fwd_tc_cores_dcb = | ||||||||||||||
| TOKEN_STRING_INITIALIZER(struct cmd_set_dcb_fwd_tc_cores_result, | ||||||||||||||
| dcb, "dcb"); | ||||||||||||||
| static cmdline_parse_token_string_t cmd_set_dcb_fwd_tc_cores_fwdtccores = | ||||||||||||||
| TOKEN_STRING_INITIALIZER(struct cmd_set_dcb_fwd_tc_cores_result, | ||||||||||||||
| fwd_tc_cores, "fwd_tc_cores"); | ||||||||||||||
| static cmdline_parse_token_num_t cmd_set_dcb_fwd_tc_cores_tccores = | ||||||||||||||
| TOKEN_NUM_INITIALIZER(struct cmd_set_dcb_fwd_tc_cores_result, | ||||||||||||||
| tc_cores, RTE_UINT8); | ||||||||||||||
|
|
||||||||||||||
| static cmdline_parse_inst_t cmd_set_dcb_fwd_tc_cores = { | ||||||||||||||
| .f = cmd_set_dcb_fwd_tc_cores_parsed, | ||||||||||||||
| .data = NULL, | ||||||||||||||
| .help_str = "config DCB forwarding cores per-TC, 1-means one core process all queues of a TC.", | ||||||||||||||
| .tokens = { | ||||||||||||||
| (void *)&cmd_set_dcb_fwd_tc_cores_set, | ||||||||||||||
| (void *)&cmd_set_dcb_fwd_tc_cores_dcb, | ||||||||||||||
| (void *)&cmd_set_dcb_fwd_tc_cores_fwdtccores, | ||||||||||||||
| (void *)&cmd_set_dcb_fwd_tc_cores_tccores, | ||||||||||||||
| NULL, | ||||||||||||||
| }, | ||||||||||||||
| }; | ||||||||||||||
|
|
||||||||||||||
| /* *** SET BURST TX DELAY TIME RETRY NUMBER *** */ | ||||||||||||||
| struct cmd_set_burst_tx_retry_result { | ||||||||||||||
| cmdline_fixed_string_t set; | ||||||||||||||
|
|
@@ -14003,6 +14106,8 @@ static cmdline_parse_ctx_t builtin_ctx[] = { | |||||||||||||
| &cmd_set_fwd_mask, | ||||||||||||||
| &cmd_set_fwd_mode, | ||||||||||||||
| &cmd_set_fwd_retry_mode, | ||||||||||||||
| &cmd_set_dcb_fwd_tc, | ||||||||||||||
| &cmd_set_dcb_fwd_tc_cores, | ||||||||||||||
| &cmd_set_burst_tx_retry, | ||||||||||||||
| &cmd_set_promisc_mode_one, | ||||||||||||||
| &cmd_set_promisc_mode_all, | ||||||||||||||
|
|
||||||||||||||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Use
patternas the conversion source and validateretbefore memcpyThe switch to
rte_flow_conv()and usingretas the copy size fixes the previous fixed-length copy, but the current call:uses
itemas the source, even though onlyitem->typeis initialized anditem->spec/mask/lastjust point to generic byte buffers. For item types with variable layouts (e.g. RAW, FLEX), the conversion helpers may inspect fields initem->mask, which are not valid typed structures here.To avoid undefined behavior and make the intent explicit, it’s safer to use the parsed
patternas the source (it has proper spec/mask/last), and to treat conversion failure or an unexpectedly large size as an error:This keeps the new behavior (length derived from the real item type) while ensuring the conversion logic only ever sees a fully initialized
struct rte_flow_itemand preventing oversize copies into the fixedFLEX_MAX_FLOW_PATTERN_LENGTHbuffers.