[{"id":1765507,"web_url":"http://patchwork.ozlabs.org/comment/1765507/","msgid":"<20170908164455.GB7356@vergenet.net>","list_archive_url":null,"date":"2017-09-08T16:44:57","subject":"Re: [ovs-dev] [PATCH v2 2/8] dpif-netdev: retrieve flow directly\n\tfrom the flow mark","submitter":{"id":64714,"url":"http://patchwork.ozlabs.org/api/people/64714/","name":"Simon Horman","email":"simon.horman@netronome.com"},"content":"On Tue, Sep 05, 2017 at 05:22:55PM +0800, Yuanhan Liu wrote:\n> So that we could skip the heavy emc processing, notably, the\n> miniflow_extract function. A simple PHY-PHY forwarding testing\n> shows 53% performance improvement.\n> \n> Note that though the heavy miniflow_extract is skipped, we\n> still have to do per packet checking, due to we have to check\n> the tcp_flags.\n> \n> Co-authored-by: Finn Christensen <fc@napatech.com>\n> Signed-off-by: Yuanhan Liu <yliu@fridaylinux.org>\n> Signed-off-by: Finn Christensen <fc@napatech.com>\n> ---\n> \n> v2: update tcp_flags, which also fixes the build warnings\n> ---\n>  lib/dp-packet.h   | 13 ++++++++++\n>  lib/dpif-netdev.c | 27 ++++++++++++++-----\n>  lib/flow.c        | 78 +++++++++++++++++++++++++++++++++++++++++++++++++++++++\n>  lib/flow.h        |  1 +\n>  4 files changed, 113 insertions(+), 6 deletions(-)\n> \n> diff --git a/lib/dp-packet.h b/lib/dp-packet.h\n> index 046f3ab..a7a062f 100644\n> --- a/lib/dp-packet.h\n> +++ b/lib/dp-packet.h\n> @@ -691,6 +691,19 @@ reset_dp_packet_checksum_ol_flags(struct dp_packet *p)\n>  #define reset_dp_packet_checksum_ol_flags(arg)\n>  #endif\n>  \n> +static inline bool\n> +dp_packet_has_flow_mark(struct dp_packet *p OVS_UNUSED,\n> +                        uint32_t *mark OVS_UNUSED)\n> +{\n> +#ifdef DPDK_NETDEV\n> +    if (p->mbuf.ol_flags & PKT_RX_FDIR_ID) {\n> +        *mark = p->mbuf.hash.fdir.hi;\n> +        return true;\n> +    }\n> +#endif\n> +    return false;\n> +}\n\nIt seems odd that p and mark are marked as OVS_UNUSED\nbut used in the case that DPDK_NETDEV is defined.\n\nSomething like this seems cleaner to me.\n\n+#ifdef DPDK_NETDEV\n+static inline bool\n+dp_packet_has_flow_mark(struct dp_packet *p, uint32_t *mark)\n+{\n+    if (p->mbuf.ol_flags & PKT_RX_FDIR_ID) {\n+        *mark = p->mbuf.hash.fdir.hi;\n+        return true;\n+    }\n+    return false;\n+}\n+#else\n+static inline bool\n+dp_packet_has_flow_mark(struct dp_packet *p OVS_UNUSED,\n+                        uint32_t *mark OVS_UNUSED)\n+{\n+    return false;\n+}\n+#endif\n\n...\n\n> diff --git a/lib/flow.c b/lib/flow.c\n> index b2b10aa..912c538 100644\n> --- a/lib/flow.c\n> +++ b/lib/flow.c\n> @@ -991,6 +991,84 @@ parse_dl_type(const struct eth_header *data_, size_t size)\n>      return parse_ethertype(&data, &size);\n>  }\n>  \n> +uint16_t\n> +parse_tcp_flags(struct dp_packet *packet)\n> +{\n> +    const void *data = dp_packet_data(packet);\n> +    size_t size = dp_packet_size(packet);\n> +    ovs_be16 dl_type;\n> +    uint8_t nw_frag = 0, nw_proto = 0;\n> +\n> +    if (packet->packet_type != htonl(PT_ETH)) {\n> +        return 0;\n> +    }\n> +\n> +    data_pull(&data, &size, ETH_ADDR_LEN * 2);\n> +    dl_type = parse_ethertype(&data, &size);\n> +    if (OVS_LIKELY(dl_type == htons(ETH_TYPE_IP))) {\n> +        const struct ip_header *nh = data;\n> +        int ip_len;\n> +\n> +        if (OVS_UNLIKELY(size < IP_HEADER_LEN)) {\n> +            return 0;\n> +        }\n> +        ip_len = IP_IHL(nh->ip_ihl_ver) * 4;\n> +\n> +        if (OVS_UNLIKELY(ip_len < IP_HEADER_LEN)) {\n> +            return 0;\n> +        }\n> +        if (OVS_UNLIKELY(size < ip_len)) {\n> +            return 0;\n> +        }\n> +\n> +        if (OVS_UNLIKELY(IP_IS_FRAGMENT(nh->ip_frag_off))) {\n> +            nw_frag = FLOW_NW_FRAG_ANY;\n> +            if (nh->ip_frag_off & htons(IP_FRAG_OFF_MASK)) {\n> +                nw_frag |= FLOW_NW_FRAG_LATER;\n> +            }\n> +        }\n> +        nw_proto = nh->ip_proto;\n> +        data_pull(&data, &size, ip_len);\n> +    } else if (dl_type == htons(ETH_TYPE_IPV6)) {\n> +        const struct ovs_16aligned_ip6_hdr *nh;\n> +        uint16_t plen;\n> +\n> +        if (OVS_UNLIKELY(size < sizeof *nh)) {\n> +            return 0;\n> +        }\n> +        nh = data_pull(&data, &size, sizeof *nh);\n> +\n> +        plen = ntohs(nh->ip6_plen);\n> +        if (OVS_UNLIKELY(plen > size)) {\n> +            return 0;\n> +        }\n> +        /* Jumbo Payload option not supported yet. */\n> +        if (OVS_UNLIKELY(size - plen > UINT8_MAX)) {\n> +            return 0;\n> +        }\n> +        size = plen;\n> +\n> +        nw_proto = nh->ip6_nxt;\n> +        if (!parse_ipv6_ext_hdrs__(&data, &size, &nw_proto, &nw_frag)) {\n> +            return 0;\n> +        }\n> +    } else {\n> +        return 0;\n> +    }\n> +\n> +    if (OVS_LIKELY(!(nw_frag & FLOW_NW_FRAG_LATER))) {\n> +        if (OVS_LIKELY(nw_proto == IPPROTO_TCP)) {\n> +            if (OVS_LIKELY(size >= TCP_HEADER_LEN)) {\n\nThe following might be nicer:\n\n+    if (OVS_LIKELY(!(nw_frag & FLOW_NW_FRAG_LATER))\n+        && OVS_LIKELY(nw_proto == IPPROTO_TCP)\n+        && OVS_LIKELY(size >= TCP_HEADER_LEN)) {\n\n> +                const struct tcp_header *tcp = data;\n> +\n> +                return TCP_FLAGS_BE32(tcp->tcp_ctl);\n> +            }\n> +        }\n> +    }\n> +\n> +    return 0;\n> +}\n> +\n>  /* For every bit of a field that is wildcarded in 'wildcards', sets the\n>   * corresponding bit in 'flow' to zero. */\n>  void\n\n...","headers":{"Return-Path":"<ovs-dev-bounces@openvswitch.org>","X-Original-To":["incoming@patchwork.ozlabs.org","dev@openvswitch.org"],"Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","ovs-dev@mail.linuxfoundation.org"],"Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=openvswitch.org\n\t(client-ip=140.211.169.12; helo=mail.linuxfoundation.org;\n\tenvelope-from=ovs-dev-bounces@openvswitch.org;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=netronome-com.20150623.gappssmtp.com\n\theader.i=@netronome-com.20150623.gappssmtp.com\n\theader.b=\"hYVBaw1s\"; dkim-atps=neutral"],"Received":["from mail.linuxfoundation.org (mail.linuxfoundation.org\n\t[140.211.169.12])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xpjqB42pFz9s76\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat,  9 Sep 2017 02:45:10 +1000 (AEST)","from mail.linux-foundation.org (localhost [127.0.0.1])\n\tby mail.linuxfoundation.org (Postfix) with ESMTP id 481D9B7C;\n\tFri,  8 Sep 2017 16:45:00 +0000 (UTC)","from smtp1.linuxfoundation.org (smtp1.linux-foundation.org\n\t[172.17.192.35])\n\tby mail.linuxfoundation.org (Postfix) with ESMTPS id CAA93B14\n\tfor <dev@openvswitch.org>; Fri,  8 Sep 2017 16:44:58 +0000 (UTC)","from mail-wr0-f181.google.com (mail-wr0-f181.google.com\n\t[209.85.128.181])\n\tby smtp1.linuxfoundation.org (Postfix) with ESMTPS id 174E11B3\n\tfor <dev@openvswitch.org>; Fri,  8 Sep 2017 16:44:58 +0000 (UTC)","by mail-wr0-f181.google.com with SMTP id a43so5676379wrc.0\n\tfor <dev@openvswitch.org>; Fri, 08 Sep 2017 09:44:57 -0700 (PDT)","from vergenet.net (53.red-80-24-208.staticip.rima-tde.net.\n\t[80.24.208.53]) by smtp.gmail.com with ESMTPSA id\n\tp1sm1453729wra.29.2017.09.08.09.44.55\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tFri, 08 Sep 2017 09:44:55 -0700 (PDT)"],"X-Greylist":"whitelisted by SQLgrey-1.7.6","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=netronome-com.20150623.gappssmtp.com; s=20150623;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:in-reply-to:user-agent;\n\tbh=P8tQoOJudle1kIHMOuN7xxjJBt5HttzK8vjOpsY6gKA=;\n\tb=hYVBaw1swa/LB2Cs0csAhqmP1tzoI5KHHlXxoadL0UtxQsFIuG+RFGeTa32jnWpQwQ\n\t2Pxypz3+oTKXG8yv3aVfXo9EsxeCuwOG2n+x2i5geH9hEBA8swUmwgvCNLGjrx5mQSol\n\tid5vZr8/cNwM72EgHj4ZQOypcfS+UbMJ7yFiJm6849Emt98PGmWetZmpZSuDp1+KAm/9\n\twLZuFwG2rw1Rx3wv28ZtWK2uD2bir0WjkKNUt9wVOhyW+uzoJAG/5bWfSVq0Mfqlqrgo\n\tCZlwJdxTb5vXRsyfVUXYBgHsK0CuTLcHvTUs23RrXBUyZfNCl3VgUUXpyx7RgUpdJa1+\n\tnJHQ==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:in-reply-to:user-agent;\n\tbh=P8tQoOJudle1kIHMOuN7xxjJBt5HttzK8vjOpsY6gKA=;\n\tb=ZMeLJF3j4oq4W6pG2A1e0r3qaZl74jkAJRCCr8QLEgUTTkELh6UBQ9b8b4H5YuMOaj\n\td8wlMuMpuaSeEzMVRXKJQJttPNINvM/O0KU+PV/CGwVwz4aiqTdVPkRgkwvItHOM20Cd\n\tBdXanKNb1yN/FsgAVRAL2oAzty3aW6gDsNAvTxMP5J2zJstuIXhbn2t2TABt30Oc5/41\n\tWQyBJrc5iDP9UWeTy7GJbss4ihzIjRW9avrloCvwbAzR7XpHDJ1C2CMLaYT9S2d5Jsp8\n\tnJqnwzcK2YdGDx0rdUJYmElf3xzSvIaruOG+YLPO2CzoTza8rrb8xZKDrnGVBWOn1MIG\n\tXpvg==","X-Gm-Message-State":"AHPjjUhdQzAMOOHcdVLqrYhX0r/cmAwohPnMjxKzh5KKms0F0ZDXDfOh\n\tKoen7qO7NzKNQhWM","X-Google-Smtp-Source":"ADKCNb6OFMMxQSlQ3Tl8Yh1s3zEIpjUs/6fsoiEjjgcA7kczv+h04PVy+HHmkG4SvsG4Lh1SoOg1Uw==","X-Received":"by 10.223.164.153 with SMTP id g25mr2692848wrb.67.1504889096516; \n\tFri, 08 Sep 2017 09:44:56 -0700 (PDT)","Date":"Fri, 8 Sep 2017 18:44:57 +0200","From":"Simon Horman <simon.horman@netronome.com>","To":"Yuanhan Liu <yliu@fridaylinux.org>","Message-ID":"<20170908164455.GB7356@vergenet.net>","References":"<1504603381-30071-1-git-send-email-yliu@fridaylinux.org>\n\t<1504603381-30071-3-git-send-email-yliu@fridaylinux.org>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<1504603381-30071-3-git-send-email-yliu@fridaylinux.org>","User-Agent":"Mutt/1.5.23 (2014-03-12)","X-Spam-Status":"No, score=0.5 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,\n\tRCVD_IN_DNSWL_NONE,\n\tRCVD_IN_SORBS_SPAM autolearn=disabled version=3.3.1","X-Spam-Checker-Version":"SpamAssassin 3.3.1 (2010-03-16) on\n\tsmtp1.linux-foundation.org","Cc":"dev@openvswitch.org","Subject":"Re: [ovs-dev] [PATCH v2 2/8] dpif-netdev: retrieve flow directly\n\tfrom the flow mark","X-BeenThere":"ovs-dev@openvswitch.org","X-Mailman-Version":"2.1.12","Precedence":"list","List-Id":"<ovs-dev.openvswitch.org>","List-Unsubscribe":"<https://mail.openvswitch.org/mailman/options/ovs-dev>,\n\t<mailto:ovs-dev-request@openvswitch.org?subject=unsubscribe>","List-Archive":"<http://mail.openvswitch.org/pipermail/ovs-dev/>","List-Post":"<mailto:ovs-dev@openvswitch.org>","List-Help":"<mailto:ovs-dev-request@openvswitch.org?subject=help>","List-Subscribe":"<https://mail.openvswitch.org/mailman/listinfo/ovs-dev>,\n\t<mailto:ovs-dev-request@openvswitch.org?subject=subscribe>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"ovs-dev-bounces@openvswitch.org","Errors-To":"ovs-dev-bounces@openvswitch.org"}},{"id":1765543,"web_url":"http://patchwork.ozlabs.org/comment/1765543/","msgid":"<0BBAB7DA-78A9-427E-A247-8C09EFD9CFD3@vmware.com>","list_archive_url":null,"date":"2017-09-08T17:38:07","subject":"Re: [ovs-dev] [PATCH v2 2/8] dpif-netdev: retrieve flow directly\n\tfrom the flow mark","submitter":{"id":68212,"url":"http://patchwork.ozlabs.org/api/people/68212/","name":"Darrell Ball","email":"dball@vmware.com"},"content":"On 9/8/17, 9:44 AM, \"ovs-dev-bounces@openvswitch.org on behalf of Simon Horman\" <ovs-dev-bounces@openvswitch.org on behalf of simon.horman@netronome.com> wrote:\r\n\r\n    On Tue, Sep 05, 2017 at 05:22:55PM +0800, Yuanhan Liu wrote:\r\n    > So that we could skip the heavy emc processing, notably, the\r\n    > miniflow_extract function. A simple PHY-PHY forwarding testing\r\n    > shows 53% performance improvement.\r\n    > \r\n    > Note that though the heavy miniflow_extract is skipped, we\r\n    > still have to do per packet checking, due to we have to check\r\n    > the tcp_flags.\r\n    > \r\n    > Co-authored-by: Finn Christensen <fc@napatech.com>\r\n    > Signed-off-by: Yuanhan Liu <yliu@fridaylinux.org>\r\n    > Signed-off-by: Finn Christensen <fc@napatech.com>\r\n    > ---\r\n    > \r\n    > v2: update tcp_flags, which also fixes the build warnings\r\n    > ---\r\n    >  lib/dp-packet.h   | 13 ++++++++++\r\n    >  lib/dpif-netdev.c | 27 ++++++++++++++-----\r\n    >  lib/flow.c        | 78 +++++++++++++++++++++++++++++++++++++++++++++++++++++++\r\n    >  lib/flow.h        |  1 +\r\n    >  4 files changed, 113 insertions(+), 6 deletions(-)\r\n    > \r\n    > diff --git a/lib/dp-packet.h b/lib/dp-packet.h\r\n    > index 046f3ab..a7a062f 100644\r\n    > --- a/lib/dp-packet.h\r\n    > +++ b/lib/dp-packet.h\r\n    > @@ -691,6 +691,19 @@ reset_dp_packet_checksum_ol_flags(struct dp_packet *p)\r\n    >  #define reset_dp_packet_checksum_ol_flags(arg)\r\n    >  #endif\r\n    >  \r\n    > +static inline bool\r\n    > +dp_packet_has_flow_mark(struct dp_packet *p OVS_UNUSED,\r\n    > +                        uint32_t *mark OVS_UNUSED)\r\n    > +{\r\n    > +#ifdef DPDK_NETDEV\r\n    > +    if (p->mbuf.ol_flags & PKT_RX_FDIR_ID) {\r\n    > +        *mark = p->mbuf.hash.fdir.hi;\r\n    > +        return true;\r\n    > +    }\r\n    > +#endif\r\n    > +    return false;\r\n    > +}\r\n    \r\n    It seems odd that p and mark are marked as OVS_UNUSED\r\n    but used in the case that DPDK_NETDEV is defined.\r\n\r\n[Darrell] OVS_UNUSED means ‘’may be unused”\r\n                Typically, for a trivial alternative, we would do a slight variation of the above\r\n                rather than writing two versions of the functions.\r\n\r\n+static inline bool\r\n+dp_packet_has_flow_mark(struct dp_packet *p OVS_UNUSED,\r\n+                        uint32_t *mark OVS_UNUSED)\r\n+{\r\n +#ifdef DPDK_NETDEV\r\n +    if (p->mbuf.ol_flags & PKT_RX_FDIR_ID) {\r\n +        *mark = p->mbuf.hash.fdir.hi;\r\n +        return true;\r\n +    }\r\n +#else\r\n +    return false; \r\n +#endif\r\n +}\r\n\r\n//////////////////////////////\r\n\r\n    \r\n    Something like this seems cleaner to me.\r\n    \r\n    +#ifdef DPDK_NETDEV\r\n    +static inline bool\r\n    +dp_packet_has_flow_mark(struct dp_packet *p, uint32_t *mark)\r\n    +{\r\n    +    if (p->mbuf.ol_flags & PKT_RX_FDIR_ID) {\r\n    +        *mark = p->mbuf.hash.fdir.hi;\r\n    +        return true;\r\n    +    }\r\n    +    return false;\r\n    +}\r\n    +#else\r\n    +static inline bool\r\n    +dp_packet_has_flow_mark(struct dp_packet *p OVS_UNUSED,\r\n    +                        uint32_t *mark OVS_UNUSED)\r\n    +{\r\n    +    return false;\r\n    +}\r\n    +#endif\r\n    \r\n    ...\r\n    \r\n    > diff --git a/lib/flow.c b/lib/flow.c\r\n    > index b2b10aa..912c538 100644\r\n    > --- a/lib/flow.c\r\n    > +++ b/lib/flow.c\r\n    > @@ -991,6 +991,84 @@ parse_dl_type(const struct eth_header *data_, size_t size)\r\n    >      return parse_ethertype(&data, &size);\r\n    >  }\r\n    >  \r\n    > +uint16_t\r\n    > +parse_tcp_flags(struct dp_packet *packet)\r\n    > +{\r\n    > +    const void *data = dp_packet_data(packet);\r\n    > +    size_t size = dp_packet_size(packet);\r\n    > +    ovs_be16 dl_type;\r\n    > +    uint8_t nw_frag = 0, nw_proto = 0;\r\n    > +\r\n    > +    if (packet->packet_type != htonl(PT_ETH)) {\r\n    > +        return 0;\r\n    > +    }\r\n    > +\r\n    > +    data_pull(&data, &size, ETH_ADDR_LEN * 2);\r\n    > +    dl_type = parse_ethertype(&data, &size);\r\n    > +    if (OVS_LIKELY(dl_type == htons(ETH_TYPE_IP))) {\r\n    > +        const struct ip_header *nh = data;\r\n    > +        int ip_len;\r\n    > +\r\n    > +        if (OVS_UNLIKELY(size < IP_HEADER_LEN)) {\r\n    > +            return 0;\r\n    > +        }\r\n    > +        ip_len = IP_IHL(nh->ip_ihl_ver) * 4;\r\n    > +\r\n    > +        if (OVS_UNLIKELY(ip_len < IP_HEADER_LEN)) {\r\n    > +            return 0;\r\n    > +        }\r\n    > +        if (OVS_UNLIKELY(size < ip_len)) {\r\n    > +            return 0;\r\n    > +        }\r\n    > +\r\n    > +        if (OVS_UNLIKELY(IP_IS_FRAGMENT(nh->ip_frag_off))) {\r\n    > +            nw_frag = FLOW_NW_FRAG_ANY;\r\n    > +            if (nh->ip_frag_off & htons(IP_FRAG_OFF_MASK)) {\r\n    > +                nw_frag |= FLOW_NW_FRAG_LATER;\r\n    > +            }\r\n    > +        }\r\n    > +        nw_proto = nh->ip_proto;\r\n    > +        data_pull(&data, &size, ip_len);\r\n    > +    } else if (dl_type == htons(ETH_TYPE_IPV6)) {\r\n    > +        const struct ovs_16aligned_ip6_hdr *nh;\r\n    > +        uint16_t plen;\r\n    > +\r\n    > +        if (OVS_UNLIKELY(size < sizeof *nh)) {\r\n    > +            return 0;\r\n    > +        }\r\n    > +        nh = data_pull(&data, &size, sizeof *nh);\r\n    > +\r\n    > +        plen = ntohs(nh->ip6_plen);\r\n    > +        if (OVS_UNLIKELY(plen > size)) {\r\n    > +            return 0;\r\n    > +        }\r\n    > +        /* Jumbo Payload option not supported yet. */\r\n    > +        if (OVS_UNLIKELY(size - plen > UINT8_MAX)) {\r\n    > +            return 0;\r\n    > +        }\r\n    > +        size = plen;\r\n    > +\r\n    > +        nw_proto = nh->ip6_nxt;\r\n    > +        if (!parse_ipv6_ext_hdrs__(&data, &size, &nw_proto, &nw_frag)) {\r\n    > +            return 0;\r\n    > +        }\r\n    > +    } else {\r\n    > +        return 0;\r\n    > +    }\r\n    > +\r\n    > +    if (OVS_LIKELY(!(nw_frag & FLOW_NW_FRAG_LATER))) {\r\n    > +        if (OVS_LIKELY(nw_proto == IPPROTO_TCP)) {\r\n    > +            if (OVS_LIKELY(size >= TCP_HEADER_LEN)) {\r\n    \r\n    The following might be nicer:\r\n    \r\n    +    if (OVS_LIKELY(!(nw_frag & FLOW_NW_FRAG_LATER))\r\n    +        && OVS_LIKELY(nw_proto == IPPROTO_TCP)\r\n    +        && OVS_LIKELY(size >= TCP_HEADER_LEN)) {\r\n    \r\n    > +                const struct tcp_header *tcp = data;\r\n    > +\r\n    > +                return TCP_FLAGS_BE32(tcp->tcp_ctl);\r\n    > +            }\r\n    > +        }\r\n    > +    }\r\n    > +\r\n    > +    return 0;\r\n    > +}\r\n    > +\r\n    >  /* For every bit of a field that is wildcarded in 'wildcards', sets the\r\n    >   * corresponding bit in 'flow' to zero. */\r\n    >  void\r\n    \r\n    ...\r\n    _______________________________________________\r\n    dev mailing list\r\n    dev@openvswitch.org\r\n    https://urldefense.proofpoint.com/v2/url?u=https-3A__mail.openvswitch.org_mailman_listinfo_ovs-2Ddev&d=DwICAg&c=uilaK90D4TOVoH58JNXRgQ&r=BVhFA09CGX7JQ5Ih-uZnsw&m=gPQ6bI2kxK_3KX17GsXuiCRl8YFpi7zTpZOiIkM9bgw&s=kqeotzN7bKj_MV8xg5c-r9pc5hrfgTttYknrR2c0pQs&e=","headers":{"Return-Path":"<ovs-dev-bounces@openvswitch.org>","X-Original-To":["incoming@patchwork.ozlabs.org","dev@openvswitch.org"],"Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","ovs-dev@mail.linuxfoundation.org"],"Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=openvswitch.org\n\t(client-ip=140.211.169.12; helo=mail.linuxfoundation.org;\n\tenvelope-from=ovs-dev-bounces@openvswitch.org;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=onevmw.onmicrosoft.com\n\theader.i=@onevmw.onmicrosoft.com header.b=\"F213+jjV\"; \n\tdkim-atps=neutral","spf=none (sender IP is )\n\tsmtp.mailfrom=dball@vmware.com; "],"Received":["from mail.linuxfoundation.org (mail.linuxfoundation.org\n\t[140.211.169.12])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xpl0V0RXMz9sBW\n\tfor <incoming@patchwork.ozlabs.org>;\n\tSat,  9 Sep 2017 03:38:16 +1000 (AEST)","from mail.linux-foundation.org (localhost [127.0.0.1])\n\tby mail.linuxfoundation.org (Postfix) with ESMTP id D29C6A88;\n\tFri,  8 Sep 2017 17:38:12 +0000 (UTC)","from smtp1.linuxfoundation.org (smtp1.linux-foundation.org\n\t[172.17.192.35])\n\tby mail.linuxfoundation.org (Postfix) with ESMTPS id 9DD18A7F\n\tfor <dev@openvswitch.org>; Fri,  8 Sep 2017 17:38:11 +0000 (UTC)","from NAM02-BL2-obe.outbound.protection.outlook.com\n\t(mail-bl2nam02on0049.outbound.protection.outlook.com [104.47.38.49])\n\tby smtp1.linuxfoundation.org (Postfix) with ESMTPS id D87C6A4\n\tfor <dev@openvswitch.org>; Fri,  8 Sep 2017 17:38:10 +0000 (UTC)","from BLUPR05MB611.namprd05.prod.outlook.com (10.141.204.27) by\n\tBLUPR05MB038.namprd05.prod.outlook.com (10.255.210.147) with\n\tMicrosoft SMTP Server (version=TLS1_2,\n\tcipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id\n\t15.1.1084.7; Fri, 8 Sep 2017 17:38:07 +0000","from BLUPR05MB611.namprd05.prod.outlook.com ([10.141.204.27]) by\n\tBLUPR05MB611.namprd05.prod.outlook.com ([10.141.204.27]) with mapi id\n\t15.20.0056.003; Fri, 8 Sep 2017 17:38:07 +0000"],"X-Greylist":"whitelisted by SQLgrey-1.7.6","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=onevmw.onmicrosoft.com; s=selector1-vmware-com;\n\th=From:Date:Subject:Message-ID:Content-Type:MIME-Version;\n\tbh=Cc+wktXCiTPLO/syMNi4Tj1fPJkTGZpdMHpiAr1SYns=;\n\tb=F213+jjVoWEX3qrWMWvdu/IskEj5TpqzadNZZJcSy127oGem04zx1ikuoMBwCE5y0rdpOuNuSEdQjw+qInQ3ktTty3b3Admx3RTKdz0ow6776+euNea8Qzjrac0e26gkPnmFkf7qrSWoyeUMHSkoCnzjViII8ozyl9C1iNrGrOg=","From":"Darrell Ball <dball@vmware.com>","To":"Simon Horman <simon.horman@netronome.com>, Yuanhan Liu\n\t<yliu@fridaylinux.org>","Thread-Topic":"[ovs-dev] [PATCH v2 2/8] dpif-netdev: retrieve flow directly\n\tfrom the flow mark","Thread-Index":"AQHTJiitAGQHJLicgEuVxJZ1GK7FFqKrN0qA//+ZgQA=","Date":"Fri, 8 Sep 2017 17:38:07 +0000","Message-ID":"<0BBAB7DA-78A9-427E-A247-8C09EFD9CFD3@vmware.com>","References":"<1504603381-30071-1-git-send-email-yliu@fridaylinux.org>\n\t<1504603381-30071-3-git-send-email-yliu@fridaylinux.org>\n\t<20170908164455.GB7356@vergenet.net>","In-Reply-To":"<20170908164455.GB7356@vergenet.net>","Accept-Language":"en-US","Content-Language":"en-US","X-MS-Has-Attach":"","X-MS-TNEF-Correlator":"","user-agent":"Microsoft-MacOutlook/f.23.0.170610","x-originating-ip":"[73.162.236.45]","x-ms-publictraffictype":"Email","x-microsoft-exchange-diagnostics":"1; BLUPR05MB038;\n\t20:nZtPhh6d2kC4Gpe6myEUdcvRE7DZTWgCrjuAOuqcbWme9H2p1sw7zmg8FTtYQlc9vWd8oj+msIoWkCYv2fkQh78uFlkxEpSx4kNmqhkPE2yjOGPGMnFKeT8g3pFRcGDyHJVpl8iDX3urgn8nrd7k0bFDNqi0XQBNm0yG9x+KIZg=","x-ms-exchange-antispam-srfa-diagnostics":"SSOS;","x-ms-office365-filtering-correlation-id":"58fc9d15-76e4-4a0a-1115-08d4f6e05e33","x-microsoft-antispam":"UriScan:; BCL:0; PCL:0;\n\tRULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);\n\tSRVR:BLUPR05MB038; ","authentication-results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=openvswitch.org\n\t(client-ip=140.211.169.12; helo=mail.linuxfoundation.org;\n\tenvelope-from=ovs-dev-bounces@openvswitch.org;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=onevmw.onmicrosoft.com\n\theader.i=@onevmw.onmicrosoft.com header.b=\"F213+jjV\"; \n\tdkim-atps=neutral","spf=none (sender IP is )\n\tsmtp.mailfrom=dball@vmware.com; "],"x-exchange-antispam-report-test":"UriScan:(10436049006162)(216315784871565);","x-microsoft-antispam-prvs":"<BLUPR05MB0383A7CF10AAD97C94C5081C8950@BLUPR05MB038.namprd05.prod.outlook.com>","x-exchange-antispam-report-cfa-test":"BCL:0; PCL:0;\n\tRULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(601004)(2401047)(8121501046)(5005006)(3002001)(10201501046)(100000703101)(100105400095)(93006095)(93001095)(6041248)(20161123562025)(20161123564025)(20161123560025)(20161123555025)(20161123558100)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);\n\tSRVR:BLUPR05MB038; BCL:0; PCL:0;\n\tRULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);\n\tSRVR:BLUPR05MB038; ","x-forefront-prvs":"04244E0DC5","x-forefront-antispam-report":"SFV:NSPM;\n\tSFS:(10009020)(6009001)(39860400002)(199003)(189002)(377454003)(24454002)(6512007)(229853002)(6436002)(99286003)(6486002)(4326008)(6306002)(3846002)(106356001)(105586002)(8936002)(6506006)(53546010)(86362001)(53936002)(6246003)(14454004)(966005)(66066001)(83506001)(77096006)(82746002)(575784001)(83716003)(36756003)(8676002)(2906002)(478600001)(3660700001)(76176999)(54356999)(2900100001)(81156014)(3280700002)(25786009)(39060400002)(189998001)(2950100002)(102836003)(5660300001)(50986999)(68736007)(6116002)(305945005)(97736004)(7736002)(4001350100001)(81166006)(33656002)(101416001);\n\tDIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR05MB038;\n\tH:BLUPR05MB611.namprd05.prod.outlook.com; FPR:; SPF:None;\n\tPTR:InfoNoRecords; A:1; MX:1; LANG:en; ","received-spf":"None (protection.outlook.com: vmware.com does not designate\n\tpermitted sender hosts)","spamdiagnosticoutput":"1:99","spamdiagnosticmetadata":"NSPM","Content-ID":"<7110D0E2D197344A92207F1E4702C6C5@namprd05.prod.outlook.com>","MIME-Version":"1.0","X-OriginatorOrg":"vmware.com","X-MS-Exchange-CrossTenant-originalarrivaltime":"08 Sep 2017 17:38:07.8657\n\t(UTC)","X-MS-Exchange-CrossTenant-fromentityheader":"Hosted","X-MS-Exchange-CrossTenant-id":"b39138ca-3cee-4b4a-a4d6-cd83d9dd62f0","X-MS-Exchange-Transport-CrossTenantHeadersStamped":"BLUPR05MB038","X-Spam-Status":"No, score=0.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,\n\tRCVD_IN_DNSWL_NONE autolearn=disabled version=3.3.1","X-Spam-Checker-Version":"SpamAssassin 3.3.1 (2010-03-16) on\n\tsmtp1.linux-foundation.org","Cc":"\"dev@openvswitch.org\" <dev@openvswitch.org>","Subject":"Re: [ovs-dev] [PATCH v2 2/8] dpif-netdev: retrieve flow directly\n\tfrom the flow mark","X-BeenThere":"ovs-dev@openvswitch.org","X-Mailman-Version":"2.1.12","Precedence":"list","List-Id":"<ovs-dev.openvswitch.org>","List-Unsubscribe":"<https://mail.openvswitch.org/mailman/options/ovs-dev>,\n\t<mailto:ovs-dev-request@openvswitch.org?subject=unsubscribe>","List-Archive":"<http://mail.openvswitch.org/pipermail/ovs-dev/>","List-Post":"<mailto:ovs-dev@openvswitch.org>","List-Help":"<mailto:ovs-dev-request@openvswitch.org?subject=help>","List-Subscribe":"<https://mail.openvswitch.org/mailman/listinfo/ovs-dev>,\n\t<mailto:ovs-dev-request@openvswitch.org?subject=subscribe>","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Sender":"ovs-dev-bounces@openvswitch.org","Errors-To":"ovs-dev-bounces@openvswitch.org"}},{"id":1765964,"web_url":"http://patchwork.ozlabs.org/comment/1765964/","msgid":"<2EF2F5C0CC56984AA024D0B180335FCB4221DC28@IRSMSX102.ger.corp.intel.com>","list_archive_url":null,"date":"2017-09-10T16:15:42","subject":"Re: [ovs-dev] [PATCH v2 2/8] dpif-netdev: retrieve flow directly\n\tfrom\tthe flow mark","submitter":{"id":67440,"url":"http://patchwork.ozlabs.org/api/people/67440/","name":"Chandran, Sugesh","email":"sugesh.chandran@intel.com"},"content":"Regards\n_Sugesh\n\n> -----Original Message-----\n> From: ovs-dev-bounces@openvswitch.org [mailto:ovs-dev-\n> bounces@openvswitch.org] On Behalf Of Yuanhan Liu\n> Sent: Tuesday, September 5, 2017 10:23 AM\n> To: dev@openvswitch.org\n> Subject: [ovs-dev] [PATCH v2 2/8] dpif-netdev: retrieve flow directly from\n> the flow mark\n\n[snip]\n> \n>      atomic_read_relaxed(&pmd->dp->emc_insert_min, &cur_min);\n> \n>      DP_PACKET_BATCH_REFILL_FOR_EACH (i, size, packet, packets_) {\n>          struct dp_netdev_flow *flow;\n> +        uint32_t flow_mark;\n> \n>          if (OVS_UNLIKELY(dp_packet_size(packet) < ETH_HEADER_LEN)) {\n>              dp_packet_delete(packet);\n> @@ -4972,6 +4974,16 @@ emc_processing(struct dp_netdev_pmd_thread\n> *pmd,\n>              continue;\n>          }\n> \n> +        if (dp_packet_has_flow_mark(packet, &flow_mark)) {\n> +            flow = dp_netdev_pmd_find_flow_by_mark(pmd, flow_mark);\n> +            if (flow) {\n[Sugesh] If the NIC/hardware can match on tcp_flags then this parsing can be avoided?\nIs that true?\n> +                tcp_flags = parse_tcp_flags(packet);\n> +                dp_netdev_queue_batches(packet, flow, tcp_flags, batches,\n> +                                        n_batches);\n> +                continue;\n> +            }\n> +        }\n> +\n>          if (i != size - 1) {\n>              struct dp_packet **packets = packets_->packets;\n>              /* Prefetch next packet data and metadata. */ @@ -4989,7 +5001,8\n> @@ emc_processing(struct dp_netdev_pmd_thread *pmd,\n>          /* If EMC is disabled skip emc_lookup */\n>          flow = (cur_min == 0) ? NULL: emc_lookup(flow_cache, key);\n>          if (OVS_LIKELY(flow)) {\n> -            dp_netdev_queue_batches(packet, flow, &key->mf, batches,\n> +            tcp_flags = miniflow_get_tcp_flags(&key->mf);\n> +            dp_netdev_queue_batches(packet, flow, tcp_flags, batches,\n>                                      n_batches);\n>          } else {\n>              /* Exact match cache missed. Group missed packets together at @@ -\n> 5166,7 +5179,9 @@ fast_path_processing(struct dp_netdev_pmd_thread\n> *pmd,\n>          flow = dp_netdev_flow_cast(rules[i]);\n> \n>          emc_probabilistic_insert(pmd, &keys[i], flow);\n> -        dp_netdev_queue_batches(packet, flow, &keys[i].mf, batches,\n> n_batches);\n> +        dp_netdev_queue_batches(packet, flow,\n> +                                miniflow_get_tcp_flags(&keys[i].mf),\n> +                                batches, n_batches);\n>      }\n> \n>      dp_netdev_count_packet(pmd, DP_STAT_MASKED_HIT, cnt - miss_cnt);\n> diff --git a/lib/flow.c b/lib/flow.c index b2b10aa..912c538 100644\n> --- a/lib/flow.c\n> +++ b/lib/flow.c\n> @@ -991,6 +991,84 @@ parse_dl_type(const struct eth_header *data_,\n> size_t size)\n>      return parse_ethertype(&data, &size);  }\n> \n\n[Snip]\n> --\n> 2.7.4\n> \n> _______________________________________________\n> dev mailing list\n> dev@openvswitch.org\n> https://mail.openvswitch.org/mailman/listinfo/ovs-dev","headers":{"Return-Path":"<ovs-dev-bounces@openvswitch.org>","X-Original-To":["incoming@patchwork.ozlabs.org","dev@openvswitch.org"],"Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","ovs-dev@mail.linuxfoundation.org"],"Authentication-Results":"ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=openvswitch.org\n\t(client-ip=140.211.169.12; helo=mail.linuxfoundation.org;\n\tenvelope-from=ovs-dev-bounces@openvswitch.org;\n\treceiver=<UNKNOWN>)","Received":["from mail.linuxfoundation.org (mail.linuxfoundation.org\n\t[140.211.169.12])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xqx4N33PCz9s7c\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 11 Sep 2017 02:15:48 +1000 (AEST)","from mail.linux-foundation.org (localhost [127.0.0.1])\n\tby mail.linuxfoundation.org (Postfix) with ESMTP id C11BDA85;\n\tSun, 10 Sep 2017 16:15:46 +0000 (UTC)","from smtp1.linuxfoundation.org (smtp1.linux-foundation.org\n\t[172.17.192.35])\n\tby mail.linuxfoundation.org (Postfix) with ESMTPS id 08FE09EE\n\tfor <dev@openvswitch.org>; Sun, 10 Sep 2017 16:15:46 +0000 (UTC)","from mga09.intel.com (mga09.intel.com [134.134.136.24])\n\tby smtp1.linuxfoundation.org (Postfix) with ESMTPS id B7897E5\n\tfor <dev@openvswitch.org>; Sun, 10 Sep 2017 16:15:45 +0000 (UTC)","from fmsmga003.fm.intel.com ([10.253.24.29])\n\tby orsmga102.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t10 Sep 2017 09:15:45 -0700","from irsmsx109.ger.corp.intel.com ([163.33.3.23])\n\tby FMSMGA003.fm.intel.com with ESMTP; 10 Sep 2017 09:15:43 -0700","from irsmsx156.ger.corp.intel.com (10.108.20.68) by\n\tIRSMSX109.ger.corp.intel.com (163.33.3.23) with Microsoft SMTP Server\n\t(TLS) id 14.3.319.2; Sun, 10 Sep 2017 17:15:43 +0100","from irsmsx102.ger.corp.intel.com ([169.254.2.59]) by\n\tIRSMSX156.ger.corp.intel.com ([169.254.3.130]) with mapi id\n\t14.03.0319.002; Sun, 10 Sep 2017 17:15:43 +0100"],"X-Greylist":"domain auto-whitelisted by SQLgrey-1.7.6","X-ExtLoop1":"1","X-IronPort-AV":"E=Sophos;i=\"5.42,372,1500966000\"; d=\"scan'208\";a=\"898884999\"","From":"\"Chandran, Sugesh\" <sugesh.chandran@intel.com>","To":"Yuanhan Liu <yliu@fridaylinux.org>, \"dev@openvswitch.org\"\n\t<dev@openvswitch.org>","Thread-Topic":"[ovs-dev] [PATCH v2 2/8] dpif-netdev: retrieve flow directly\n\tfrom\tthe flow mark","Thread-Index":"AQHTJijwsWPLngdUaEmzf1NHPwaMiqKuElPw","Date":"Sun, 10 Sep 2017 16:15:42 +0000","Message-ID":"<2EF2F5C0CC56984AA024D0B180335FCB4221DC28@IRSMSX102.ger.corp.intel.com>","References":"<1504603381-30071-1-git-send-email-yliu@fridaylinux.org>\n\t<1504603381-30071-3-git-send-email-yliu@fridaylinux.org>","In-Reply-To":"<1504603381-30071-3-git-send-email-yliu@fridaylinux.org>","Accept-Language":"en-US","Content-Language":"en-US","X-MS-Has-Attach":"","X-MS-TNEF-Correlator":"","x-titus-metadata-40":"eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiOTU5YThkZjgtZmFhOC00YzgxLTkyNzYtNGQ3MTUwZGU4OGMyIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6IkI1ZWRxVkRCclJWVFVONWtJOExOUTFrcXNNMXlaWUh0TDZoVUNDSG83a0U9In0=","x-ctpclassification":"CTP_IC","dlp-product":"dlpe-windows","dlp-version":"11.0.0.116","dlp-reaction":"no-action","x-originating-ip":"[163.33.239.180]","MIME-Version":"1.0","X-Spam-Status":"No, score=-5.0 required=5.0 tests=RCVD_IN_DNSWL_HI,\n\tRP_MATCHES_RCVD autolearn=disabled version=3.3.1","X-Spam-Checker-Version":"SpamAssassin 3.3.1 (2010-03-16) on\n\tsmtp1.linux-foundation.org","Subject":"Re: [ovs-dev] [PATCH v2 2/8] dpif-netdev: retrieve flow directly\n\tfrom\tthe flow mark","X-BeenThere":"ovs-dev@openvswitch.org","X-Mailman-Version":"2.1.12","Precedence":"list","List-Id":"<ovs-dev.openvswitch.org>","List-Unsubscribe":"<https://mail.openvswitch.org/mailman/options/ovs-dev>,\n\t<mailto:ovs-dev-request@openvswitch.org?subject=unsubscribe>","List-Archive":"<http://mail.openvswitch.org/pipermail/ovs-dev/>","List-Post":"<mailto:ovs-dev@openvswitch.org>","List-Help":"<mailto:ovs-dev-request@openvswitch.org?subject=help>","List-Subscribe":"<https://mail.openvswitch.org/mailman/listinfo/ovs-dev>,\n\t<mailto:ovs-dev-request@openvswitch.org?subject=subscribe>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"ovs-dev-bounces@openvswitch.org","Errors-To":"ovs-dev-bounces@openvswitch.org"}},{"id":1766048,"web_url":"http://patchwork.ozlabs.org/comment/1766048/","msgid":"<20170911053710.GK9736@yliu-home>","list_archive_url":null,"date":"2017-09-11T05:37:10","subject":"Re: [ovs-dev] [PATCH v2 2/8] dpif-netdev: retrieve flow directly\n\tfrom the flow mark","submitter":{"id":72215,"url":"http://patchwork.ozlabs.org/api/people/72215/","name":"Yuanhan Liu","email":"yliu@fridaylinux.org"},"content":"On Fri, Sep 08, 2017 at 05:38:07PM +0000, Darrell Ball wrote:\n>     > +static inline bool\n>     > +dp_packet_has_flow_mark(struct dp_packet *p OVS_UNUSED,\n>     > +                        uint32_t *mark OVS_UNUSED)\n>     > +{\n>     > +#ifdef DPDK_NETDEV\n>     > +    if (p->mbuf.ol_flags & PKT_RX_FDIR_ID) {\n>     > +        *mark = p->mbuf.hash.fdir.hi;\n>     > +        return true;\n>     > +    }\n>     > +#endif\n>     > +    return false;\n>     > +}\n>     \n>     It seems odd that p and mark are marked as OVS_UNUSED\n>     but used in the case that DPDK_NETDEV is defined.\n> \n> [Darrell] OVS_UNUSED means ‘’may be unused”\n>                 Typically, for a trivial alternative, we would do a slight variation of the above\n>                 rather than writing two versions of the functions.\n\nRight. I also saw quite many examples like this in OVS. That's why I\ncode in this way, though I agree with Simon, it's indeed a bit odd.\n\n>     > +    if (OVS_LIKELY(!(nw_frag & FLOW_NW_FRAG_LATER))) {\n>     > +        if (OVS_LIKELY(nw_proto == IPPROTO_TCP)) {\n>     > +            if (OVS_LIKELY(size >= TCP_HEADER_LEN)) {\n>     \n>     The following might be nicer:\n>     \n>     +    if (OVS_LIKELY(!(nw_frag & FLOW_NW_FRAG_LATER))\n>     +        && OVS_LIKELY(nw_proto == IPPROTO_TCP)\n>     +        && OVS_LIKELY(size >= TCP_HEADER_LEN)) {\n\nIndeed. Thanks!\n\n\t--yliu","headers":{"Return-Path":"<ovs-dev-bounces@openvswitch.org>","X-Original-To":["incoming@patchwork.ozlabs.org","dev@openvswitch.org"],"Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","ovs-dev@mail.linuxfoundation.org"],"Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=openvswitch.org\n\t(client-ip=140.211.169.12; helo=mail.linuxfoundation.org;\n\tenvelope-from=ovs-dev-bounces@openvswitch.org;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=fridaylinux-org.20150623.gappssmtp.com\n\theader.i=@fridaylinux-org.20150623.gappssmtp.com\n\theader.b=\"N4iOY/hg\"; dkim-atps=neutral"],"Received":["from mail.linuxfoundation.org (mail.linuxfoundation.org\n\t[140.211.169.12])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xrGsH4QcRz9s81\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 11 Sep 2017 15:37:23 +1000 (AEST)","from mail.linux-foundation.org (localhost [127.0.0.1])\n\tby mail.linuxfoundation.org (Postfix) with ESMTP id 97120A95;\n\tMon, 11 Sep 2017 05:37:20 +0000 (UTC)","from smtp1.linuxfoundation.org (smtp1.linux-foundation.org\n\t[172.17.192.35])\n\tby mail.linuxfoundation.org (Postfix) with ESMTPS id 2AF8392F\n\tfor <dev@openvswitch.org>; Mon, 11 Sep 2017 05:37:19 +0000 (UTC)","from mail-pg0-f47.google.com (mail-pg0-f47.google.com\n\t[74.125.83.47])\n\tby smtp1.linuxfoundation.org (Postfix) with ESMTPS id E4615A4\n\tfor <dev@openvswitch.org>; Mon, 11 Sep 2017 05:37:18 +0000 (UTC)","by mail-pg0-f47.google.com with SMTP id i130so6255635pgc.3\n\tfor <dev@openvswitch.org>; Sun, 10 Sep 2017 22:37:18 -0700 (PDT)","from yliu-home ([45.63.61.64]) by smtp.gmail.com with ESMTPSA id\n\tk25sm8890425pgf.13.2017.09.10.22.37.15\n\t(version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tSun, 10 Sep 2017 22:37:17 -0700 (PDT)"],"X-Greylist":"whitelisted by SQLgrey-1.7.6","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=fridaylinux-org.20150623.gappssmtp.com; s=20150623;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:content-transfer-encoding:in-reply-to\n\t:user-agent; bh=pNBHwhShkXFH95Mqb4GqLIGb669MlCCLsZrE9LlYTpY=;\n\tb=N4iOY/hgRQSbACr5ZDV0NXeaLxZiZKOxPcGoiJs5v09FQ1Ao16nQ+Zs3BNiFHwAErF\n\tSALCRNIY70HijU2JIBSRXojco+4tKCAB1DGGGIfflTsktoTyEIVFXPWd2FVQGgPfYyPI\n\to4jhCw6UmSY/o8i2oBzTNRpllmnxrOWsIAlGAeGavkEQJ/ZWDX/K09K6YFuRV/eJ2NGc\n\tE2J6ipbqYX1DFwzYLtM3PcDLkJiMcZ8pLIJNHFmJQUsdZ9h2klNGJiNHXGmyQP5RkVXw\n\tp1xNTSpZNKs8UXLeZgsn/HAV9yzd0aLXX2KAoxVeIbD6a8kfLsP1uk3I/OII3zsHvfGG\n\t2xOQ==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:content-transfer-encoding\n\t:in-reply-to:user-agent;\n\tbh=pNBHwhShkXFH95Mqb4GqLIGb669MlCCLsZrE9LlYTpY=;\n\tb=eEGCJlxcvkoGJfkjr+elMkwA9mWZEZ4jCh3oUsemCMHsKC2Zrtwy5LM3nfXyTvfESG\n\tVEnfJ7QvCiz+m5nXzCGRV5d9n+ZmGC6IWqtS7kytZl/KNBzw5wAZeVrgqCmzAxtYhAp9\n\tHU8i+rU0iA5bp4EM8angVY1myFGxDlMuEnexN4yK3JZfB2cNyMyp/lw6cuS6QFtGp+Ho\n\tw2M7d7Nk7vG61ILD10KWV5IGc7hkWkGpSwv2lj1JSkdGGxu689AKsEY/ce3CpQ0VcQ4b\n\toW/jarCpsnoK3umCz4CZ/4yOBZQrwghwXM7HvXffIFQu0pwiciInceRjQZytpGzu/9um\n\tZLXw==","X-Gm-Message-State":"AHPjjUh0QrpHgWElnjN1y9JLhTatrjwkNu6MNRnQS8b6gQFCTDcSAYHP\n\tzbBUVEjSys03q0lX","X-Google-Smtp-Source":"ADKCNb5ZGddi/tOH/cGuT3OPv3xcXBg/amunfeKIz3CkG4Tq6dctcK4j1PKk8rKv/BoWeO6BTLBKWA==","X-Received":"by 10.99.44.10 with SMTP id s10mr10318718pgs.381.1505108238494; \n\tSun, 10 Sep 2017 22:37:18 -0700 (PDT)","Date":"Mon, 11 Sep 2017 13:37:10 +0800","From":"Yuanhan Liu <yliu@fridaylinux.org>","To":"Darrell Ball <dball@vmware.com>","Message-ID":"<20170911053710.GK9736@yliu-home>","References":"<1504603381-30071-1-git-send-email-yliu@fridaylinux.org>\n\t<1504603381-30071-3-git-send-email-yliu@fridaylinux.org>\n\t<20170908164455.GB7356@vergenet.net>\n\t<0BBAB7DA-78A9-427E-A247-8C09EFD9CFD3@vmware.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<0BBAB7DA-78A9-427E-A247-8C09EFD9CFD3@vmware.com>","User-Agent":"Mutt/1.5.24 (2015-08-30)","X-Spam-Status":"No, score=0.5 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,\n\tRCVD_IN_DNSWL_NONE,\n\tRCVD_IN_SORBS_SPAM autolearn=disabled version=3.3.1","X-Spam-Checker-Version":"SpamAssassin 3.3.1 (2010-03-16) on\n\tsmtp1.linux-foundation.org","Cc":"\"dev@openvswitch.org\" <dev@openvswitch.org>,\n\tSimon Horman <simon.horman@netronome.com>","Subject":"Re: [ovs-dev] [PATCH v2 2/8] dpif-netdev: retrieve flow directly\n\tfrom the flow mark","X-BeenThere":"ovs-dev@openvswitch.org","X-Mailman-Version":"2.1.12","Precedence":"list","List-Id":"<ovs-dev.openvswitch.org>","List-Unsubscribe":"<https://mail.openvswitch.org/mailman/options/ovs-dev>,\n\t<mailto:ovs-dev-request@openvswitch.org?subject=unsubscribe>","List-Archive":"<http://mail.openvswitch.org/pipermail/ovs-dev/>","List-Post":"<mailto:ovs-dev@openvswitch.org>","List-Help":"<mailto:ovs-dev-request@openvswitch.org?subject=help>","List-Subscribe":"<https://mail.openvswitch.org/mailman/listinfo/ovs-dev>,\n\t<mailto:ovs-dev-request@openvswitch.org?subject=subscribe>","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Sender":"ovs-dev-bounces@openvswitch.org","Errors-To":"ovs-dev-bounces@openvswitch.org"}},{"id":1766072,"web_url":"http://patchwork.ozlabs.org/comment/1766072/","msgid":"<20170911063537.GQ9736@yliu-home>","list_archive_url":null,"date":"2017-09-11T06:35:37","subject":"Re: [ovs-dev] [PATCH v2 2/8] dpif-netdev: retrieve flow directly\n\tfrom\tthe flow mark","submitter":{"id":72215,"url":"http://patchwork.ozlabs.org/api/people/72215/","name":"Yuanhan Liu","email":"yliu@fridaylinux.org"},"content":"On Sun, Sep 10, 2017 at 04:15:42PM +0000, Chandran, Sugesh wrote:\n> >      atomic_read_relaxed(&pmd->dp->emc_insert_min, &cur_min);\n> > \n> >      DP_PACKET_BATCH_REFILL_FOR_EACH (i, size, packet, packets_) {\n> >          struct dp_netdev_flow *flow;\n> > +        uint32_t flow_mark;\n> > \n> >          if (OVS_UNLIKELY(dp_packet_size(packet) < ETH_HEADER_LEN)) {\n> >              dp_packet_delete(packet);\n> > @@ -4972,6 +4974,16 @@ emc_processing(struct dp_netdev_pmd_thread\n> > *pmd,\n> >              continue;\n> >          }\n> > \n> > +        if (dp_packet_has_flow_mark(packet, &flow_mark)) {\n> > +            flow = dp_netdev_pmd_find_flow_by_mark(pmd, flow_mark);\n> > +            if (flow) {\n> [Sugesh] If the NIC/hardware can match on tcp_flags then this parsing can be avoided?\n> Is that true?\n\nMaybe. If so, we could get better performance, as I have showed in v1.\n\n\t--yliu","headers":{"Return-Path":"<ovs-dev-bounces@openvswitch.org>","X-Original-To":["incoming@patchwork.ozlabs.org","dev@openvswitch.org"],"Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","ovs-dev@mail.linuxfoundation.org"],"Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=openvswitch.org\n\t(client-ip=140.211.169.12; helo=mail.linuxfoundation.org;\n\tenvelope-from=ovs-dev-bounces@openvswitch.org;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=fridaylinux-org.20150623.gappssmtp.com\n\theader.i=@fridaylinux-org.20150623.gappssmtp.com\n\theader.b=\"Gc7b5xK8\"; dkim-atps=neutral"],"Received":["from mail.linuxfoundation.org (mail.linuxfoundation.org\n\t[140.211.169.12])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xrJ8p5CHBz9s7g\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 11 Sep 2017 16:35:53 +1000 (AEST)","from mail.linux-foundation.org (localhost [127.0.0.1])\n\tby mail.linuxfoundation.org (Postfix) with ESMTP id 538C1AE7;\n\tMon, 11 Sep 2017 06:35:49 +0000 (UTC)","from smtp1.linuxfoundation.org (smtp1.linux-foundation.org\n\t[172.17.192.35])\n\tby mail.linuxfoundation.org (Postfix) with ESMTPS id DC610ACA\n\tfor <dev@openvswitch.org>; Mon, 11 Sep 2017 06:35:47 +0000 (UTC)","from mail-pf0-f177.google.com (mail-pf0-f177.google.com\n\t[209.85.192.177])\n\tby smtp1.linuxfoundation.org (Postfix) with ESMTPS id 33C89E7\n\tfor <dev@openvswitch.org>; Mon, 11 Sep 2017 06:35:47 +0000 (UTC)","by mail-pf0-f177.google.com with SMTP id g13so12704439pfm.2\n\tfor <dev@openvswitch.org>; Sun, 10 Sep 2017 23:35:47 -0700 (PDT)","from yliu-home ([45.63.61.64]) by smtp.gmail.com with ESMTPSA id\n\tz125sm14442449pfz.155.2017.09.10.23.35.43\n\t(version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tSun, 10 Sep 2017 23:35:45 -0700 (PDT)"],"X-Greylist":"whitelisted by SQLgrey-1.7.6","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=fridaylinux-org.20150623.gappssmtp.com; s=20150623;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:in-reply-to:user-agent;\n\tbh=KIZvFDs1zXwrdiYf0OiT759YHlskydFw9DbWyKg8pdo=;\n\tb=Gc7b5xK8uJySNfKH24BNYD2S2rsdzMLUDBYsAsqo5N2WcYBTSl5pOnSfLRqG+fpI62\n\t7wrxbxTFQqYot+uSdilDBgMd8vOMw1Qe4W2QUmStmw+sj1tV9T8EzwTFTCYMrHndCEc8\n\tCJyk1zw6ZJ1z9nUKGNCCcyxOQ39AY9YmPIO3qyekk+q/SlB+fGhroEDKaCafGdIdJINN\n\tgjmhggIN7E8ptoRR0rhVY3HAg4LZkr5N4uKlq+dQdpy8oc2BmvMzIuQsl+hrLdZvAtpJ\n\tcI67bC1N9PpTFY14l2EfcIIi+qSwi2amLFmRyKgwFt4jQqNu60MqA1Kvo+x7fE9IZsIh\n\thkiw==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:in-reply-to:user-agent;\n\tbh=KIZvFDs1zXwrdiYf0OiT759YHlskydFw9DbWyKg8pdo=;\n\tb=NcDYQvyGagpWbhBy+vgATuuC5Srll3hbn1XVL8YFbkTNG6jQzS65wiOZTwVOdmxvMF\n\tbZLyr5M6/FLLbbC134rQvFrT1p4dB6Kh+DQl1eyUwHXdE+x29q6uUUNWmMiyfG82qWaw\n\tqoNsPCae5FC8NpeOgr6qGot905Aq8Tw3trA6qXU8x2hghkvbWL49dXswYFvW0MIVmZXG\n\tuCB5pX/BfTHxHMK+ouK2ctZcOgT/I8wvtVAqdO9urZAEhzDvbgarCKphfBjYveBgQWmX\n\tZ1YQiAsxcx9+0lDLR+He9JokN40hql+XQ0rEtKv21/wo1PXER9/I4kyFL9cobHTzii3W\n\tPHHQ==","X-Gm-Message-State":"AHPjjUj5Sa8CWGVLLLIwygUEzKuScNK/6czuQ745hq1/lTAigIkmgYqm\n\tTXciomLBQIg3m024","X-Google-Smtp-Source":"ADKCNb7WJu1BJl1IL4H0NmGb5t+JxQ/nQPujT2RdZ6wkycdWhcXLCiEBuGjUVG3FUylGMJ2yb0TkMQ==","X-Received":"by 10.101.75.136 with SMTP id t8mr10490504pgq.359.1505111746775; \n\tSun, 10 Sep 2017 23:35:46 -0700 (PDT)","Date":"Mon, 11 Sep 2017 14:35:37 +0800","From":"Yuanhan Liu <yliu@fridaylinux.org>","To":"\"Chandran, Sugesh\" <sugesh.chandran@intel.com>","Message-ID":"<20170911063537.GQ9736@yliu-home>","References":"<1504603381-30071-1-git-send-email-yliu@fridaylinux.org>\n\t<1504603381-30071-3-git-send-email-yliu@fridaylinux.org>\n\t<2EF2F5C0CC56984AA024D0B180335FCB4221DC28@IRSMSX102.ger.corp.intel.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<2EF2F5C0CC56984AA024D0B180335FCB4221DC28@IRSMSX102.ger.corp.intel.com>","User-Agent":"Mutt/1.5.24 (2015-08-30)","X-Spam-Status":"No, score=0.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,\n\tRCVD_IN_DNSWL_NONE autolearn=disabled version=3.3.1","X-Spam-Checker-Version":"SpamAssassin 3.3.1 (2010-03-16) on\n\tsmtp1.linux-foundation.org","Cc":"\"dev@openvswitch.org\" <dev@openvswitch.org>","Subject":"Re: [ovs-dev] [PATCH v2 2/8] dpif-netdev: retrieve flow directly\n\tfrom\tthe flow mark","X-BeenThere":"ovs-dev@openvswitch.org","X-Mailman-Version":"2.1.12","Precedence":"list","List-Id":"<ovs-dev.openvswitch.org>","List-Unsubscribe":"<https://mail.openvswitch.org/mailman/options/ovs-dev>,\n\t<mailto:ovs-dev-request@openvswitch.org?subject=unsubscribe>","List-Archive":"<http://mail.openvswitch.org/pipermail/ovs-dev/>","List-Post":"<mailto:ovs-dev@openvswitch.org>","List-Help":"<mailto:ovs-dev-request@openvswitch.org?subject=help>","List-Subscribe":"<https://mail.openvswitch.org/mailman/listinfo/ovs-dev>,\n\t<mailto:ovs-dev-request@openvswitch.org?subject=subscribe>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"ovs-dev-bounces@openvswitch.org","Errors-To":"ovs-dev-bounces@openvswitch.org"}},{"id":1766137,"web_url":"http://patchwork.ozlabs.org/comment/1766137/","msgid":"<2EF2F5C0CC56984AA024D0B180335FCB4221DF93@IRSMSX102.ger.corp.intel.com>","list_archive_url":null,"date":"2017-09-11T08:56:30","subject":"Re: [ovs-dev] [PATCH v2 2/8] dpif-netdev: retrieve flow directly\n\tfrom\tthe flow mark","submitter":{"id":67440,"url":"http://patchwork.ozlabs.org/api/people/67440/","name":"Chandran, Sugesh","email":"sugesh.chandran@intel.com"},"content":"Regards\n_Sugesh\n\n\n> -----Original Message-----\n> From: Yuanhan Liu [mailto:yliu@fridaylinux.org]\n> Sent: Monday, September 11, 2017 7:36 AM\n> To: Chandran, Sugesh <sugesh.chandran@intel.com>\n> Cc: dev@openvswitch.org\n> Subject: Re: [ovs-dev] [PATCH v2 2/8] dpif-netdev: retrieve flow directly\n> from the flow mark\n> \n> On Sun, Sep 10, 2017 at 04:15:42PM +0000, Chandran, Sugesh wrote:\n> > >      atomic_read_relaxed(&pmd->dp->emc_insert_min, &cur_min);\n> > >\n> > >      DP_PACKET_BATCH_REFILL_FOR_EACH (i, size, packet, packets_) {\n> > >          struct dp_netdev_flow *flow;\n> > > +        uint32_t flow_mark;\n> > >\n> > >          if (OVS_UNLIKELY(dp_packet_size(packet) < ETH_HEADER_LEN)) {\n> > >              dp_packet_delete(packet); @@ -4972,6 +4974,16 @@\n> > > emc_processing(struct dp_netdev_pmd_thread *pmd,\n> > >              continue;\n> > >          }\n> > >\n> > > +        if (dp_packet_has_flow_mark(packet, &flow_mark)) {\n> > > +            flow = dp_netdev_pmd_find_flow_by_mark(pmd, flow_mark);\n> > > +            if (flow) {\n> > [Sugesh] If the NIC/hardware can match on tcp_flags then this parsing can\n> be avoided?\n> > Is that true?\n> \n> Maybe. If so, we could get better performance, as I have showed in v1.\n[Sugesh] Then another probing feature to see if this parsing needs to be done/not.?\n> \n> \t--yliu","headers":{"Return-Path":"<ovs-dev-bounces@openvswitch.org>","X-Original-To":["incoming@patchwork.ozlabs.org","dev@openvswitch.org"],"Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","ovs-dev@mail.linuxfoundation.org"],"Authentication-Results":"ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=openvswitch.org\n\t(client-ip=140.211.169.12; helo=mail.linuxfoundation.org;\n\tenvelope-from=ovs-dev-bounces@openvswitch.org;\n\treceiver=<UNKNOWN>)","Received":["from mail.linuxfoundation.org (mail.linuxfoundation.org\n\t[140.211.169.12])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xrMHL3CT9z9s8J\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 11 Sep 2017 18:56:46 +1000 (AEST)","from mail.linux-foundation.org (localhost [127.0.0.1])\n\tby mail.linuxfoundation.org (Postfix) with ESMTP id 7E2E1B4B;\n\tMon, 11 Sep 2017 08:56:44 +0000 (UTC)","from smtp1.linuxfoundation.org (smtp1.linux-foundation.org\n\t[172.17.192.35])\n\tby mail.linuxfoundation.org (Postfix) with ESMTPS id A6F3DB30\n\tfor <dev@openvswitch.org>; Mon, 11 Sep 2017 08:56:43 +0000 (UTC)","from mga14.intel.com (mga14.intel.com [192.55.52.115])\n\tby smtp1.linuxfoundation.org (Postfix) with ESMTPS id 59BA61CE\n\tfor <dev@openvswitch.org>; Mon, 11 Sep 2017 08:56:43 +0000 (UTC)","from fmsmga004.fm.intel.com ([10.253.24.48])\n\tby fmsmga103.fm.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384;\n\t11 Sep 2017 01:56:42 -0700","from irsmsx103.ger.corp.intel.com ([163.33.3.157])\n\tby fmsmga004.fm.intel.com with ESMTP; 11 Sep 2017 01:56:34 -0700","from irsmsx102.ger.corp.intel.com ([169.254.2.59]) by\n\tIRSMSX103.ger.corp.intel.com ([169.254.3.49]) with mapi id\n\t14.03.0319.002; Mon, 11 Sep 2017 09:56:31 +0100"],"X-Greylist":"domain auto-whitelisted by SQLgrey-1.7.6","X-ExtLoop1":"1","X-IronPort-AV":"E=Sophos;i=\"5.42,376,1500966000\"; d=\"scan'208\";a=\"310237414\"","From":"\"Chandran, Sugesh\" <sugesh.chandran@intel.com>","To":"Yuanhan Liu <yliu@fridaylinux.org>","Thread-Topic":"[ovs-dev] [PATCH v2 2/8] dpif-netdev: retrieve flow directly\n\tfrom\tthe flow mark","Thread-Index":"AQHTJijwsWPLngdUaEmzf1NHPwaMiqKuElPwgAEg8oCAADfY0A==","Date":"Mon, 11 Sep 2017 08:56:30 +0000","Message-ID":"<2EF2F5C0CC56984AA024D0B180335FCB4221DF93@IRSMSX102.ger.corp.intel.com>","References":"<1504603381-30071-1-git-send-email-yliu@fridaylinux.org>\n\t<1504603381-30071-3-git-send-email-yliu@fridaylinux.org>\n\t<2EF2F5C0CC56984AA024D0B180335FCB4221DC28@IRSMSX102.ger.corp.intel.com>\n\t<20170911063537.GQ9736@yliu-home>","In-Reply-To":"<20170911063537.GQ9736@yliu-home>","Accept-Language":"en-US","Content-Language":"en-US","X-MS-Has-Attach":"","X-MS-TNEF-Correlator":"","x-titus-metadata-40":"eyJDYXRlZ29yeUxhYmVscyI6IiIsIk1ldGFkYXRhIjp7Im5zIjoiaHR0cDpcL1wvd3d3LnRpdHVzLmNvbVwvbnNcL0ludGVsMyIsImlkIjoiNTZjYTQwMDQtNzU5ZC00MmRkLWE0MDYtMGViMjBhOTA4MDYwIiwicHJvcHMiOlt7Im4iOiJDVFBDbGFzc2lmaWNhdGlvbiIsInZhbHMiOlt7InZhbHVlIjoiQ1RQX0lDIn1dfV19LCJTdWJqZWN0TGFiZWxzIjpbXSwiVE1DVmVyc2lvbiI6IjE2LjUuOS4zIiwiVHJ1c3RlZExhYmVsSGFzaCI6InhHZEpwUjZzWU1kRXRISmhnN2t6MklsSTc5WlRWdjZadmRGRGNNV01yd0U9In0=","x-ctpclassification":"CTP_IC","dlp-product":"dlpe-windows","dlp-version":"11.0.0.116","dlp-reaction":"no-action","x-originating-ip":"[163.33.239.181]","MIME-Version":"1.0","X-Spam-Status":"No, score=-5.0 required=5.0 tests=RCVD_IN_DNSWL_HI,\n\tRP_MATCHES_RCVD autolearn=disabled version=3.3.1","X-Spam-Checker-Version":"SpamAssassin 3.3.1 (2010-03-16) on\n\tsmtp1.linux-foundation.org","Cc":"\"dev@openvswitch.org\" <dev@openvswitch.org>","Subject":"Re: [ovs-dev] [PATCH v2 2/8] dpif-netdev: retrieve flow directly\n\tfrom\tthe flow mark","X-BeenThere":"ovs-dev@openvswitch.org","X-Mailman-Version":"2.1.12","Precedence":"list","List-Id":"<ovs-dev.openvswitch.org>","List-Unsubscribe":"<https://mail.openvswitch.org/mailman/options/ovs-dev>,\n\t<mailto:ovs-dev-request@openvswitch.org?subject=unsubscribe>","List-Archive":"<http://mail.openvswitch.org/pipermail/ovs-dev/>","List-Post":"<mailto:ovs-dev@openvswitch.org>","List-Help":"<mailto:ovs-dev-request@openvswitch.org?subject=help>","List-Subscribe":"<https://mail.openvswitch.org/mailman/listinfo/ovs-dev>,\n\t<mailto:ovs-dev-request@openvswitch.org?subject=subscribe>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"ovs-dev-bounces@openvswitch.org","Errors-To":"ovs-dev-bounces@openvswitch.org"}},{"id":1766157,"web_url":"http://patchwork.ozlabs.org/comment/1766157/","msgid":"<20170911091458.GX9736@yliu-home>","list_archive_url":null,"date":"2017-09-11T09:14:59","subject":"Re: [ovs-dev] [PATCH v2 2/8] dpif-netdev: retrieve flow directly\n\tfrom\tthe flow mark","submitter":{"id":72215,"url":"http://patchwork.ozlabs.org/api/people/72215/","name":"Yuanhan Liu","email":"yliu@fridaylinux.org"},"content":"On Mon, Sep 11, 2017 at 08:56:30AM +0000, Chandran, Sugesh wrote:\n> \n> \n> Regards\n> _Sugesh\n> \n> \n> > -----Original Message-----\n> > From: Yuanhan Liu [mailto:yliu@fridaylinux.org]\n> > Sent: Monday, September 11, 2017 7:36 AM\n> > To: Chandran, Sugesh <sugesh.chandran@intel.com>\n> > Cc: dev@openvswitch.org\n> > Subject: Re: [ovs-dev] [PATCH v2 2/8] dpif-netdev: retrieve flow directly\n> > from the flow mark\n> > \n> > On Sun, Sep 10, 2017 at 04:15:42PM +0000, Chandran, Sugesh wrote:\n> > > >      atomic_read_relaxed(&pmd->dp->emc_insert_min, &cur_min);\n> > > >\n> > > >      DP_PACKET_BATCH_REFILL_FOR_EACH (i, size, packet, packets_) {\n> > > >          struct dp_netdev_flow *flow;\n> > > > +        uint32_t flow_mark;\n> > > >\n> > > >          if (OVS_UNLIKELY(dp_packet_size(packet) < ETH_HEADER_LEN)) {\n> > > >              dp_packet_delete(packet); @@ -4972,6 +4974,16 @@\n> > > > emc_processing(struct dp_netdev_pmd_thread *pmd,\n> > > >              continue;\n> > > >          }\n> > > >\n> > > > +        if (dp_packet_has_flow_mark(packet, &flow_mark)) {\n> > > > +            flow = dp_netdev_pmd_find_flow_by_mark(pmd, flow_mark);\n> > > > +            if (flow) {\n> > > [Sugesh] If the NIC/hardware can match on tcp_flags then this parsing can\n> > be avoided?\n> > > Is that true?\n> > \n> > Maybe. If so, we could get better performance, as I have showed in v1.\n> [Sugesh] Then another probing feature to see if this parsing needs to be done/not.?\n\nI think so. I'd leave it as it is (only sw implementation) and will check\nthe possibility after this patchset has been merged.\n\n\t--yliu","headers":{"Return-Path":"<ovs-dev-bounces@openvswitch.org>","X-Original-To":["incoming@patchwork.ozlabs.org","dev@openvswitch.org"],"Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","ovs-dev@mail.linuxfoundation.org"],"Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=openvswitch.org\n\t(client-ip=140.211.169.12; helo=mail.linuxfoundation.org;\n\tenvelope-from=ovs-dev-bounces@openvswitch.org;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=fridaylinux-org.20150623.gappssmtp.com\n\theader.i=@fridaylinux-org.20150623.gappssmtp.com\n\theader.b=\"2Gts21ox\"; dkim-atps=neutral"],"Received":["from mail.linuxfoundation.org (mail.linuxfoundation.org\n\t[140.211.169.12])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xrMhc38K6z9s75\n\tfor <incoming@patchwork.ozlabs.org>;\n\tMon, 11 Sep 2017 19:15:12 +1000 (AEST)","from mail.linux-foundation.org (localhost [127.0.0.1])\n\tby mail.linuxfoundation.org (Postfix) with ESMTP id A56BAB59;\n\tMon, 11 Sep 2017 09:15:10 +0000 (UTC)","from smtp1.linuxfoundation.org (smtp1.linux-foundation.org\n\t[172.17.192.35])\n\tby mail.linuxfoundation.org (Postfix) with ESMTPS id 2B8D8B59\n\tfor <dev@openvswitch.org>; Mon, 11 Sep 2017 09:15:09 +0000 (UTC)","from mail-pg0-f49.google.com (mail-pg0-f49.google.com\n\t[74.125.83.49])\n\tby smtp1.linuxfoundation.org (Postfix) with ESMTPS id 1CF431DF\n\tfor <dev@openvswitch.org>; Mon, 11 Sep 2017 09:15:08 +0000 (UTC)","by mail-pg0-f49.google.com with SMTP id d8so14290566pgt.4\n\tfor <dev@openvswitch.org>; Mon, 11 Sep 2017 02:15:08 -0700 (PDT)","from yliu-home ([45.63.61.64]) by smtp.gmail.com with ESMTPSA id\n\to30sm13621152pgc.83.2017.09.11.02.15.04\n\t(version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tMon, 11 Sep 2017 02:15:06 -0700 (PDT)"],"X-Greylist":"whitelisted by SQLgrey-1.7.6","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=fridaylinux-org.20150623.gappssmtp.com; s=20150623;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:in-reply-to:user-agent;\n\tbh=rhfcYCtYDMvolZlwIoReDfRCPil05F8pOW4aJBRa+Bk=;\n\tb=2Gts21ox8RQEQddDSx5V1Tw+dOuN7+3ujGeQ7E37p/zrHID1wQIZd8+rXXn7iKiPWk\n\tKlFIQEsZpUbe6t94VMC+snL7++pOXHDVPKk0MBfLFEfr7jpATx8hsLydW+Ey8dr82NoE\n\tFpUD+Vo2KYv/fSUTXQYCzoi1Ix1vIpWmP0tSWMdRzroseN3ZM/DTPthjNhD8y3JKI5Ns\n\trsNDfThC6Zdr+Tak9CeHXsg/V7TWM3cnZFOBWyjRG+ILjuv8TWJXLF4Bij0J5Pc6YT88\n\tgn0bl7UYAi2bm26gLx0IRlfKXWuWAwSedcnJ9bcNhOPrY77NeIIPilIxoePo3Z7duX/I\n\tBkoA==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:in-reply-to:user-agent;\n\tbh=rhfcYCtYDMvolZlwIoReDfRCPil05F8pOW4aJBRa+Bk=;\n\tb=HYqcu9Iz6gAGPaKn6MhEAV8zSbrOS5ABeOtydlBCog1exnm3Np+Jsw41b6u+N/1Tey\n\t0h8a5o6eI/r6KkoG9i28dUtD4xigm53bHn5oS9cqVg8Y9CNHxeAnxlkcyNO/eAEyM6kw\n\t8uuE31HsNjAtaqqgRV3pcl1A1+IU+/iwNHfoRiv6RPnSql0G6Jhzh9c9+yqsho5qpv0L\n\tsqhSP3PnYB4oFeG+JyiIh6B8NVeVT5nOkKprEUi07itpo2Inh9Yk3WUY8UrDavMVRzbU\n\tDdNdXjaUkmcWtgQkaIZ5T2yCQSf98aWBngVos11FyjE/PiN0uY9vtKMLTgdq9dD0NkfO\n\ty1lw==","X-Gm-Message-State":"AHPjjUgckCFi0w3SD8Zs284sBGYowjJ83pOOOG6pcJqr4m9MMaw4tFoD\n\t1gyj23nCIpWZ/DQI","X-Google-Smtp-Source":"ADKCNb4RQpO1Jw6YGC4VhFrYwDru19792UKyWabXJWzf1es+yjgSorsiCwzuE+NopYmK9Lvo0WNLvA==","X-Received":"by 10.98.157.201 with SMTP id a70mr11164812pfk.122.1505121307729;\n\tMon, 11 Sep 2017 02:15:07 -0700 (PDT)","Date":"Mon, 11 Sep 2017 17:14:59 +0800","From":"Yuanhan Liu <yliu@fridaylinux.org>","To":"\"Chandran, Sugesh\" <sugesh.chandran@intel.com>","Message-ID":"<20170911091458.GX9736@yliu-home>","References":"<1504603381-30071-1-git-send-email-yliu@fridaylinux.org>\n\t<1504603381-30071-3-git-send-email-yliu@fridaylinux.org>\n\t<2EF2F5C0CC56984AA024D0B180335FCB4221DC28@IRSMSX102.ger.corp.intel.com>\n\t<20170911063537.GQ9736@yliu-home>\n\t<2EF2F5C0CC56984AA024D0B180335FCB4221DF93@IRSMSX102.ger.corp.intel.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<2EF2F5C0CC56984AA024D0B180335FCB4221DF93@IRSMSX102.ger.corp.intel.com>","User-Agent":"Mutt/1.5.24 (2015-08-30)","X-Spam-Status":"No, score=0.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,\n\tRCVD_IN_DNSWL_NONE autolearn=disabled version=3.3.1","X-Spam-Checker-Version":"SpamAssassin 3.3.1 (2010-03-16) on\n\tsmtp1.linux-foundation.org","Cc":"\"dev@openvswitch.org\" <dev@openvswitch.org>","Subject":"Re: [ovs-dev] [PATCH v2 2/8] dpif-netdev: retrieve flow directly\n\tfrom\tthe flow mark","X-BeenThere":"ovs-dev@openvswitch.org","X-Mailman-Version":"2.1.12","Precedence":"list","List-Id":"<ovs-dev.openvswitch.org>","List-Unsubscribe":"<https://mail.openvswitch.org/mailman/options/ovs-dev>,\n\t<mailto:ovs-dev-request@openvswitch.org?subject=unsubscribe>","List-Archive":"<http://mail.openvswitch.org/pipermail/ovs-dev/>","List-Post":"<mailto:ovs-dev@openvswitch.org>","List-Help":"<mailto:ovs-dev-request@openvswitch.org?subject=help>","List-Subscribe":"<https://mail.openvswitch.org/mailman/listinfo/ovs-dev>,\n\t<mailto:ovs-dev-request@openvswitch.org?subject=subscribe>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"ovs-dev-bounces@openvswitch.org","Errors-To":"ovs-dev-bounces@openvswitch.org"}},{"id":1767578,"web_url":"http://patchwork.ozlabs.org/comment/1767578/","msgid":"<1AB4045D-0DBB-4B00-A45F-9E8DB174098B@vmware.com>","list_archive_url":null,"date":"2017-09-13T05:20:58","subject":"Re: [ovs-dev] [PATCH v2 2/8] dpif-netdev: retrieve flow directly\n\tfrom the flow mark","submitter":{"id":68212,"url":"http://patchwork.ozlabs.org/api/people/68212/","name":"Darrell Ball","email":"dball@vmware.com"},"content":"On 9/5/17, 2:23 AM, \"Yuanhan Liu\" <yliu@fridaylinux.org> wrote:\n\n    So that we could skip the heavy emc processing, notably, the\n    miniflow_extract function. A simple PHY-PHY forwarding testing\n    shows 53% performance improvement.\n    \n    Note that though the heavy miniflow_extract is skipped\n\n[Darrell] How much of the increased performance is due to skipping \n               miniflow_extract ?\n\n\n\n, we\n    still have to do per packet checking, due to we have to check\n    the tcp_flags.\n    \n    Co-authored-by: Finn Christensen <fc@napatech.com>\n    Signed-off-by: Yuanhan Liu <yliu@fridaylinux.org>\n    Signed-off-by: Finn Christensen <fc@napatech.com>\n    ---\n    \n    v2: update tcp_flags, which also fixes the build warnings\n    ---\n     lib/dp-packet.h   | 13 ++++++++++\n     lib/dpif-netdev.c | 27 ++++++++++++++-----\n     lib/flow.c        | 78 +++++++++++++++++++++++++++++++++++++++++++++++++++++++\n     lib/flow.h        |  1 +\n     4 files changed, 113 insertions(+), 6 deletions(-)\n    \n    diff --git a/lib/dp-packet.h b/lib/dp-packet.h\n    index 046f3ab..a7a062f 100644\n    --- a/lib/dp-packet.h\n    +++ b/lib/dp-packet.h\n    @@ -691,6 +691,19 @@ reset_dp_packet_checksum_ol_flags(struct dp_packet *p)\n     #define reset_dp_packet_checksum_ol_flags(arg)\n     #endif\n     \n    +static inline bool\n    +dp_packet_has_flow_mark(struct dp_packet *p OVS_UNUSED,\n    +                        uint32_t *mark OVS_UNUSED)\n    +{\n    +#ifdef DPDK_NETDEV\n    +    if (p->mbuf.ol_flags & PKT_RX_FDIR_ID) {\n    +        *mark = p->mbuf.hash.fdir.hi;\n    +        return true;\n    +    }\n    +#endif\n    +    return false;\n    +}\n    +\n     enum { NETDEV_MAX_BURST = 32 }; /* Maximum number packets in a batch. */\n     \n     struct dp_packet_batch {\n    diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c\n    index f3b7f25..a95b8d4 100644\n    --- a/lib/dpif-netdev.c\n    +++ b/lib/dpif-netdev.c\n    @@ -4883,10 +4883,10 @@ struct packet_batch_per_flow {\n     static inline void\n     packet_batch_per_flow_update(struct packet_batch_per_flow *batch,\n                                  struct dp_packet *packet,\n    -                             const struct miniflow *mf)\n    +                             uint16_t tcp_flags)\n     {\n         batch->byte_count += dp_packet_size(packet);\n    -    batch->tcp_flags |= miniflow_get_tcp_flags(mf);\n    +    batch->tcp_flags |= tcp_flags;\n         batch->array.packets[batch->array.count++] = packet;\n     }\n     \n    @@ -4921,7 +4921,7 @@ packet_batch_per_flow_execute(struct packet_batch_per_flow *batch,\n     \n     static inline void\n     dp_netdev_queue_batches(struct dp_packet *pkt,\n    -                        struct dp_netdev_flow *flow, const struct miniflow *mf,\n    +                        struct dp_netdev_flow *flow, uint16_t tcp_flags,\n                             struct packet_batch_per_flow *batches,\n                             size_t *n_batches)\n     {\n    @@ -4932,7 +4932,7 @@ dp_netdev_queue_batches(struct dp_packet *pkt,\n             packet_batch_per_flow_init(batch, flow);\n         }\n     \n    -    packet_batch_per_flow_update(batch, pkt, mf);\n    +    packet_batch_per_flow_update(batch, pkt, tcp_flags);\n     }\n     \n     /* Try to process all ('cnt') the 'packets' using only the exact match cache\n    @@ -4960,11 +4960,13 @@ emc_processing(struct dp_netdev_pmd_thread *pmd,\n         const size_t size = dp_packet_batch_size(packets_);\n         uint32_t cur_min;\n         int i;\n    +    uint16_t tcp_flags;\n     \n         atomic_read_relaxed(&pmd->dp->emc_insert_min, &cur_min);\n     \n         DP_PACKET_BATCH_REFILL_FOR_EACH (i, size, packet, packets_) {\n             struct dp_netdev_flow *flow;\n    +        uint32_t flow_mark;\n     \n             if (OVS_UNLIKELY(dp_packet_size(packet) < ETH_HEADER_LEN)) {\n                 dp_packet_delete(packet);\n    @@ -4972,6 +4974,16 @@ emc_processing(struct dp_netdev_pmd_thread *pmd,\n                 continue;\n             }\n     \n    +        if (dp_packet_has_flow_mark(packet, &flow_mark)) {\n    +            flow = dp_netdev_pmd_find_flow_by_mark(pmd, flow_mark);\n    +            if (flow) {\n    +                tcp_flags = parse_tcp_flags(packet);\n    +                dp_netdev_queue_batches(packet, flow, tcp_flags, batches,\n    +                                        n_batches);\n    +                continue;\n    +            }\n    +        }\n    +\n\n[Darrell] As mentioned, you would move dp_netdev_pmd_find_flow_by_mark()  to following code; \n              also, maybe, you can get rid of parse_tcp_flags() as a result.\n\n\n             if (i != size - 1) {\n                 struct dp_packet **packets = packets_->packets;\n                 /* Prefetch next packet data and metadata. */\n    @@ -4989,7 +5001,8 @@ emc_processing(struct dp_netdev_pmd_thread *pmd,\n             /* If EMC is disabled skip emc_lookup */\n             flow = (cur_min == 0) ? NULL: emc_lookup(flow_cache, key);\n             if (OVS_LIKELY(flow)) {\n    -            dp_netdev_queue_batches(packet, flow, &key->mf, batches,\n    +            tcp_flags = miniflow_get_tcp_flags(&key->mf);\n    +            dp_netdev_queue_batches(packet, flow, tcp_flags, batches,\n                                         n_batches);\n             } else {\n                 /* Exact match cache missed. Group missed packets together at\n    @@ -5166,7 +5179,9 @@ fast_path_processing(struct dp_netdev_pmd_thread *pmd,\n             flow = dp_netdev_flow_cast(rules[i]);\n     \n             emc_probabilistic_insert(pmd, &keys[i], flow);\n    -        dp_netdev_queue_batches(packet, flow, &keys[i].mf, batches, n_batches);\n    +        dp_netdev_queue_batches(packet, flow,\n    +                                miniflow_get_tcp_flags(&keys[i].mf),\n    +                                batches, n_batches);\n         }\n     \n         dp_netdev_count_packet(pmd, DP_STAT_MASKED_HIT, cnt - miss_cnt);\n    diff --git a/lib/flow.c b/lib/flow.c\n    index b2b10aa..912c538 100644\n    --- a/lib/flow.c\n    +++ b/lib/flow.c\n    @@ -991,6 +991,84 @@ parse_dl_type(const struct eth_header *data_, size_t size)\n         return parse_ethertype(&data, &size);\n     }\n     \n\n[Darrell] Hopefully we can get rid of the following function which removes the changes to flow.c/.h\n                If not, we would have to splice out common code.\n\n\n    +uint16_t\n    +parse_tcp_flags(struct dp_packet *packet)\n    +{\n    +    const void *data = dp_packet_data(packet);\n    +    size_t size = dp_packet_size(packet);\n    +    ovs_be16 dl_type;\n    +    uint8_t nw_frag = 0, nw_proto = 0;\n    +\n    +    if (packet->packet_type != htonl(PT_ETH)) {\n    +        return 0;\n    +    }\n    +\n    +    data_pull(&data, &size, ETH_ADDR_LEN * 2);\n    +    dl_type = parse_ethertype(&data, &size);\n    +    if (OVS_LIKELY(dl_type == htons(ETH_TYPE_IP))) {\n    +        const struct ip_header *nh = data;\n    +        int ip_len;\n    +\n    +        if (OVS_UNLIKELY(size < IP_HEADER_LEN)) {\n    +            return 0;\n    +        }\n    +        ip_len = IP_IHL(nh->ip_ihl_ver) * 4;\n    +\n    +        if (OVS_UNLIKELY(ip_len < IP_HEADER_LEN)) {\n    +            return 0;\n    +        }\n    +        if (OVS_UNLIKELY(size < ip_len)) {\n    +            return 0;\n    +        }\n    +\n    +        if (OVS_UNLIKELY(IP_IS_FRAGMENT(nh->ip_frag_off))) {\n    +            nw_frag = FLOW_NW_FRAG_ANY;\n    +            if (nh->ip_frag_off & htons(IP_FRAG_OFF_MASK)) {\n    +                nw_frag |= FLOW_NW_FRAG_LATER;\n    +            }\n    +        }\n    +        nw_proto = nh->ip_proto;\n    +        data_pull(&data, &size, ip_len);\n    +    } else if (dl_type == htons(ETH_TYPE_IPV6)) {\n    +        const struct ovs_16aligned_ip6_hdr *nh;\n    +        uint16_t plen;\n    +\n    +        if (OVS_UNLIKELY(size < sizeof *nh)) {\n    +            return 0;\n    +        }\n    +        nh = data_pull(&data, &size, sizeof *nh);\n    +\n    +        plen = ntohs(nh->ip6_plen);\n    +        if (OVS_UNLIKELY(plen > size)) {\n    +            return 0;\n    +        }\n    +        /* Jumbo Payload option not supported yet. */\n    +        if (OVS_UNLIKELY(size - plen > UINT8_MAX)) {\n    +            return 0;\n    +        }\n    +        size = plen;\n    +\n    +        nw_proto = nh->ip6_nxt;\n    +        if (!parse_ipv6_ext_hdrs__(&data, &size, &nw_proto, &nw_frag)) {\n    +            return 0;\n    +        }\n    +    } else {\n    +        return 0;\n    +    }\n    +\n    +    if (OVS_LIKELY(!(nw_frag & FLOW_NW_FRAG_LATER))) {\n    +        if (OVS_LIKELY(nw_proto == IPPROTO_TCP)) {\n    +            if (OVS_LIKELY(size >= TCP_HEADER_LEN)) {\n    +                const struct tcp_header *tcp = data;\n    +\n    +                return TCP_FLAGS_BE32(tcp->tcp_ctl);\n    +            }\n    +        }\n    +    }\n    +\n    +    return 0;\n    +}\n    +\n     /* For every bit of a field that is wildcarded in 'wildcards', sets the\n      * corresponding bit in 'flow' to zero. */\n     void\n    diff --git a/lib/flow.h b/lib/flow.h\n    index 6ae5a67..f113ec4 100644\n    --- a/lib/flow.h\n    +++ b/lib/flow.h\n    @@ -130,6 +130,7 @@ bool parse_ipv6_ext_hdrs(const void **datap, size_t *sizep, uint8_t *nw_proto,\n                              uint8_t *nw_frag);\n     ovs_be16 parse_dl_type(const struct eth_header *data_, size_t size);\n     bool parse_nsh(const void **datap, size_t *sizep, struct flow_nsh *key);\n    +uint16_t parse_tcp_flags(struct dp_packet *packet);\n     \n     static inline uint64_t\n     flow_get_xreg(const struct flow *flow, int idx)\n    -- \n    2.7.4","headers":{"Return-Path":"<ovs-dev-bounces@openvswitch.org>","X-Original-To":["incoming@patchwork.ozlabs.org","dev@openvswitch.org"],"Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","ovs-dev@mail.linuxfoundation.org"],"Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=openvswitch.org\n\t(client-ip=140.211.169.12; helo=mail.linuxfoundation.org;\n\tenvelope-from=ovs-dev-bounces@openvswitch.org;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=onevmw.onmicrosoft.com\n\theader.i=@onevmw.onmicrosoft.com header.b=\"LrVILITU\"; \n\tdkim-atps=neutral","spf=none (sender IP is )\n\tsmtp.mailfrom=dball@vmware.com; "],"Received":["from mail.linuxfoundation.org (mail.linuxfoundation.org\n\t[140.211.169.12])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xsVPY4F2bz9sMN\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 13 Sep 2017 15:21:05 +1000 (AEST)","from mail.linux-foundation.org (localhost [127.0.0.1])\n\tby mail.linuxfoundation.org (Postfix) with ESMTP id B9148ABA;\n\tWed, 13 Sep 2017 05:21:02 +0000 (UTC)","from smtp1.linuxfoundation.org (smtp1.linux-foundation.org\n\t[172.17.192.35])\n\tby mail.linuxfoundation.org (Postfix) with ESMTPS id B8D595A7\n\tfor <dev@openvswitch.org>; Wed, 13 Sep 2017 05:21:01 +0000 (UTC)","from NAM03-CO1-obe.outbound.protection.outlook.com\n\t(mail-co1nam03on0074.outbound.protection.outlook.com [104.47.40.74])\n\tby smtp1.linuxfoundation.org (Postfix) with ESMTPS id C8622D3\n\tfor <dev@openvswitch.org>; Wed, 13 Sep 2017 05:21:00 +0000 (UTC)","from BLUPR05MB611.namprd05.prod.outlook.com (10.141.204.27) by\n\tBLUPR05MB246.namprd05.prod.outlook.com (10.255.191.19) with Microsoft\n\tSMTP Server (version=TLS1_2,\n\tcipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id\n\t15.20.56.4; Wed, 13 Sep 2017 05:20:59 +0000","from BLUPR05MB611.namprd05.prod.outlook.com ([10.141.204.27]) by\n\tBLUPR05MB611.namprd05.prod.outlook.com ([10.141.204.27]) with mapi id\n\t15.20.0056.010; Wed, 13 Sep 2017 05:20:58 +0000"],"X-Greylist":"whitelisted by SQLgrey-1.7.6","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=onevmw.onmicrosoft.com; s=selector1-vmware-com;\n\th=From:Date:Subject:Message-ID:Content-Type:MIME-Version;\n\tbh=xY+G+tpcdhFTjustnju/RS1j13S5fgsX8ShjLrhrwuc=;\n\tb=LrVILITUaljizkcQrqSkKof5Hi6LKakpcfQDKD+GKn6+z/7XERIR7kaTa79TLbJtY2T/5KceqbKnw7QYhQqjpqXmNlk0Zt7s03it4tpgsY2Z9wXqUAb01OnOVEbCUiQgTDgmz7ntSBRKW5vX851Yh5TL7086bDpd9760S0T0FDA=","From":"Darrell Ball <dball@vmware.com>","To":"Yuanhan Liu <yliu@fridaylinux.org>, \"dev@openvswitch.org\"\n\t<dev@openvswitch.org>","Thread-Topic":"[PATCH v2 2/8] dpif-netdev: retrieve flow directly from the\n\tflow mark","Thread-Index":"AQHTJiitAGQHJLicgEuVxJZ1GK7FFqKx3n8A","Date":"Wed, 13 Sep 2017 05:20:58 +0000","Message-ID":"<1AB4045D-0DBB-4B00-A45F-9E8DB174098B@vmware.com>","References":"<1504603381-30071-1-git-send-email-yliu@fridaylinux.org>\n\t<1504603381-30071-3-git-send-email-yliu@fridaylinux.org>","In-Reply-To":"<1504603381-30071-3-git-send-email-yliu@fridaylinux.org>","Accept-Language":"en-US","Content-Language":"en-US","X-MS-Has-Attach":"","X-MS-TNEF-Correlator":"","user-agent":"Microsoft-MacOutlook/f.25.0.170815","x-originating-ip":"[73.162.236.45]","x-ms-publictraffictype":"Email","x-microsoft-exchange-diagnostics":"1; BLUPR05MB246;\n\t20:f8RGaz2MeUUOB+FLyDHMPdMnBlVXSJHqDdQeaWq95MS8AtlrJzWWzeKDftihI5oAFpe0IfGSHnzE9fL/0ERFhknP1G4pTj3g1wcmbZXAWPLxKzDl7RJwrcTC+lebzmv8JoSTiLZzDkKoKyJ+VWJdWK/PChrISKkFfUwkj8NXVc4=","x-ms-exchange-antispam-srfa-diagnostics":"SSOS;","x-ms-office365-filtering-correlation-id":"5aeb5009-81b1-4d5a-b78b-08d4fa6737ba","x-microsoft-antispam":"UriScan:; BCL:0; PCL:0;\n\tRULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);\n\tSRVR:BLUPR05MB246; ","x-ms-traffictypediagnostic":"BLUPR05MB246:","authentication-results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=openvswitch.org\n\t(client-ip=140.211.169.12; helo=mail.linuxfoundation.org;\n\tenvelope-from=ovs-dev-bounces@openvswitch.org;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=onevmw.onmicrosoft.com\n\theader.i=@onevmw.onmicrosoft.com header.b=\"LrVILITU\"; \n\tdkim-atps=neutral","spf=none (sender IP is )\n\tsmtp.mailfrom=dball@vmware.com; "],"x-exchange-antispam-report-test":"UriScan:;","x-microsoft-antispam-prvs":"<BLUPR05MB246CA39795DB2A4C1AE23C6C86E0@BLUPR05MB246.namprd05.prod.outlook.com>","x-exchange-antispam-report-cfa-test":"BCL:0; PCL:0;\n\tRULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(8121501046)(5005006)(100000703101)(100105400095)(93006095)(93001095)(3002001)(10201501046)(6041248)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(20161123562025)(20161123555025)(20161123564025)(20161123560025)(20161123558100)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);\n\tSRVR:BLUPR05MB246; BCL:0; PCL:0;\n\tRULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);\n\tSRVR:BLUPR05MB246; ","x-forefront-prvs":"042957ACD7","x-forefront-antispam-report":"SFV:NSPM;\n\tSFS:(10009020)(6009001)(376002)(366002)(346002)(377454003)(24454002)(189002)(199003)(5660300001)(33656002)(3280700002)(54356999)(86362001)(68736007)(189998001)(2906002)(2900100001)(54906002)(50986999)(305945005)(4326008)(101416001)(99286003)(6512007)(6246003)(76176999)(229853002)(14454004)(316002)(7736002)(3660700001)(478600001)(36756003)(53936002)(8936002)(25786009)(97736004)(6436002)(77096006)(2501003)(6486002)(6506006)(81156014)(2950100002)(66066001)(81166006)(53546010)(8676002)(106356001)(83506001)(82746002)(102836003)(3846002)(105586002)(6116002)(83716003)(4001350100001);\n\tDIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR05MB246;\n\tH:BLUPR05MB611.namprd05.prod.outlook.com; FPR:; SPF:None;\n\tPTR:InfoNoRecords; MX:1; A:1; LANG:en; ","received-spf":"None (protection.outlook.com: vmware.com does not designate\n\tpermitted sender hosts)","spamdiagnosticoutput":"1:99","spamdiagnosticmetadata":"NSPM","Content-ID":"<17244EE4EF0D294FB6C7BBF85FAB992B@namprd05.prod.outlook.com>","MIME-Version":"1.0","X-OriginatorOrg":"vmware.com","X-MS-Exchange-CrossTenant-originalarrivaltime":"13 Sep 2017 05:20:58.7297\n\t(UTC)","X-MS-Exchange-CrossTenant-fromentityheader":"Hosted","X-MS-Exchange-CrossTenant-id":"b39138ca-3cee-4b4a-a4d6-cd83d9dd62f0","X-MS-Exchange-Transport-CrossTenantHeadersStamped":"BLUPR05MB246","X-Spam-Status":"No, score=0.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,\n\tRCVD_IN_DNSWL_NONE autolearn=disabled version=3.3.1","X-Spam-Checker-Version":"SpamAssassin 3.3.1 (2010-03-16) on\n\tsmtp1.linux-foundation.org","Subject":"Re: [ovs-dev] [PATCH v2 2/8] dpif-netdev: retrieve flow directly\n\tfrom the flow mark","X-BeenThere":"ovs-dev@openvswitch.org","X-Mailman-Version":"2.1.12","Precedence":"list","List-Id":"<ovs-dev.openvswitch.org>","List-Unsubscribe":"<https://mail.openvswitch.org/mailman/options/ovs-dev>,\n\t<mailto:ovs-dev-request@openvswitch.org?subject=unsubscribe>","List-Archive":"<http://mail.openvswitch.org/pipermail/ovs-dev/>","List-Post":"<mailto:ovs-dev@openvswitch.org>","List-Help":"<mailto:ovs-dev-request@openvswitch.org?subject=help>","List-Subscribe":"<https://mail.openvswitch.org/mailman/listinfo/ovs-dev>,\n\t<mailto:ovs-dev-request@openvswitch.org?subject=subscribe>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"ovs-dev-bounces@openvswitch.org","Errors-To":"ovs-dev-bounces@openvswitch.org"}},{"id":1767714,"web_url":"http://patchwork.ozlabs.org/comment/1767714/","msgid":"<20170913092940.GB27555@vergenet.net>","list_archive_url":null,"date":"2017-09-13T09:29:40","subject":"Re: [ovs-dev] [PATCH v2 2/8] dpif-netdev: retrieve flow directly\n\tfrom the flow mark","submitter":{"id":64714,"url":"http://patchwork.ozlabs.org/api/people/64714/","name":"Simon Horman","email":"simon.horman@netronome.com"},"content":"On Mon, Sep 11, 2017 at 01:37:10PM +0800, Yuanhan Liu wrote:\n> On Fri, Sep 08, 2017 at 05:38:07PM +0000, Darrell Ball wrote:\n> >     > +static inline bool\n> >     > +dp_packet_has_flow_mark(struct dp_packet *p OVS_UNUSED,\n> >     > +                        uint32_t *mark OVS_UNUSED)\n> >     > +{\n> >     > +#ifdef DPDK_NETDEV\n> >     > +    if (p->mbuf.ol_flags & PKT_RX_FDIR_ID) {\n> >     > +        *mark = p->mbuf.hash.fdir.hi;\n> >     > +        return true;\n> >     > +    }\n> >     > +#endif\n> >     > +    return false;\n> >     > +}\n> >     \n> >     It seems odd that p and mark are marked as OVS_UNUSED\n> >     but used in the case that DPDK_NETDEV is defined.\n> > \n> > [Darrell] OVS_UNUSED means ‘’may be unused”\n> >                 Typically, for a trivial alternative, we would do a slight variation of the above\n> >                 rather than writing two versions of the functions.\n> \n> Right. I also saw quite many examples like this in OVS. That's why I\n> code in this way, though I agree with Simon, it's indeed a bit odd.\n\nThanks. In light of the above I have no objections to\ndp_packet_has_flow_mark() the way it is.\n\n> >     > +    if (OVS_LIKELY(!(nw_frag & FLOW_NW_FRAG_LATER))) {\n> >     > +        if (OVS_LIKELY(nw_proto == IPPROTO_TCP)) {\n> >     > +            if (OVS_LIKELY(size >= TCP_HEADER_LEN)) {\n> >     \n> >     The following might be nicer:\n> >     \n> >     +    if (OVS_LIKELY(!(nw_frag & FLOW_NW_FRAG_LATER))\n> >     +        && OVS_LIKELY(nw_proto == IPPROTO_TCP)\n> >     +        && OVS_LIKELY(size >= TCP_HEADER_LEN)) {\n> \n> Indeed. Thanks!\n> \n> \t--yliu","headers":{"Return-Path":"<ovs-dev-bounces@openvswitch.org>","X-Original-To":["incoming@patchwork.ozlabs.org","dev@openvswitch.org"],"Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","ovs-dev@mail.linuxfoundation.org"],"Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=openvswitch.org\n\t(client-ip=140.211.169.12; helo=mail.linuxfoundation.org;\n\tenvelope-from=ovs-dev-bounces@openvswitch.org;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=netronome-com.20150623.gappssmtp.com\n\theader.i=@netronome-com.20150623.gappssmtp.com\n\theader.b=\"lKPz/e1/\"; dkim-atps=neutral"],"Received":["from mail.linuxfoundation.org (mail.linuxfoundation.org\n\t[140.211.169.12])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xsbwV28Zgz9sNr\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 13 Sep 2017 19:29:46 +1000 (AEST)","from mail.linux-foundation.org (localhost [127.0.0.1])\n\tby mail.linuxfoundation.org (Postfix) with ESMTP id 851D9B8F;\n\tWed, 13 Sep 2017 09:29:44 +0000 (UTC)","from smtp1.linuxfoundation.org (smtp1.linux-foundation.org\n\t[172.17.192.35])\n\tby mail.linuxfoundation.org (Postfix) with ESMTPS id 78619B7C\n\tfor <dev@openvswitch.org>; Wed, 13 Sep 2017 09:29:43 +0000 (UTC)","from mail-wm0-f42.google.com (mail-wm0-f42.google.com\n\t[74.125.82.42])\n\tby smtp1.linuxfoundation.org (Postfix) with ESMTPS id E19A8A7\n\tfor <dev@openvswitch.org>; Wed, 13 Sep 2017 09:29:42 +0000 (UTC)","by mail-wm0-f42.google.com with SMTP id g206so1873524wme.0\n\tfor <dev@openvswitch.org>; Wed, 13 Sep 2017 02:29:42 -0700 (PDT)","from vergenet.net (reginn.horms.nl.\n\t[2001:470:7eb3:403:d63d:7eff:fe99:ac9d])\n\tby smtp.gmail.com with ESMTPSA id\n\tx29sm1894217eda.51.2017.09.13.02.29.41\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tWed, 13 Sep 2017 02:29:41 -0700 (PDT)"],"X-Greylist":"whitelisted by SQLgrey-1.7.6","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=netronome-com.20150623.gappssmtp.com; s=20150623;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:content-transfer-encoding:in-reply-to\n\t:user-agent; bh=dZmUxpIbks2/asWvqHpUplIBCMsNM2HyuFH117hM1N0=;\n\tb=lKPz/e1/IPvyowGosGAx7HqwH4vYAvTXvdQbsrr74Aff4tc30sEogNQt5F5gyLLYPK\n\tBCzxmtPYjinF7XjS7+e7YcO/E6zlSeWv0UK3+bDsY4NNv/79p7ZT7KrjnXGy98N/EN7E\n\tHxB6q6z+MAHZty52ues6KyKJnN7GQNy5irbt3mlnNb1pU+SJn9hI+ojQVmeztp17DYib\n\tDEu/Trz8ABjnggmARCXEM7PBIgAKefTSR+B17uUNKI5MvpJXQ7401OFw7dW3JdUrXdeO\n\tfIR3tQRyKbdxmkW9V6uS/ftsuRtzJdglI6qq/FQPraPhUh8yt8ozmSc8oAKvsz9g7/eW\n\tGw7g==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:content-transfer-encoding\n\t:in-reply-to:user-agent;\n\tbh=dZmUxpIbks2/asWvqHpUplIBCMsNM2HyuFH117hM1N0=;\n\tb=thEAmCEx5B7nEvVCKQVBlGLp/1sJbgCDUAs57ScQYJeumg2bhLS/FsZVmHJLEATgtz\n\tlXY5lFwZVomrHbYJ3V7H5xBCbaiaXV2guI8i/Xu94IahigYqYApa1DmtKiAhxdN5Mffj\n\tAxsh1Aw8YJy1aMGKcRywktT7Imb3WFJHh3BGOBSnL/Ixk+rWQhrinZBMLCE+7yb6tNza\n\tlSIlnl7rZUKZC76iXowtNRMAAOVdOs+lveXdkweHm1q3qji7RGlikD2c06Ze9VAOniWL\n\tusmuddks11YmN61/35X9iPyZIhN8f22k3ry+z+SkmyPaUpN98y24J3fcdVP0W/M9MbBV\n\tF4Ig==","X-Gm-Message-State":"AHPjjUidKhiMSkzMlTHrKvKZMPoh9OP/pY0mX/eNr45IJ21WkldPIJ5t\n\t8YESqG/52iKs4y5D","X-Google-Smtp-Source":"ADKCNb5VTphql6v6pPQwnHd9iA0Bl7c5igyQLUqjTa4I2W8xNIF+C9/xS9OMNlplC15rovtODApJ7w==","X-Received":"by 10.80.179.110 with SMTP id r43mr15413893edd.180.1505294981561;\n\tWed, 13 Sep 2017 02:29:41 -0700 (PDT)","Date":"Wed, 13 Sep 2017 11:29:40 +0200","From":"Simon Horman <simon.horman@netronome.com>","To":"Yuanhan Liu <yliu@fridaylinux.org>","Message-ID":"<20170913092940.GB27555@vergenet.net>","References":"<1504603381-30071-1-git-send-email-yliu@fridaylinux.org>\n\t<1504603381-30071-3-git-send-email-yliu@fridaylinux.org>\n\t<20170908164455.GB7356@vergenet.net>\n\t<0BBAB7DA-78A9-427E-A247-8C09EFD9CFD3@vmware.com>\n\t<20170911053710.GK9736@yliu-home>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<20170911053710.GK9736@yliu-home>","User-Agent":"Mutt/1.5.23 (2014-03-12)","X-Spam-Status":"No, score=0.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,\n\tRCVD_IN_DNSWL_NONE autolearn=disabled version=3.3.1","X-Spam-Checker-Version":"SpamAssassin 3.3.1 (2010-03-16) on\n\tsmtp1.linux-foundation.org","Cc":"\"dev@openvswitch.org\" <dev@openvswitch.org>","Subject":"Re: [ovs-dev] [PATCH v2 2/8] dpif-netdev: retrieve flow directly\n\tfrom the flow mark","X-BeenThere":"ovs-dev@openvswitch.org","X-Mailman-Version":"2.1.12","Precedence":"list","List-Id":"<ovs-dev.openvswitch.org>","List-Unsubscribe":"<https://mail.openvswitch.org/mailman/options/ovs-dev>,\n\t<mailto:ovs-dev-request@openvswitch.org?subject=unsubscribe>","List-Archive":"<http://mail.openvswitch.org/pipermail/ovs-dev/>","List-Post":"<mailto:ovs-dev@openvswitch.org>","List-Help":"<mailto:ovs-dev-request@openvswitch.org?subject=help>","List-Subscribe":"<https://mail.openvswitch.org/mailman/listinfo/ovs-dev>,\n\t<mailto:ovs-dev-request@openvswitch.org?subject=subscribe>","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Sender":"ovs-dev-bounces@openvswitch.org","Errors-To":"ovs-dev-bounces@openvswitch.org"}},{"id":1768311,"web_url":"http://patchwork.ozlabs.org/comment/1768311/","msgid":"<20170914025028.GE2050@yliu-home>","list_archive_url":null,"date":"2017-09-14T02:50:28","subject":"Re: [ovs-dev] [PATCH v2 2/8] dpif-netdev: retrieve flow directly\n\tfrom the flow mark","submitter":{"id":72215,"url":"http://patchwork.ozlabs.org/api/people/72215/","name":"Yuanhan Liu","email":"yliu@fridaylinux.org"},"content":"On Wed, Sep 13, 2017 at 05:20:58AM +0000, Darrell Ball wrote:\n> \n> \n> On 9/5/17, 2:23 AM, \"Yuanhan Liu\" <yliu@fridaylinux.org> wrote:\n> \n>     So that we could skip the heavy emc processing, notably, the\n>     miniflow_extract function. A simple PHY-PHY forwarding testing\n>     shows 53% performance improvement.\n>     \n>     Note that though the heavy miniflow_extract is skipped\n> \n> [Darrell] How much of the increased performance is due to skipping \n>                miniflow_extract ?\n\nFor the PHY-PHY case, following are the performance gains for each case.\n\nwith_miniflow_extract 22%                       \nwith_parse_tcp_falgs  54%\nwithout both:         70%\n\n[...]\n>     +        if (dp_packet_has_flow_mark(packet, &flow_mark)) {\n>     +            flow = dp_netdev_pmd_find_flow_by_mark(pmd, flow_mark);\n>     +            if (flow) {\n>     +                tcp_flags = parse_tcp_flags(packet);\n>     +                dp_netdev_queue_batches(packet, flow, tcp_flags, batches,\n>     +                                        n_batches);\n>     +                continue;\n>     +            }\n>     +        }\n>     +\n> \n> [Darrell] As mentioned, you would move dp_netdev_pmd_find_flow_by_mark()  to following code; \n>               also, maybe, you can get rid of parse_tcp_flags() as a result.\n\nI doubt it, as you see from above data, the performance impact due to\nminiflow_extract is huge.\n\n> \n>              if (i != size - 1) {\n>                  struct dp_packet **packets = packets_->packets;\n>                  /* Prefetch next packet data and metadata. */\n>     @@ -4989,7 +5001,8 @@ emc_processing(struct dp_netdev_pmd_thread *pmd,\n>              /* If EMC is disabled skip emc_lookup */\n>              flow = (cur_min == 0) ? NULL: emc_lookup(flow_cache, key);\n>              if (OVS_LIKELY(flow)) {\n>     -            dp_netdev_queue_batches(packet, flow, &key->mf, batches,\n>     +            tcp_flags = miniflow_get_tcp_flags(&key->mf);\n>     +            dp_netdev_queue_batches(packet, flow, tcp_flags, batches,\n>                                          n_batches);\n>              } else {\n>                  /* Exact match cache missed. Group missed packets together at\n>     @@ -5166,7 +5179,9 @@ fast_path_processing(struct dp_netdev_pmd_thread *pmd,\n>              flow = dp_netdev_flow_cast(rules[i]);\n>      \n>              emc_probabilistic_insert(pmd, &keys[i], flow);\n>     -        dp_netdev_queue_batches(packet, flow, &keys[i].mf, batches, n_batches);\n>     +        dp_netdev_queue_batches(packet, flow,\n>     +                                miniflow_get_tcp_flags(&keys[i].mf),\n>     +                                batches, n_batches);\n>          }\n>      \n>          dp_netdev_count_packet(pmd, DP_STAT_MASKED_HIT, cnt - miss_cnt);\n>     diff --git a/lib/flow.c b/lib/flow.c\n>     index b2b10aa..912c538 100644\n>     --- a/lib/flow.c\n>     +++ b/lib/flow.c\n>     @@ -991,6 +991,84 @@ parse_dl_type(const struct eth_header *data_, size_t size)\n>          return parse_ethertype(&data, &size);\n>      }\n>      \n> \n> [Darrell] Hopefully we can get rid of the following function which removes the changes to flow.c/.h\n>                 If not, we would have to splice out common code.\n\nTo let parse_tcp_flags() and miniflow_extract() share more common code?\n\n\t--yliu","headers":{"Return-Path":"<ovs-dev-bounces@openvswitch.org>","X-Original-To":["incoming@patchwork.ozlabs.org","dev@openvswitch.org"],"Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","ovs-dev@mail.linuxfoundation.org"],"Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=openvswitch.org\n\t(client-ip=140.211.169.12; helo=mail.linuxfoundation.org;\n\tenvelope-from=ovs-dev-bounces@openvswitch.org;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=fridaylinux-org.20150623.gappssmtp.com\n\theader.i=@fridaylinux-org.20150623.gappssmtp.com\n\theader.b=\"ov79QBTs\"; dkim-atps=neutral"],"Received":["from mail.linuxfoundation.org (mail.linuxfoundation.org\n\t[140.211.169.12])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xt31b2jB9z9sDB\n\tfor <incoming@patchwork.ozlabs.org>;\n\tThu, 14 Sep 2017 12:50:43 +1000 (AEST)","from mail.linux-foundation.org (localhost [127.0.0.1])\n\tby mail.linuxfoundation.org (Postfix) with ESMTP id 94476A67;\n\tThu, 14 Sep 2017 02:50:40 +0000 (UTC)","from smtp1.linuxfoundation.org (smtp1.linux-foundation.org\n\t[172.17.192.35])\n\tby mail.linuxfoundation.org (Postfix) with ESMTPS id 6A1B4A47\n\tfor <dev@openvswitch.org>; Thu, 14 Sep 2017 02:50:39 +0000 (UTC)","from mail-pg0-f46.google.com (mail-pg0-f46.google.com\n\t[74.125.83.46])\n\tby smtp1.linuxfoundation.org (Postfix) with ESMTPS id 79B92124\n\tfor <dev@openvswitch.org>; Thu, 14 Sep 2017 02:50:38 +0000 (UTC)","by mail-pg0-f46.google.com with SMTP id j16so3937296pga.1\n\tfor <dev@openvswitch.org>; Wed, 13 Sep 2017 19:50:38 -0700 (PDT)","from yliu-home ([45.63.61.64]) by smtp.gmail.com with ESMTPSA id\n\tv71sm28709375pfa.45.2017.09.13.19.50.34\n\t(version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128);\n\tWed, 13 Sep 2017 19:50:36 -0700 (PDT)"],"X-Greylist":"whitelisted by SQLgrey-1.7.6","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=fridaylinux-org.20150623.gappssmtp.com; s=20150623;\n\th=date:from:to:cc:subject:message-id:references:mime-version\n\t:content-disposition:in-reply-to:user-agent;\n\tbh=qrlVkRFF2AxaG1xsBGJecBj+LhB5Mn145zTC/+eNVsA=;\n\tb=ov79QBTsw2jEcQ0AlAKNdYhV9QYdqpAhKDs3XJdNTzUMmsd/tVd1+MOo97SBzuTcak\n\tU/g9QmC5E8jv+WwvY9ChqdA3IzazM7PU15ws7ANbt9rRcFDHcISG50YbyuPFlqhHkgiG\n\tm5nZlvE19+WlS/km/DRMXjcb2L8XI5YYUpGHBIRRU5x+EEDg0QUvZW4s5vK8IpwwAoB1\n\tg1zimj86zol8jy81Q2C5B8VxsxzP/MyiQp5tgHjl6fYgWdLKDYZJnSQckGlnOLCkNNUR\n\tnNJfkFepXbIrHSEVFGWkc80dUJVFuoyeaYr1Y+gRIvacJ1TwSxlhYPxN5ikU5idEThBZ\n\tz/ew==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:date:from:to:cc:subject:message-id:references\n\t:mime-version:content-disposition:in-reply-to:user-agent;\n\tbh=qrlVkRFF2AxaG1xsBGJecBj+LhB5Mn145zTC/+eNVsA=;\n\tb=bLjOdE2UftQwA/4lSCin3ydD6n5zHfWwpDx5tqd0yfOlvDRgaEvO8BwjtWaDaDcCnT\n\tB4chfFYE2AfwuNwu9sgkABjO3OY3F2/pSDYX8OyqNh4ZRpS691Mawa7Bud4P/coAoaTo\n\tnArdE6yeDh0ZG/EfMAeZM+PnXuf9vuSou2GqKyZHB+AtV8M6+ftk/z49GV8QWZmfTc2S\n\tYjOzmXerwZFp5TgNaatgOBvfU9BxBKR1tp/r4dFFeL+LtyGxQBgufqf+G+pU7Dg4VirQ\n\tNiyYrRsDF6ARHwtBdYdgbE/JxHreALTqCAvouo7YP38Zl+Z3Y96GM7RUF9Y9O02qSrV8\n\tUxWQ==","X-Gm-Message-State":"AHPjjUj4MmWlmqfKntdsa/ccqLCBe8vQXn4hNMITQFWtX1eiZx8kbKOr\n\tPWcSbCU5adDWHzOW","X-Google-Smtp-Source":"ADKCNb5s6L0CYzMQ1cmkc1n4okyAeYqRh9qeK3crfTYewoJi9eBMbaPLIknnfWuRDmJH10PRLyUbrA==","X-Received":"by 10.99.176.14 with SMTP id h14mr20025627pgf.358.1505357437983; \n\tWed, 13 Sep 2017 19:50:37 -0700 (PDT)","Date":"Thu, 14 Sep 2017 10:50:28 +0800","From":"Yuanhan Liu <yliu@fridaylinux.org>","To":"Darrell Ball <dball@vmware.com>","Message-ID":"<20170914025028.GE2050@yliu-home>","References":"<1504603381-30071-1-git-send-email-yliu@fridaylinux.org>\n\t<1504603381-30071-3-git-send-email-yliu@fridaylinux.org>\n\t<1AB4045D-0DBB-4B00-A45F-9E8DB174098B@vmware.com>","MIME-Version":"1.0","Content-Disposition":"inline","In-Reply-To":"<1AB4045D-0DBB-4B00-A45F-9E8DB174098B@vmware.com>","User-Agent":"Mutt/1.5.24 (2015-08-30)","X-Spam-Status":"No, score=0.5 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,\n\tRCVD_IN_DNSWL_NONE,\n\tRCVD_IN_SORBS_SPAM autolearn=disabled version=3.3.1","X-Spam-Checker-Version":"SpamAssassin 3.3.1 (2010-03-16) on\n\tsmtp1.linux-foundation.org","Cc":"\"dev@openvswitch.org\" <dev@openvswitch.org>","Subject":"Re: [ovs-dev] [PATCH v2 2/8] dpif-netdev: retrieve flow directly\n\tfrom the flow mark","X-BeenThere":"ovs-dev@openvswitch.org","X-Mailman-Version":"2.1.12","Precedence":"list","List-Id":"<ovs-dev.openvswitch.org>","List-Unsubscribe":"<https://mail.openvswitch.org/mailman/options/ovs-dev>,\n\t<mailto:ovs-dev-request@openvswitch.org?subject=unsubscribe>","List-Archive":"<http://mail.openvswitch.org/pipermail/ovs-dev/>","List-Post":"<mailto:ovs-dev@openvswitch.org>","List-Help":"<mailto:ovs-dev-request@openvswitch.org?subject=help>","List-Subscribe":"<https://mail.openvswitch.org/mailman/listinfo/ovs-dev>,\n\t<mailto:ovs-dev-request@openvswitch.org?subject=subscribe>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"ovs-dev-bounces@openvswitch.org","Errors-To":"ovs-dev-bounces@openvswitch.org"}},{"id":1768789,"web_url":"http://patchwork.ozlabs.org/comment/1768789/","msgid":"<F800F423-D132-4EDF-A988-0705C466E85C@vmware.com>","list_archive_url":null,"date":"2017-09-14T19:13:18","subject":"Re: [ovs-dev] [PATCH v2 2/8] dpif-netdev: retrieve flow directly\n\tfrom the flow mark","submitter":{"id":68212,"url":"http://patchwork.ozlabs.org/api/people/68212/","name":"Darrell Ball","email":"dball@vmware.com"},"content":"On 9/13/17, 7:50 PM, \"Yuanhan Liu\" <yliu@fridaylinux.org> wrote:\n\n    On Wed, Sep 13, 2017 at 05:20:58AM +0000, Darrell Ball wrote:\n    > \n    > \n    > On 9/5/17, 2:23 AM, \"Yuanhan Liu\" <yliu@fridaylinux.org> wrote:\n    > \n    >     So that we could skip the heavy emc processing, notably, the\n    >     miniflow_extract function. A simple PHY-PHY forwarding testing\n    >     shows 53% performance improvement.\n    >     \n    >     Note that though the heavy miniflow_extract is skipped\n    > \n    > [Darrell] How much of the increased performance is due to skipping \n    >                miniflow_extract ?\n    \n    For the PHY-PHY case, following are the performance gains for each case.\n    \n    with_miniflow_extract 22%                       \n    with_parse_tcp_falgs  54%\n    without both:         70%\n    \n    [...]\n    >     +        if (dp_packet_has_flow_mark(packet, &flow_mark)) {\n    >     +            flow = dp_netdev_pmd_find_flow_by_mark(pmd, flow_mark);\n    >     +            if (flow) {\n    >     +                tcp_flags = parse_tcp_flags(packet);\n    >     +                dp_netdev_queue_batches(packet, flow, tcp_flags, batches,\n    >     +                                        n_batches);\n    >     +                continue;\n    >     +            }\n    >     +        }\n    >     +\n    > \n    > [Darrell] As mentioned, you would move dp_netdev_pmd_find_flow_by_mark()  to following code; \n    >               also, maybe, you can get rid of parse_tcp_flags() as a result.\n    \n    I doubt it, as you see from above data, the performance impact due to\n    miniflow_extract is huge.\n    \n    > \n    >              if (i != size - 1) {\n    >                  struct dp_packet **packets = packets_->packets;\n    >                  /* Prefetch next packet data and metadata. */\n    >     @@ -4989,7 +5001,8 @@ emc_processing(struct dp_netdev_pmd_thread *pmd,\n    >              /* If EMC is disabled skip emc_lookup */\n    >              flow = (cur_min == 0) ? NULL: emc_lookup(flow_cache, key);\n    >              if (OVS_LIKELY(flow)) {\n    >     -            dp_netdev_queue_batches(packet, flow, &key->mf, batches,\n    >     +            tcp_flags = miniflow_get_tcp_flags(&key->mf);\n    >     +            dp_netdev_queue_batches(packet, flow, tcp_flags, batches,\n    >                                          n_batches);\n    >              } else {\n    >                  /* Exact match cache missed. Group missed packets together at\n    >     @@ -5166,7 +5179,9 @@ fast_path_processing(struct dp_netdev_pmd_thread *pmd,\n    >              flow = dp_netdev_flow_cast(rules[i]);\n    >      \n    >              emc_probabilistic_insert(pmd, &keys[i], flow);\n    >     -        dp_netdev_queue_batches(packet, flow, &keys[i].mf, batches, n_batches);\n    >     +        dp_netdev_queue_batches(packet, flow,\n    >     +                                miniflow_get_tcp_flags(&keys[i].mf),\n    >     +                                batches, n_batches);\n    >          }\n    >      \n    >          dp_netdev_count_packet(pmd, DP_STAT_MASKED_HIT, cnt - miss_cnt);\n    >     diff --git a/lib/flow.c b/lib/flow.c\n    >     index b2b10aa..912c538 100644\n    >     --- a/lib/flow.c\n    >     +++ b/lib/flow.c\n    >     @@ -991,6 +991,84 @@ parse_dl_type(const struct eth_header *data_, size_t size)\n    >          return parse_ethertype(&data, &size);\n    >      }\n    >      \n    > \n    > [Darrell] Hopefully we can get rid of the following function which removes the changes to flow.c/.h\n    >                 If not, we would have to splice out common code.\n    \n    To let parse_tcp_flags() and miniflow_extract() share more common code?\n\n[Darrell]\nIt looks to me parse_tcp_flags() is distilled from miniflow_extract(), so, yes, that is what I meant.\n\n    \n    \t--yliu","headers":{"Return-Path":"<ovs-dev-bounces@openvswitch.org>","X-Original-To":["incoming@patchwork.ozlabs.org","dev@openvswitch.org"],"Delivered-To":["patchwork-incoming@bilbo.ozlabs.org","ovs-dev@mail.linuxfoundation.org"],"Authentication-Results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=openvswitch.org\n\t(client-ip=140.211.169.12; helo=mail.linuxfoundation.org;\n\tenvelope-from=ovs-dev-bounces@openvswitch.org;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=onevmw.onmicrosoft.com\n\theader.i=@onevmw.onmicrosoft.com header.b=\"IqhKQGBg\"; \n\tdkim-atps=neutral","spf=none (sender IP is )\n\tsmtp.mailfrom=dball@vmware.com; "],"Received":["from mail.linuxfoundation.org (mail.linuxfoundation.org\n\t[140.211.169.12])\n\t(using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256\n\tbits)) (No client certificate requested)\n\tby ozlabs.org (Postfix) with ESMTPS id 3xtSqZ6s6cz9t2m\n\tfor <incoming@patchwork.ozlabs.org>;\n\tFri, 15 Sep 2017 05:13:29 +1000 (AEST)","from mail.linux-foundation.org (localhost [127.0.0.1])\n\tby mail.linuxfoundation.org (Postfix) with ESMTP id 8D2D1B55;\n\tThu, 14 Sep 2017 19:13:22 +0000 (UTC)","from smtp1.linuxfoundation.org (smtp1.linux-foundation.org\n\t[172.17.192.35])\n\tby mail.linuxfoundation.org (Postfix) with ESMTPS id 6C0589F8\n\tfor <dev@openvswitch.org>; Thu, 14 Sep 2017 19:13:21 +0000 (UTC)","from NAM01-BY2-obe.outbound.protection.outlook.com\n\t(mail-by2nam01on0042.outbound.protection.outlook.com [104.47.34.42])\n\tby smtp1.linuxfoundation.org (Postfix) with ESMTPS id AC71E204\n\tfor <dev@openvswitch.org>; Thu, 14 Sep 2017 19:13:20 +0000 (UTC)","from BLUPR05MB611.namprd05.prod.outlook.com (10.141.204.27) by\n\tBLUPR05MB386.namprd05.prod.outlook.com (10.141.26.20) with Microsoft\n\tSMTP Server (version=TLS1_2,\n\tcipher=TLS_ECDHE_RSA_WITH_AES_256_CBC_SHA384_P256) id\n\t15.20.77.5; Thu, 14 Sep 2017 19:13:18 +0000","from BLUPR05MB611.namprd05.prod.outlook.com ([10.141.204.27]) by\n\tBLUPR05MB611.namprd05.prod.outlook.com ([10.141.204.27]) with mapi id\n\t15.20.0077.005; Thu, 14 Sep 2017 19:13:18 +0000"],"X-Greylist":"whitelisted by SQLgrey-1.7.6","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=onevmw.onmicrosoft.com; s=selector1-vmware-com;\n\th=From:Date:Subject:Message-ID:Content-Type:MIME-Version;\n\tbh=EfBohHLPd+Ewxf//nMmaSs+ZNwf/TWxjjQdmJrz4zf0=;\n\tb=IqhKQGBg1P0ElMWak8S3M89rkr7IY6am0Cjebzqu6bGG+TN8NoN4wRn1L53gYVWD45L/VcjQvNamMk7T5F2aYACoseH73XWK4Vtq8AF9rz3hMDHU6MLclIr7NXRm9t5RtVRRzWP2gyeQKVxxwz9nUehjktw0FzDqOE8aAEdrnKs=","From":"Darrell Ball <dball@vmware.com>","To":"Yuanhan Liu <yliu@fridaylinux.org>","Thread-Topic":"[PATCH v2 2/8] dpif-netdev: retrieve flow directly from the\n\tflow mark","Thread-Index":"AQHTJiitAGQHJLicgEuVxJZ1GK7FFqKx3n8AgAHdoQCAAJ1AgA==","Date":"Thu, 14 Sep 2017 19:13:18 +0000","Message-ID":"<F800F423-D132-4EDF-A988-0705C466E85C@vmware.com>","References":"<1504603381-30071-1-git-send-email-yliu@fridaylinux.org>\n\t<1504603381-30071-3-git-send-email-yliu@fridaylinux.org>\n\t<1AB4045D-0DBB-4B00-A45F-9E8DB174098B@vmware.com>\n\t<20170914025028.GE2050@yliu-home>","In-Reply-To":"<20170914025028.GE2050@yliu-home>","Accept-Language":"en-US","Content-Language":"en-US","X-MS-Has-Attach":"","X-MS-TNEF-Correlator":"","user-agent":"Microsoft-MacOutlook/f.25.0.170815","authentication-results":["ozlabs.org;\n\tspf=pass (mailfrom) smtp.mailfrom=openvswitch.org\n\t(client-ip=140.211.169.12; helo=mail.linuxfoundation.org;\n\tenvelope-from=ovs-dev-bounces@openvswitch.org;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (1024-bit key;\n\tunprotected) header.d=onevmw.onmicrosoft.com\n\theader.i=@onevmw.onmicrosoft.com header.b=\"IqhKQGBg\"; \n\tdkim-atps=neutral","spf=none (sender IP is )\n\tsmtp.mailfrom=dball@vmware.com; "],"x-originating-ip":"[73.162.236.45]","x-ms-publictraffictype":"Email","x-microsoft-exchange-diagnostics":"1; BLUPR05MB386;\n\t20:0/de37WGLmSQge7awcUzAoycFQMzzfMTaTj5b5xvYwKCg3mE6i/EfXXGQ7W1wrd9xSeiP5oJ5spQQOQD6Io4+RfmpPXFViRQVOsercxDLWyDjIyFvLvHn3x/ZIdxiPb8nRwJD320wZ+vOygKimLm8s5+fAMznClBHEufZXeqncc=","x-ms-exchange-antispam-srfa-diagnostics":"SSOS;","x-ms-office365-filtering-correlation-id":"3cbf13b1-6be5-43bc-2448-08d4fba4a8b0","x-microsoft-antispam":"UriScan:; BCL:0; PCL:0;\n\tRULEID:(300000500095)(300135000095)(300000501095)(300135300095)(22001)(300000502095)(300135100095)(2017030254152)(300000503095)(300135400095)(2017052603199)(201703131423075)(201703031133081)(201702281549075)(300000504095)(300135200095)(300000505095)(300135600095)(300000506095)(300135500095);\n\tSRVR:BLUPR05MB386; ","x-ms-traffictypediagnostic":"BLUPR05MB386:","x-exchange-antispam-report-test":"UriScan:;","x-microsoft-antispam-prvs":"<BLUPR05MB3865977396038C58700E441C86F0@BLUPR05MB386.namprd05.prod.outlook.com>","x-exchange-antispam-report-cfa-test":"BCL:0; PCL:0;\n\tRULEID:(100000700101)(100105000095)(100000701101)(100105300095)(100000702101)(100105100095)(6040450)(2401047)(5005006)(8121501046)(93006095)(93001095)(10201501046)(100000703101)(100105400095)(3002001)(6041248)(20161123564025)(20161123560025)(20161123558100)(20161123555025)(20161123562025)(201703131423075)(201702281528075)(201703061421075)(201703061406153)(6072148)(201708071742011)(100000704101)(100105200095)(100000705101)(100105500095);\n\tSRVR:BLUPR05MB386; BCL:0; PCL:0;\n\tRULEID:(100000800101)(100110000095)(100000801101)(100110300095)(100000802101)(100110100095)(100000803101)(100110400095)(100000804101)(100110200095)(100000805101)(100110500095);\n\tSRVR:BLUPR05MB386; ","x-forefront-prvs":"0430FA5CB7","x-forefront-antispam-report":"SFV:NSPM;\n\tSFS:(10009020)(6009001)(376002)(346002)(189002)(377454003)(199003)(24454002)(76176999)(82746002)(5660300001)(50986999)(99286003)(81156014)(81166006)(478600001)(53936002)(54906002)(86362001)(101416001)(6512007)(53546010)(2906002)(3660700001)(3280700002)(7736002)(2900100001)(6436002)(316002)(6506006)(189998001)(4001350100001)(8936002)(97736004)(8676002)(83506001)(3846002)(14454004)(305945005)(102836003)(105586002)(6486002)(77096006)(33656002)(68736007)(229853002)(36756003)(6116002)(54356999)(66066001)(6916009)(2950100002)(6246003)(110136004)(106356001)(4326008)(83716003)(25786009)(93886005);\n\tDIR:OUT; SFP:1101; SCL:1; SRVR:BLUPR05MB386;\n\tH:BLUPR05MB611.namprd05.prod.outlook.com; FPR:; SPF:None;\n\tPTR:InfoNoRecords; MX:1; A:1; LANG:en; ","received-spf":"None (protection.outlook.com: vmware.com does not designate\n\tpermitted sender hosts)","spamdiagnosticoutput":"1:99","spamdiagnosticmetadata":"NSPM","Content-ID":"<715334A439CE4040B2B10EE4B87D739E@namprd05.prod.outlook.com>","MIME-Version":"1.0","X-OriginatorOrg":"vmware.com","X-MS-Exchange-CrossTenant-originalarrivaltime":"14 Sep 2017 19:13:18.6594\n\t(UTC)","X-MS-Exchange-CrossTenant-fromentityheader":"Hosted","X-MS-Exchange-CrossTenant-id":"b39138ca-3cee-4b4a-a4d6-cd83d9dd62f0","X-MS-Exchange-Transport-CrossTenantHeadersStamped":"BLUPR05MB386","X-Spam-Status":"No, score=0.0 required=5.0 tests=DKIM_SIGNED,DKIM_VALID,\n\tRCVD_IN_DNSWL_NONE autolearn=disabled version=3.3.1","X-Spam-Checker-Version":"SpamAssassin 3.3.1 (2010-03-16) on\n\tsmtp1.linux-foundation.org","Cc":"\"dev@openvswitch.org\" <dev@openvswitch.org>","Subject":"Re: [ovs-dev] [PATCH v2 2/8] dpif-netdev: retrieve flow directly\n\tfrom the flow mark","X-BeenThere":"ovs-dev@openvswitch.org","X-Mailman-Version":"2.1.12","Precedence":"list","List-Id":"<ovs-dev.openvswitch.org>","List-Unsubscribe":"<https://mail.openvswitch.org/mailman/options/ovs-dev>,\n\t<mailto:ovs-dev-request@openvswitch.org?subject=unsubscribe>","List-Archive":"<http://mail.openvswitch.org/pipermail/ovs-dev/>","List-Post":"<mailto:ovs-dev@openvswitch.org>","List-Help":"<mailto:ovs-dev-request@openvswitch.org?subject=help>","List-Subscribe":"<https://mail.openvswitch.org/mailman/listinfo/ovs-dev>,\n\t<mailto:ovs-dev-request@openvswitch.org?subject=subscribe>","Content-Type":"text/plain; charset=\"us-ascii\"","Content-Transfer-Encoding":"7bit","Sender":"ovs-dev-bounces@openvswitch.org","Errors-To":"ovs-dev-bounces@openvswitch.org"}}]