On 5/8/25 18:37, Jakub Kicinski wrote:
On Thu, 8 May 2025 14:59:12 -0700 David Wei wrote:
+def _schedule_checksum_reset(cfg, netnl) -> None:
+    features = ethtool(f"-k {cfg.ifname}", json=True)
+    setting = ""
+    for side in ["tx", "rx"]:
+        f = features[0][side + "-checksumming"]
+        if not f["fixed"]:

I checked and found that "fixed" is a ternary:

          "rx-checksumming": {
              "active": true,
              "fixed": false,
              "requested": true
          },
          "tx-checksumming": {
              "active": true,
              "fixed": null,
              "requested": null
          },

Python loads this JSON as False and None types respectively, and `not
f["fixed"]` is true for both False and None. Maybe this doesn't matter
but flagging it.

I think so, yes.

+            setting += " " + side
+            setting += " " + ("on" if f["requested"] or f["active"] else "off")
+    defer(ethtool, f" -K {cfg.ifname} " + setting)

This does rx/tx-gro too even if not explicitly requested. I assume that
is okay?

You mean because those are automatically updated when we change
checksumming? If so then yes.

Thanks for responding.

Reviewed-by: David Wei <[email protected]>

Reply via email to