-
Notifications
You must be signed in to change notification settings - Fork 388
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
Make disabling TX checksum offload configurable #3832
Conversation
Codecov Report
@@ Coverage Diff @@
## main #3832 +/- ##
===========================================
- Coverage 62.18% 46.10% -16.09%
===========================================
Files 281 247 -34
Lines 40091 35913 -4178
===========================================
- Hits 24931 16556 -8375
- Misses 13190 17720 +4530
+ Partials 1970 1637 -333
Flags with carried forward coverage won't be shown. Click here to find out more.
|
/test-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.
@tnqn : does that mean to use Suricata for IPS/FW, we must disable checksum offload? It sounds not ideal.
@@ -48,7 +48,7 @@ type ifConfigurator struct { | |||
epCache *sync.Map | |||
} | |||
|
|||
func newInterfaceConfigurator(ovsDatapathType ovsconfig.OVSDatapathType, isOvsHardwareOffloadEnabled bool) (*ifConfigurator, error) { |
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.
Add a comment saying disableTXChecksumOffload is ignored on Windows?
@@ -170,6 +170,10 @@ data: | |||
# `trafficEncapMode` is `noEncap`, and `noSNAT` is true. | |||
enableBridgingMode: false | |||
|
|||
# Disable TX checksum offloading for container network interfaces. It's supposed to be set to true when the | |||
# datapath doesn't support TX checksum offloading, which causes packets to be dropped due to bad checksum. | |||
disableTXChecksumOffload: false |
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.
We should say it is on Linux only?
Yes. I remember it's also the case of Snort. I saw this issue in several places where packets are passed to userspace and sent back to kernel for transmission. Not sure if it's specific to AF_PACKET, I will try other capture methods. |
Add a configuration parameter `disableTXChecksumOffload` for Antrea Agent to support cases in which the datapath doesn't support TX checksum offloading, which causes packets to be dropped due to bad checksum. Signed-off-by: Quan Tian <[email protected]>
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.
Ok. Anyway, let us merge it for this release. And we can think about any better solution (seems not quite possible).
/test-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.
I'm also fine with this change, but I agree with Jianjun that it is really not ideal if this is required when integrating with IDS solutions.
Sure @jianjuns @antoninbas, I will explore better solutions. |
This is a supplement to PR antrea-io#3832. When `disableTXChecksumOffload` is true, TX checksum offload should be also disabled, otherwise for the cases in which the datapath doesn't support TX checksum offloading, packets received on Antrea gateway could be dropped due to bad checksum. Signed-off-by: Hongliang Liu <[email protected]>
This is a supplement to PR antrea-io#3832. When `disableTXChecksumOffload` is true, TX checksum offload of Antrea gateway should be also disabled, otherwise for the cases in which the datapath doesn't support TX checksum offloading, packets sent from Antrea gateway could be dropped due to bad checksum. Note that, when changing `disableTXChecksumOffload` from true back to false, TX checksum offload of Antrea gateway will not be enabled automatically, and TX checksum offload can be enabled manually with ethtool. Another way is to remove Antrea gateway interface before updating `disableTXChecksumOffload`. Signed-off-by: Hongliang Liu <[email protected]>
This is a supplement to PR antrea-io#3832. When `disableTXChecksumOffload` is true, TX checksum offload of Antrea gateway should be also disabled, otherwise for the cases in which the datapath doesn't support TX checksum offloading, packets sent from Antrea gateway could be dropped due to bad checksum. Note that, when changing `disableTXChecksumOffload` from true back to false, TX checksum offload of Antrea gateway will not be enabled automatically, and TX checksum offload can be enabled manually with ethtool. Another way is to remove Antrea gateway interface before updating `disableTXChecksumOffload`. Signed-off-by: Hongliang Liu <[email protected]>
Add a configuration parameter
disableTXChecksumOffload
for Antrea Agent to support cases in which the datapath doesn't support TX checksum offloading, which causes packets to be dropped due to bad checksum.Signed-off-by: Quan Tian [email protected]
This is required when using TrafficControl Redirect action with threat detection engines' certain packet capture methods, e.g. Suricata AF_PACKET, with which skb csum state is messed up after it's processed by engines' userspace, leading to packet drop on destination.