-
Notifications
You must be signed in to change notification settings - Fork 724
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
ipvs: add the support of fnat46. #746
Conversation
efe34a2
to
74cbff6
Compare
5f0df25
to
f4a057f
Compare
f4a057f
to
4d4e8c9
Compare
struct tcpopt_ip4_addr_extra { | ||
uint8_t opcode; | ||
uint8_t opsize; | ||
__be16 src_port; | ||
struct in_addr src_addr; | ||
uint8_t padding[2]; | ||
__be16 dst_port; | ||
struct in_addr dst_addr; | ||
} __attribute__((__packed__)); |
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.
Could the extral 2 padding bytes increase failure risk when inserting data into tcp header options?
/* | ||
* "xoa" is only applied to fnat46 and fnat66 modes. | ||
*/ | ||
int dp_vs_xoa_get_iplen(struct dp_vs_conn *conn, struct rte_mbuf *mbuf, |
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.
Why are not the fnat44 and fnat 64 supported by this function?
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.
XOA in both fnat44 and fnat64 modes uses the customized IP option that is unfriendly to the switch. And the switch normally drops this kind of packets in the case of high pps.
err = dp_vs_xoa_get_iplen(conn, mbuf, | ||
&iphdrlen, &iptot_len, &xoa_len, mtu); | ||
if (err != EDPVS_OK) { | ||
goto standalone_uoa; | ||
} |
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.
dp_vs_xoa_get_iplen
doesn't support fnat44 and fnat64, so xoa of udp is not supposed to support the two cases?
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.
- UDP in fnat44 uses the "opp" that is fine to the switch;
- UDP in fnat64 has two choices: a) xoa: that is unfriendly to the switch; 2) opp is not supported.
UOA_M_OPP, /* priave "option-protocol" (IPPROTO_OPT) with UOA */ | ||
UOA_M_IPO, /* add UOA as IPv4 Option field */ | ||
UOA_M_OPP, /* ipv4 and ipv6: [cip/cport] included in private | ||
"option-protocol" (IPPROTO_OPT) */ | ||
UOA_M_XOA, /* ipv4 and ipv6: [cip/cport, vip/vport] included in ipv4 option | ||
or ipv6 dst option */ |
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.
IPO is replaced by XOA for udp, the kernel part of uoa should be modified corespondingly too.
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.
As for the kernel module, toa/uoa, please refer to the below links.
https://github.com/bytedance/toa
https://github.com/bytedance/uoa
The kernel module part for xoa is missing, and the uoa kernel module should be modified accordingly. I don't think it's a complete work now. Could you please replenish it? |
- Introduce "xoa" for toa mode and uoa mode as below in dpvs.conf. tcp { toa_mode {normal|extra|xoa} ... } uoa { uoa_mode {opp|xoa} # "ipo" mode is removed. } Also, "extra" as one toa mode is introduced for ipv4, that includes (cip/cport, vip/vport) in tcp option. - Consolidate the inbound and outbounding processing for fnat44/fnat66/fnat46/fnat64.
c661317
to
f7d5fca
Compare
Closing this PR because dpvs has supported this feature. |
Introduce "xoa" for toa mode and uoa mode as below in dpvs.conf.
tcp {
toa_mode {normal|extra|xoa}
...
}
uoa {
uoa_mode {opp|xoa} # "ipo" mode is removed.
}
Also, "extra" as one toa mode is introduced for ipv4, that includes
(cip/cport, vip/vport) in tcp option.
Consolidate the inbound and outbounding processing for
fnat44/fnat66/fnat46/fnat64.