openvswitch / ovs-issues

Issue tracker repo for Open vSwitch
10 stars 3 forks source link

[Windows] OVSext driver doesn't support discontiguous net buffer on Windows Server 2019 #323

Open wenyingd opened 4 months ago

wenyingd commented 4 months ago

Hi OVS dev,

We recently hit an issue with OVSext on Windows, after TCP handshake is completed, the following request packet is dropped by OVS datapath because they are marked as invalid.

Below is a screen shot of the packet capture,

pcap

The traffic topology is like this,

Tried to print OVS kernel logs, we saw that the packet is marked as invalid in conntrack by this code . A wonder is the request data (packet) is dis-contiguous in the memory buffer as it was routed on the Windows host before entering OVS, and the existing OVSext assumes the packet data must be contiguous.

According to the Microsoft official document, it looks Windows suggested that networking drivers support header-data split after NDIS 6.0, but OVSext doesn’t have the related support.

Is it possible to modify OVSext driver to support it?

acolombier commented 4 months ago

I am also experiencing this on Windows Server 2022

igsilya commented 4 months ago

Hi. Thanks for the report!

I can be wrong, but it looks like the TCP conntrack handler is actually the only place that is not handling non-contiguous data. If that's true, it should not be hard to fix. Could you try the following change in your setup: https://github.com/igsilya/ovs/commit/3a4f491eee335c39db108c4bffcab2291aa4ed04 ?

Note: only compile-tested in CI, I don't have a windows setup to do any actual testing.