mirror of
https://github.com/openvswitch/ovs
synced 2025-08-31 06:15:47 +00:00
netdev-tc-offloads: Don't offload header modification on ip fragments.
While offloading header modifications to TC, OVS is using {TCA_PEDIT} + {TCA_CSUM} combination as that it the only way to represent header rewrite. However, {TCA_CSUM} is unable to calculate L4 checksums for IP fragments. Since TC already applies fragmentation bit masking, this patch simply needs to prevent these packets from being processed through TC. Reported-at: https://issues.redhat.com/browse/FDP-545 Acked-by: Ilya Maximets <i.maximets@ovn.org> Signed-off-by: Eelco Chaudron <echaudro@redhat.com>
This commit is contained in:
5
lib/tc.c
5
lib/tc.c
@@ -2974,7 +2974,10 @@ csum_update_flag(struct tc_flower *flower,
|
||||
* eth(dst=<mac>),eth_type(0x0800) actions=set(ipv4(src=<new_ip>))
|
||||
* we need to force a more specific flow as this can, for example,
|
||||
* need a recalculation of icmp checksum if the packet that passes
|
||||
* is ICMPv6 and tcp checksum if its tcp. */
|
||||
* is ICMPv6 and tcp checksum if its tcp.
|
||||
*
|
||||
* This section of the code must be kept in sync with the pre-check
|
||||
* function in netdev-offload-tc.c, tc_will_add_l4_checksum(). */
|
||||
|
||||
switch (htype) {
|
||||
case TCA_PEDIT_KEY_EX_HDR_TYPE_IP4:
|
||||
|
Reference in New Issue
Block a user