[ovs-dev] [PATCH v2 3/3] upcall: considering dataofs when parsing tcp pkt

2021-10-27 Thread lic...@chinatelecom.cn
dataofs field of tcp header indicates the tcp header len. The len should be >= 20 bytes/4. This patch is to test dataofs, and don't parse layer 4 fields when meet ba dataofs. This behave is the consistent with openvswitch kenrel module. Signed-off-by: lic121 --- lib/flow.c| 18

[ovs-dev] [PATCH v2 2/3] tests: fix packet data endianness

2021-10-27 Thread lic...@chinatelecom.cn
Without this fix, flowgen.py generates bad tcp pkts. tcpdump reports "bad hdr length 4 - too short" with the pcap generated by flowgen.py This patch is to correct pkt data endianness Signed-off-by: lic121 --- tests/flowgen.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[ovs-dev] [PATCH v2 1/3] upcall: prevent from installing flows when inconsistence

2021-10-27 Thread lic...@chinatelecom.cn
In ovs kernel datapath upcall, the *key* and packet are passed to userspace. The key contains the fields/meta extracted from packet. Once the ovs-vswitchd receives the upcall, the packet is extracted again into *flow*. Next, the flow is used to match openflow rules to generate the wildcard(wc). A

[ovs-dev] [PATCH] tests: fix packet data endianness

2021-10-26 Thread lic...@chinatelecom.cn
Without this fix, flowgen.py generates bad tcp pkts. tcpdump reports "bad hdr length 4 - too short" with the pcap generated by flowgen.py This patch is to correct pkt data endianness Signed-off-by: lic121 --- tests/flowgen.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a

[ovs-dev] [PATCH 2/2] upcall: considering dataofs when parsing tcp pkt

2021-10-26 Thread lic...@chinatelecom.cn
dataofs field of tcp header indicates the tcp header len. The len should be >= 20 bytes/4. This patch is to test dataofs, and don't parse layer 4 fields when meet ba dataofs. This behave is the consistent with openvswitch kenrel module. Signed-off-by: lic121 --- lib/flow.c| 18 ++

[ovs-dev] [PATCH 1/2] upcall: prevent from installing flows when inconsistence

2021-10-26 Thread lic...@chinatelecom.cn
In ovs kernel datapath upcall, the *key* and packet are passed to userspace. The key contains the fields/meta extracted from packet. Once the ovs-vswitchd receives the upcall, the packet is extracted again into *flow*. Next, the flow is used to match openflow rules to generate the wildcard(wc). At