Skip to content

Commit 989f1d2

Browse files
committed
Remove mtu_enable/kni.enable mutual exclusion
Physical machine testing confirmed mtu_enable=1 and kni.enable=1 can coexist: with veth0 MTU=1500 the kernel stack handles fragmentation, and 'ifconfig veth0 mtu 9000' enables jumbo frame on the KNI path. FF_KERNEL_COEXIST exclusion is retained.
1 parent 4c30d11 commit 989f1d2

2 files changed

Lines changed: 1 addition & 6 deletions

File tree

docs/mtu_change_spec/zh_cn/12-风险与兼容性.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -95,7 +95,7 @@ NIC、vSwitch/bridge、宿主机 tap、交换机和 f-stack-client 必须统一
9595
- IPv4/IPv6 共用 ifnet MTU,但 ICMP PMTU、MSS 与分片路径不同,必须分别验证。
9696
- VLAN/QinQ 会增加 L2 overhead;large data room 计算须预留双 VLAN,设备 frame limit 也须考虑 overhead。
9797
- bond 上限取所有 member 的最小能力;由 primary 在本进程内依次修改各 member,任一失败逆序回滚。
98-
- 本期明确阻止 KNI/内核共存与 `mtu_enable=1` 同时启用,配置阶段返回 `EOPNOTSUPP` 语义;后续若实现 KNI 联动须另立 spec
98+
- `mtu_enable=1``kni.enable=1` 的互斥已解除(物理机实测验证,以本条为准,覆盖本 spec 集中 07/08/09/10/11 关于 KNI 互斥的历史描述):开启 KNI 时,若 KNI 内核接口 `veth0` 的 MTU 保持默认 1500,DPDK 巨帧路径正常工作,KNI 侧由内核协议栈负责拆包收发;若通过 `ifconfig veth0 mtu 9000``veth0` MTU 设为 9000,则 KNI 通路也可正常收发巨帧数据包。`FF_KERNEL_COEXIST``mtu_enable=1` 的互斥仍保留
9999

100100
## 8. 默认兼容策略
101101

lib/ff_config.c

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1443,11 +1443,6 @@ ff_check_config(struct ff_config *cfg)
14431443
return -1;
14441444
}
14451445
#endif
1446-
if (cfg->kni.enable) {
1447-
fprintf(stderr,
1448-
"mtu_enable=1 is incompatible with kni.enable=1\n");
1449-
return -1;
1450-
}
14511446
} else {
14521447
for (i = 0; i < cfg->dpdk.nb_ports; i++) {
14531448
uint16_t portid = cfg->dpdk.portid_list[i];

0 commit comments

Comments
 (0)