[ovs-dev] [PATCH] netdev-dpdk: Fix dev attached flag.
If the dev was already probed correctly, the dev attached flag should be set to true, or resource would leak during destruct. Signed-off-by: Zhike Wang --- lib/netdev-dpdk.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c index a65540c..10e2fe9 100644 --- a/lib/netdev-dpdk.c +++ b/lib/netdev-dpdk.c @@ -1728,6 +1728,9 @@ netdev_dpdk_process_devargs(struct netdev_dpdk *dev, new_port_id = DPDK_ETH_PORT_ID_INVALID; } } +} else { +dev->attached = true; +VLOG_INFO("Device '%s' attached to DPDK", devargs); } } -- 1.8.3.1 ___ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev
[ovs-dev] [PATCH] flow: Fix IPv6 header parser with partial offloading.
Set new_proto before it is used in parse_ipv6_ext_hdrs__(). Signed-off-by: Zhike Wang --- lib/flow.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/flow.c b/lib/flow.c index a18a1e6..45bb96b 100644 --- a/lib/flow.c +++ b/lib/flow.c @@ -1136,11 +1136,11 @@ parse_tcp_flags(struct dp_packet *packet) dp_packet_set_l2_pad_size(packet, size - plen); size = plen; const struct ovs_16aligned_ip6_frag *frag_hdr; +nw_proto = nh->ip6_nxt; if (!parse_ipv6_ext_hdrs__(&data, &size, &nw_proto, &nw_frag, &frag_hdr)) { return 0; } -nw_proto = nh->ip6_nxt; } else { return 0; } -- 1.8.3.1 ___ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev
[ovs-dev] [PATCH] conntrack: Fix tcp payload length in case multi-segments.
Signed-off-by: Zhike Wang --- lib/conntrack-private.h | 16 ++-- 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/lib/conntrack-private.h b/lib/conntrack-private.h index 590f139..1d21f6e 100644 --- a/lib/conntrack-private.h +++ b/lib/conntrack-private.h @@ -233,13 +233,17 @@ conn_update_expiration(struct conntrack *ct, struct conn *conn, static inline uint32_t tcp_payload_length(struct dp_packet *pkt) { -const char *tcp_payload = dp_packet_get_tcp_payload(pkt); -if (tcp_payload) { -return ((char *) dp_packet_tail(pkt) - dp_packet_l2_pad_size(pkt) -- tcp_payload); -} else { -return 0; +size_t l4_size = dp_packet_l4_size(pkt); + +if (OVS_LIKELY(l4_size >= TCP_HEADER_LEN)) { +struct tcp_header *tcp = dp_packet_l4(pkt); +int tcp_len = TCP_OFFSET(tcp->tcp_ctl) * 4; + +if (OVS_LIKELY(tcp_len >= TCP_HEADER_LEN && tcp_len <= l4_size)) { +return (l4_size - tcp_len); +} } +return 0; } #endif /* conntrack-private.h */ -- 1.8.3.1 ___ dev mailing list d...@openvswitch.org https://mail.openvswitch.org/mailman/listinfo/ovs-dev