<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/openvswitch.git/datapath/actions.c, branch master</title>
<subtitle>github.com: openvswitch/ovs.git
</subtitle>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/openvswitch.git/'/>
<entry>
<title>make: Remove the Linux datapath.</title>
<updated>2022-07-15T11:45:55+00:00</updated>
<author>
<name>Greg Rose</name>
<email>gvrose8192@gmail.com</email>
</author>
<published>2022-07-14T21:23:29+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/openvswitch.git/commit/?id=422e90437854c441a0b274d3bf06ce7d6bbf9de0'/>
<id>422e90437854c441a0b274d3bf06ce7d6bbf9de0</id>
<content type='text'>
Update the necessary make and configure files to remove the Linux
datapath and then remove the datapath.

Move datapath/linux/compat/include/linux/openvswitch.h to
include/linux/openvswitch.h because it is needed to generate header
files used by the userspace switch.

Also remove references to the Linux datapath from auxiliary files
and utilities since it is no longer supported.

Signed-off-by: Greg Rose &lt;gvrose8192@gmail.com&gt;
Reviewed-by: David Marchand &lt;david.marchand@redhat.com&gt;
Signed-off-by: Ilya Maximets &lt;i.maximets@ovn.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Update the necessary make and configure files to remove the Linux
datapath and then remove the datapath.

Move datapath/linux/compat/include/linux/openvswitch.h to
include/linux/openvswitch.h because it is needed to generate header
files used by the userspace switch.

Also remove references to the Linux datapath from auxiliary files
and utilities since it is no longer supported.

Signed-off-by: Greg Rose &lt;gvrose8192@gmail.com&gt;
Reviewed-by: David Marchand &lt;david.marchand@redhat.com&gt;
Signed-off-by: Ilya Maximets &lt;i.maximets@ovn.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>Datapath: Change in openvswitch kernel module to support MPLS label depth of 3 in ingress direction.</title>
<updated>2019-11-22T17:26:47+00:00</updated>
<author>
<name>Martin Varghese</name>
<email>martin.varghese@nokia.com</email>
</author>
<published>2019-11-22T06:07:46+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/openvswitch.git/commit/?id=df711aae1fcefcbbe76835f0b5cb9d03ea5babf7'/>
<id>df711aae1fcefcbbe76835f0b5cb9d03ea5babf7</id>
<content type='text'>
Upstream commit:
    commit fbdcdd78da7c95f1b970d371e1b23cbd3aa990f3
    Author: Martin Varghese &lt;martin.varghese@nokia.com&gt;
    Date:   Mon Nov 4 07:27:44 2019 +0530

    Change in Openvswitch to support MPLS label depth of 3 in ingress
    direction

    The openvswitch was supporting a MPLS label depth of 1 in the
    ingress direction though the userspace OVS supports a max depth
    of 3 labels.This change enables openvswitch module to support a
    max depth of 3 labels in the ingress.

    Signed-off-by: Martin Varghese &lt;martin.varghese@nokia.com&gt;
    Acked-by: Pravin B Shelar &lt;pshelar@ovn.org&gt;
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;

Tested-by: Greg Rose &lt;gvrose8192@gmail.com&gt;
Reviewed-by: Greg Rose &lt;gvrose8192@gmail.com&gt;
Signed-off-by: Martin Varghese &lt;martin.varghese@nokia.com&gt;
Signed-off-by: Ben Pfaff &lt;blp@ovn.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Upstream commit:
    commit fbdcdd78da7c95f1b970d371e1b23cbd3aa990f3
    Author: Martin Varghese &lt;martin.varghese@nokia.com&gt;
    Date:   Mon Nov 4 07:27:44 2019 +0530

    Change in Openvswitch to support MPLS label depth of 3 in ingress
    direction

    The openvswitch was supporting a MPLS label depth of 1 in the
    ingress direction though the userspace OVS supports a max depth
    of 3 labels.This change enables openvswitch module to support a
    max depth of 3 labels in the ingress.

    Signed-off-by: Martin Varghese &lt;martin.varghese@nokia.com&gt;
    Acked-by: Pravin B Shelar &lt;pshelar@ovn.org&gt;
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;

Tested-by: Greg Rose &lt;gvrose8192@gmail.com&gt;
Reviewed-by: Greg Rose &lt;gvrose8192@gmail.com&gt;
Signed-off-by: Martin Varghese &lt;martin.varghese@nokia.com&gt;
Signed-off-by: Ben Pfaff &lt;blp@ovn.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>datapath: fix csum updates for MPLS actions</title>
<updated>2019-07-10T20:04:27+00:00</updated>
<author>
<name>Greg Rose</name>
<email>gvrose8192@gmail.com</email>
</author>
<published>2019-07-09T15:25:03+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/openvswitch.git/commit/?id=183b5bba434d7e1d8f3eef9565ad0ca06d28dfad'/>
<id>183b5bba434d7e1d8f3eef9565ad0ca06d28dfad</id>
<content type='text'>
Upstream commit:
    commit 0e3183cd2a64843a95b62f8bd4a83605a4cf0615
    Author: John Hurley &lt;john.hurley@netronome.com&gt;
    Date:   Thu Jun 27 14:37:30 2019 +0100

    net: openvswitch: fix csum updates for MPLS actions

    Skbs may have their checksum value populated by HW. If this is a checksum
    calculated over the entire packet then the CHECKSUM_COMPLETE field is
    marked. Changes to the data pointer on the skb throughout the network
    stack still try to maintain this complete csum value if it is required
    through functions such as skb_postpush_rcsum.

    The MPLS actions in Open vSwitch modify a CHECKSUM_COMPLETE value when
    changes are made to packet data without a push or a pull. This occurs when
    the ethertype of the MAC header is changed or when MPLS lse fields are
    modified.

    The modification is carried out using the csum_partial function to get the
    csum of a buffer and add it into the larger checksum. The buffer is an
    inversion of the data to be removed followed by the new data. Because the
    csum is calculated over 16 bits and these values align with 16 bits, the
    effect is the removal of the old value from the CHECKSUM_COMPLETE and
    addition of the new value.

    However, the csum fed into the function and the outcome of the
    calculation are also inverted. This would only make sense if it was the
    new value rather than the old that was inverted in the input buffer.

    Fix the issue by removing the bit inverts in the csum_partial calculation.

    The bug was verified and the fix tested by comparing the folded value of
    the updated CHECKSUM_COMPLETE value with the folded value of a full
    software checksum calculation (reset skb-&gt;csum to 0 and run
    skb_checksum_complete(skb)). Prior to the fix the outcomes differed but
    after they produce the same result.

    Fixes: 25cd9ba0abc0 ("openvswitch: Add basic MPLS support to kernel")
    Fixes: bc7cc5999fd3 ("openvswitch: update checksum in {push,pop}_mpls")
    Signed-off-by: John Hurley &lt;john.hurley@netronome.com&gt;
    Reviewed-by: Jakub Kicinski &lt;jakub.kicinski@netronome.com&gt;
    Reviewed-by: Simon Horman &lt;simon.horman@netronome.com&gt;
    Acked-by: Pravin B Shelar &lt;pshelar@ovn.org&gt;
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;

Fixes: ccf4378615e9 ("datapath: Add basic MPLS support to kernel")
Fixes: b51367aad315 ("datapath: update checksum in {push,pop}_mpls")
Cc: John Hurley &lt;john.hurley@netronome.com&gt;
Acked-by: William Tu &lt;u9012063@gmail.com&gt;
Signed-off-by: Greg Rose &lt;gvrose8192@gmail.com&gt;
Signed-off-by: Ben Pfaff &lt;blp@ovn.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Upstream commit:
    commit 0e3183cd2a64843a95b62f8bd4a83605a4cf0615
    Author: John Hurley &lt;john.hurley@netronome.com&gt;
    Date:   Thu Jun 27 14:37:30 2019 +0100

    net: openvswitch: fix csum updates for MPLS actions

    Skbs may have their checksum value populated by HW. If this is a checksum
    calculated over the entire packet then the CHECKSUM_COMPLETE field is
    marked. Changes to the data pointer on the skb throughout the network
    stack still try to maintain this complete csum value if it is required
    through functions such as skb_postpush_rcsum.

    The MPLS actions in Open vSwitch modify a CHECKSUM_COMPLETE value when
    changes are made to packet data without a push or a pull. This occurs when
    the ethertype of the MAC header is changed or when MPLS lse fields are
    modified.

    The modification is carried out using the csum_partial function to get the
    csum of a buffer and add it into the larger checksum. The buffer is an
    inversion of the data to be removed followed by the new data. Because the
    csum is calculated over 16 bits and these values align with 16 bits, the
    effect is the removal of the old value from the CHECKSUM_COMPLETE and
    addition of the new value.

    However, the csum fed into the function and the outcome of the
    calculation are also inverted. This would only make sense if it was the
    new value rather than the old that was inverted in the input buffer.

    Fix the issue by removing the bit inverts in the csum_partial calculation.

    The bug was verified and the fix tested by comparing the folded value of
    the updated CHECKSUM_COMPLETE value with the folded value of a full
    software checksum calculation (reset skb-&gt;csum to 0 and run
    skb_checksum_complete(skb)). Prior to the fix the outcomes differed but
    after they produce the same result.

    Fixes: 25cd9ba0abc0 ("openvswitch: Add basic MPLS support to kernel")
    Fixes: bc7cc5999fd3 ("openvswitch: update checksum in {push,pop}_mpls")
    Signed-off-by: John Hurley &lt;john.hurley@netronome.com&gt;
    Reviewed-by: Jakub Kicinski &lt;jakub.kicinski@netronome.com&gt;
    Reviewed-by: Simon Horman &lt;simon.horman@netronome.com&gt;
    Acked-by: Pravin B Shelar &lt;pshelar@ovn.org&gt;
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;

Fixes: ccf4378615e9 ("datapath: Add basic MPLS support to kernel")
Fixes: b51367aad315 ("datapath: update checksum in {push,pop}_mpls")
Cc: John Hurley &lt;john.hurley@netronome.com&gt;
Acked-by: William Tu &lt;u9012063@gmail.com&gt;
Signed-off-by: Greg Rose &lt;gvrose8192@gmail.com&gt;
Signed-off-by: Ben Pfaff &lt;blp@ovn.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>OVS: remove use of VLAN_TAG_PRESENT</title>
<updated>2019-06-13T17:03:11+00:00</updated>
<author>
<name>Michał Mirosław</name>
<email>mirq-linux@rere.qmqm.pl</email>
</author>
<published>2019-06-12T22:35:26+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/openvswitch.git/commit/?id=9feb5bda27bef6fde7f80d0727261efc361a90a3'/>
<id>9feb5bda27bef6fde7f80d0727261efc361a90a3</id>
<content type='text'>
Upstream commits:
    (1) commit 9df46aefafa6dee81a27c2a9d8ba360abd8c5fe3
    Author: Michał Mirosław &lt;mirq-linux@rere.qmqm.pl&gt;
    Date:   Thu Nov 8 18:44:50 2018 +0100

    OVS: remove use of VLAN_TAG_PRESENT

    This is a minimal change to allow removing of VLAN_TAG_PRESENT.
    It leaves OVS unable to use CFI bit, as fixing this would need
    a deeper surgery involving userspace interface.

    Signed-off-by: Michał Mirosław &lt;mirq-linux@rere.qmqm.pl&gt;
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;

    (2) commit 6083e28aa02d7c9e6b87f8b944e92793094ae047
    Author: Michał Mirosław &lt;mirq-linux@rere.qmqm.pl&gt;
    Date:   Sat Nov 10 19:55:34 2018 +0100

    OVS: remove VLAN_TAG_PRESENT - fixup

    It turns out I missed one VLAN_TAG_PRESENT in OVS code while rebasing.
    This fixes it.

    Fixes: 9df46aefafa6 ("OVS: remove use of VLAN_TAG_PRESENT")
    Signed-off-by: Michał Mirosław &lt;mirq-linux@rere.qmqm.pl&gt;
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;

This patch backports the above upstream patch to OVS and adds
extra checking in kernel module's compat code.

Cc: Michał Mirosław &lt;mirq-linux@rere.qmqm.pl&gt;
Acked-by: Yi-Hung Wei &lt;yihung.wei@gmail.com&gt;
Signed-off-by: Yifeng Sun &lt;pkusunyifeng@gmail.com&gt;
Signed-off-by: Ben Pfaff &lt;blp@ovn.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Upstream commits:
    (1) commit 9df46aefafa6dee81a27c2a9d8ba360abd8c5fe3
    Author: Michał Mirosław &lt;mirq-linux@rere.qmqm.pl&gt;
    Date:   Thu Nov 8 18:44:50 2018 +0100

    OVS: remove use of VLAN_TAG_PRESENT

    This is a minimal change to allow removing of VLAN_TAG_PRESENT.
    It leaves OVS unable to use CFI bit, as fixing this would need
    a deeper surgery involving userspace interface.

    Signed-off-by: Michał Mirosław &lt;mirq-linux@rere.qmqm.pl&gt;
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;

    (2) commit 6083e28aa02d7c9e6b87f8b944e92793094ae047
    Author: Michał Mirosław &lt;mirq-linux@rere.qmqm.pl&gt;
    Date:   Sat Nov 10 19:55:34 2018 +0100

    OVS: remove VLAN_TAG_PRESENT - fixup

    It turns out I missed one VLAN_TAG_PRESENT in OVS code while rebasing.
    This fixes it.

    Fixes: 9df46aefafa6 ("OVS: remove use of VLAN_TAG_PRESENT")
    Signed-off-by: Michał Mirosław &lt;mirq-linux@rere.qmqm.pl&gt;
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;

This patch backports the above upstream patch to OVS and adds
extra checking in kernel module's compat code.

Cc: Michał Mirosław &lt;mirq-linux@rere.qmqm.pl&gt;
Acked-by: Yi-Hung Wei &lt;yihung.wei@gmail.com&gt;
Signed-off-by: Yifeng Sun &lt;pkusunyifeng@gmail.com&gt;
Signed-off-by: Ben Pfaff &lt;blp@ovn.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>datapath: Add a new action check_pkt_len</title>
<updated>2019-04-22T19:56:51+00:00</updated>
<author>
<name>Numan Siddique</name>
<email>nusiddiq@redhat.com</email>
</author>
<published>2019-04-22T19:23:43+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/openvswitch.git/commit/?id=faa3beb485513e178006b372a6f6ff4bc318eaa4'/>
<id>faa3beb485513e178006b372a6f6ff4bc318eaa4</id>
<content type='text'>
Upstream commit:
    commit 4d5ec89fc8d14dcdab7214a0c13a1c7321dc6ea9
    Author: Numan Siddique &lt;nusiddiq@redhat.com&gt;
    Date:   Tue Mar 26 06:13:46 2019 +0530

    net: openvswitch: Add a new action check_pkt_len

    This patch adds a new action - 'check_pkt_len' which checks the
    packet length and executes a set of actions if the packet
    length is greater than the specified length or executes
    another set of actions if the packet length is lesser or equal to.

    This action takes below nlattrs
      * OVS_CHECK_PKT_LEN_ATTR_PKT_LEN - 'pkt_len' to check for

      * OVS_CHECK_PKT_LEN_ATTR_ACTIONS_IF_GREATER - Nested actions
        to apply if the packet length is greater than the specified 'pkt_len'

      * OVS_CHECK_PKT_LEN_ATTR_ACTIONS_IF_LESS_EQUAL - Nested
        actions to apply if the packet length is lesser or equal to the
        specified 'pkt_len'.

    The main use case for adding this action is to solve the packet
    drops because of MTU mismatch in OVN virtual networking solution.
    When a VM (which belongs to a logical switch of OVN) sends a packet
    destined to go via the gateway router and if the nic which provides
    external connectivity, has a lesser MTU, OVS drops the packet
    if the packet length is greater than this MTU.

    With the help of this action, OVN will check the packet length
    and if it is greater than the MTU size, it will generate an
    ICMP packet (type 3, code 4) and includes the next hop mtu in it
    so that the sender can fragment the packets.

    Reported-at:
    https://mail.openvswitch.org/pipermail/ovs-discuss/2018-July/047039.html
    Suggested-by: Ben Pfaff &lt;blp@ovn.org&gt;
    Signed-off-by: Numan Siddique &lt;nusiddiq@redhat.com&gt;
    CC: Gregory Rose &lt;gvrose8192@gmail.com&gt;
    CC: Pravin B Shelar &lt;pshelar@ovn.org&gt;
    Acked-by: Pravin B Shelar &lt;pshelar@ovn.org&gt;
    Tested-by: Greg Rose &lt;gvrose8192@gmail.com&gt;
    Reviewed-by: Greg Rose &lt;gvrose8192@gmail.com&gt;
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;

Use of 'nla_parse_strict()' (in validate_and_copy_check_len()) is available
only in recent kernels. So changed it to 'nla_parse_nested()'.

Signed-off-by: Numan Siddique &lt;nusiddiq@redhat.com&gt;
Tested-by: Greg Rose &lt;gvrose8192@gmail.com&gt;
Reviewed-by: Greg Rose &lt;gvrose8192@gmail.com&gt;
Signed-off-by: Ben Pfaff &lt;blp@ovn.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Upstream commit:
    commit 4d5ec89fc8d14dcdab7214a0c13a1c7321dc6ea9
    Author: Numan Siddique &lt;nusiddiq@redhat.com&gt;
    Date:   Tue Mar 26 06:13:46 2019 +0530

    net: openvswitch: Add a new action check_pkt_len

    This patch adds a new action - 'check_pkt_len' which checks the
    packet length and executes a set of actions if the packet
    length is greater than the specified length or executes
    another set of actions if the packet length is lesser or equal to.

    This action takes below nlattrs
      * OVS_CHECK_PKT_LEN_ATTR_PKT_LEN - 'pkt_len' to check for

      * OVS_CHECK_PKT_LEN_ATTR_ACTIONS_IF_GREATER - Nested actions
        to apply if the packet length is greater than the specified 'pkt_len'

      * OVS_CHECK_PKT_LEN_ATTR_ACTIONS_IF_LESS_EQUAL - Nested
        actions to apply if the packet length is lesser or equal to the
        specified 'pkt_len'.

    The main use case for adding this action is to solve the packet
    drops because of MTU mismatch in OVN virtual networking solution.
    When a VM (which belongs to a logical switch of OVN) sends a packet
    destined to go via the gateway router and if the nic which provides
    external connectivity, has a lesser MTU, OVS drops the packet
    if the packet length is greater than this MTU.

    With the help of this action, OVN will check the packet length
    and if it is greater than the MTU size, it will generate an
    ICMP packet (type 3, code 4) and includes the next hop mtu in it
    so that the sender can fragment the packets.

    Reported-at:
    https://mail.openvswitch.org/pipermail/ovs-discuss/2018-July/047039.html
    Suggested-by: Ben Pfaff &lt;blp@ovn.org&gt;
    Signed-off-by: Numan Siddique &lt;nusiddiq@redhat.com&gt;
    CC: Gregory Rose &lt;gvrose8192@gmail.com&gt;
    CC: Pravin B Shelar &lt;pshelar@ovn.org&gt;
    Acked-by: Pravin B Shelar &lt;pshelar@ovn.org&gt;
    Tested-by: Greg Rose &lt;gvrose8192@gmail.com&gt;
    Reviewed-by: Greg Rose &lt;gvrose8192@gmail.com&gt;
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;

Use of 'nla_parse_strict()' (in validate_and_copy_check_len()) is available
only in recent kernels. So changed it to 'nla_parse_nested()'.

Signed-off-by: Numan Siddique &lt;nusiddiq@redhat.com&gt;
Tested-by: Greg Rose &lt;gvrose8192@gmail.com&gt;
Reviewed-by: Greg Rose &lt;gvrose8192@gmail.com&gt;
Signed-off-by: Ben Pfaff &lt;blp@ovn.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>openvswitch: kernel datapath clone action</title>
<updated>2018-12-18T00:12:14+00:00</updated>
<author>
<name>Yifeng Sun</name>
<email>pkusunyifeng@gmail.com</email>
</author>
<published>2018-12-14T22:32:23+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/openvswitch.git/commit/?id=5a77cf961e346cb949a231e282d70ebac00358c8'/>
<id>5a77cf961e346cb949a231e282d70ebac00358c8</id>
<content type='text'>
Upstream commit:
    commit b233504033dbd65740e59681820ccfd0a2a8ec53
    Author: Yifeng Sun &lt;pkusunyifeng@gmail.com&gt;
    Date:   Mon Jul 2 08:18:03 2018 -0700

    openvswitch: kernel datapath clone action

    Add 'clone' action to kernel datapath by using existing functions.
    When actions within clone don't modify the current flow, the flow
    key is not cloned before executing clone actions.

    This is a follow up patch for this incomplete work:
    https://patchwork.ozlabs.org/patch/722096/

    v1 -&gt; v2:
    Refactor as advised by reviewer.

    Signed-off-by: Yifeng Sun &lt;pkusunyifeng@gmail.com&gt;
    Signed-off-by: Andy Zhou &lt;azhou@ovn.org&gt;
    Acked-by: Pravin B Shelar &lt;pshelar@ovn.org&gt;
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;

Tested-by: Greg Rose &lt;gvrose8192@gmail.com&gt;
Reviewed-by: Greg Rose &lt;gvrose8192@gmail.com&gt;
Co-authored-by: Andy Zhou &lt;azhou@ovn.org&gt;
Signed-off-by: Yifeng Sun &lt;pkusunyifeng@gmail.com&gt;
Signed-off-by: Andy Zhou &lt;azhou@ovn.org&gt;
Signed-off-by: Ben Pfaff &lt;blp@ovn.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Upstream commit:
    commit b233504033dbd65740e59681820ccfd0a2a8ec53
    Author: Yifeng Sun &lt;pkusunyifeng@gmail.com&gt;
    Date:   Mon Jul 2 08:18:03 2018 -0700

    openvswitch: kernel datapath clone action

    Add 'clone' action to kernel datapath by using existing functions.
    When actions within clone don't modify the current flow, the flow
    key is not cloned before executing clone actions.

    This is a follow up patch for this incomplete work:
    https://patchwork.ozlabs.org/patch/722096/

    v1 -&gt; v2:
    Refactor as advised by reviewer.

    Signed-off-by: Yifeng Sun &lt;pkusunyifeng@gmail.com&gt;
    Signed-off-by: Andy Zhou &lt;azhou@ovn.org&gt;
    Acked-by: Pravin B Shelar &lt;pshelar@ovn.org&gt;
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;

Tested-by: Greg Rose &lt;gvrose8192@gmail.com&gt;
Reviewed-by: Greg Rose &lt;gvrose8192@gmail.com&gt;
Co-authored-by: Andy Zhou &lt;azhou@ovn.org&gt;
Signed-off-by: Yifeng Sun &lt;pkusunyifeng@gmail.com&gt;
Signed-off-by: Andy Zhou &lt;azhou@ovn.org&gt;
Signed-off-by: Ben Pfaff &lt;blp@ovn.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>datapath: Add meter action support.</title>
<updated>2018-06-20T17:16:51+00:00</updated>
<author>
<name>Andy Zhou</name>
<email>azhou@ovn.org</email>
</author>
<published>2018-06-18T16:53:18+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/openvswitch.git/commit/?id=e02b6f8106929de0c2cc673052c9ea9aa5c221b9'/>
<id>e02b6f8106929de0c2cc673052c9ea9aa5c221b9</id>
<content type='text'>
Upstream commit:
    commit cd8a6c33693c1b89d2737ffdbf9611564e9ac907
    Author: Andy Zhou &lt;azhou@ovn.org&gt;
    Date:   Fri Nov 10 12:09:43 2017 -0800

    openvswitch: Add meter action support

    Implements OVS kernel meter action support.

    Signed-off-by: Andy Zhou &lt;azhou@ovn.org&gt;
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;

Signed-off-by: Justin Pettit &lt;jpettit@ovn.org&gt;
Reviewed-by: Greg Rose &lt;gvrose8192@gmail.com&gt;
Tested-by: Greg Rose &lt;gvrose8192@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Upstream commit:
    commit cd8a6c33693c1b89d2737ffdbf9611564e9ac907
    Author: Andy Zhou &lt;azhou@ovn.org&gt;
    Date:   Fri Nov 10 12:09:43 2017 -0800

    openvswitch: Add meter action support

    Implements OVS kernel meter action support.

    Signed-off-by: Andy Zhou &lt;azhou@ovn.org&gt;
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;

Signed-off-by: Justin Pettit &lt;jpettit@ovn.org&gt;
Reviewed-by: Greg Rose &lt;gvrose8192@gmail.com&gt;
Tested-by: Greg Rose &lt;gvrose8192@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>datapath: enable NSH support</title>
<updated>2018-02-07T18:45:58+00:00</updated>
<author>
<name>Yi Yang</name>
<email>yi.y.yang@intel.com</email>
</author>
<published>2018-01-31T13:53:06+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/openvswitch.git/commit/?id=96b82f6d5f1166895fa2ec0b3ba0215e94691855'/>
<id>96b82f6d5f1166895fa2ec0b3ba0215e94691855</id>
<content type='text'>
Upstream commit:
  commit b2d0f5d5dc53532e6f07bc546a476a55ebdfe0f3
  Author: Yi Yang &lt;yi.y.yang@intel.com&gt;
  Date:   Tue Nov 7 21:07:02 2017 +0800

    openvswitch: enable NSH support

    OVS master and 2.8 branch has merged NSH userspace
    patch series, this patch is to enable NSH support
    in kernel data path in order that OVS can support
    NSH in compat mode by porting this.

    Signed-off-by: Yi Yang &lt;yi.y.yang@intel.com&gt;
    Acked-by: Jiri Benc &lt;jbenc@redhat.com&gt;
    Acked-by: Eric Garver &lt;e@erig.me&gt;
    Acked-by: Pravin Shelar &lt;pshelar@ovn.org&gt;
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;

Signed-off-by: Yi Yang &lt;yi.y.yang@intel.com&gt;
Signed-off-by: Ben Pfaff &lt;blp@ovn.org&gt;
Reviewed-by: Greg Rose &lt;gvrose8192@gmail.com&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Upstream commit:
  commit b2d0f5d5dc53532e6f07bc546a476a55ebdfe0f3
  Author: Yi Yang &lt;yi.y.yang@intel.com&gt;
  Date:   Tue Nov 7 21:07:02 2017 +0800

    openvswitch: enable NSH support

    OVS master and 2.8 branch has merged NSH userspace
    patch series, this patch is to enable NSH support
    in kernel data path in order that OVS can support
    NSH in compat mode by porting this.

    Signed-off-by: Yi Yang &lt;yi.y.yang@intel.com&gt;
    Acked-by: Jiri Benc &lt;jbenc@redhat.com&gt;
    Acked-by: Eric Garver &lt;e@erig.me&gt;
    Acked-by: Pravin Shelar &lt;pshelar@ovn.org&gt;
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;

Signed-off-by: Yi Yang &lt;yi.y.yang@intel.com&gt;
Signed-off-by: Ben Pfaff &lt;blp@ovn.org&gt;
Reviewed-by: Greg Rose &lt;gvrose8192@gmail.com&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>datapath: add ct_clear action</title>
<updated>2018-01-23T03:24:22+00:00</updated>
<author>
<name>Eric Garver</name>
<email>e@erig.me</email>
</author>
<published>2018-01-22T19:10:05+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/openvswitch.git/commit/?id=0cdfddddb66438a8b60635eb1875f32e7afc6735'/>
<id>0cdfddddb66438a8b60635eb1875f32e7afc6735</id>
<content type='text'>
Upstream commit:
    commit b8226962b1c49c784aeddb9d2fafbf53dfdc2190
    Author: Eric Garver &lt;e@erig.me&gt;
    Date:   Tue Oct 10 16:54:44 2017 -0400

    openvswitch: add ct_clear action

    This adds a ct_clear action for clearing conntrack state. ct_clear is
    currently implemented in OVS userspace, but is not backed by an action
    in the kernel datapath. This is useful for flows that may modify a
    packet tuple after a ct lookup has already occurred.

    Signed-off-by: Eric Garver &lt;e@erig.me&gt;
    Acked-by: Pravin B Shelar &lt;pshelar@ovn.org&gt;
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;

Notes:
   - hunk from include/uapi/linux/openvswitch.h is missing because it
     was added with userspace support in 1fe178d251c8 ("dpif: Add support
     for OVS_ACTION_ATTR_CT_CLEAR")
   - if IP_CT_UNTRACKED is not available use 0 as other nf_ct_set()
     calls do. Since we're setting ct to NULL this is okay.

Signed-off-by: Eric Garver &lt;e@erig.me&gt;
Acked-by: Pravin B Shelar &lt;pshelar@ovn.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Upstream commit:
    commit b8226962b1c49c784aeddb9d2fafbf53dfdc2190
    Author: Eric Garver &lt;e@erig.me&gt;
    Date:   Tue Oct 10 16:54:44 2017 -0400

    openvswitch: add ct_clear action

    This adds a ct_clear action for clearing conntrack state. ct_clear is
    currently implemented in OVS userspace, but is not backed by an action
    in the kernel datapath. This is useful for flows that may modify a
    packet tuple after a ct lookup has already occurred.

    Signed-off-by: Eric Garver &lt;e@erig.me&gt;
    Acked-by: Pravin B Shelar &lt;pshelar@ovn.org&gt;
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;

Notes:
   - hunk from include/uapi/linux/openvswitch.h is missing because it
     was added with userspace support in 1fe178d251c8 ("dpif: Add support
     for OVS_ACTION_ATTR_CT_CLEAR")
   - if IP_CT_UNTRACKED is not available use 0 as other nf_ct_set()
     calls do. Since we're setting ct to NULL this is okay.

Signed-off-by: Eric Garver &lt;e@erig.me&gt;
Acked-by: Pravin B Shelar &lt;pshelar@ovn.org&gt;
</pre>
</div>
</content>
</entry>
<entry>
<title>datapath: fix skb_panic due to the incorrect actions attrlen</title>
<updated>2017-09-22T19:32:54+00:00</updated>
<author>
<name>Greg Rose</name>
<email>gvrose8192@gmail.com</email>
</author>
<published>2017-09-11T21:10:59+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/openvswitch.git/commit/?id=6b330a6060586cb4dce5c17c99568d8aaa71740f'/>
<id>6b330a6060586cb4dce5c17c99568d8aaa71740f</id>
<content type='text'>
Upstream commit:
    commit 494bea39f3201776cdfddc232705f54a0bd210c4
    Author: Liping Zhang &lt;zlpnobody@gmail.com&gt;
    Date:   Wed Aug 16 13:30:07 2017 +0800

    openvswitch: fix skb_panic due to the incorrect actions attrlen

    For sw_flow_actions, the actions_len only represents the kernel part's
    size, and when we dump the actions to the userspace, we will do the
    convertions, so it's true size may become bigger than the actions_len.

    But unfortunately, for OVS_PACKET_ATTR_ACTIONS, we use the actions_len
    to alloc the skbuff, so the user_skb's size may become insufficient and
    oops will happen like this:
      skbuff: skb_over_panic: text:ffffffff8148fabf len:1749 put:157 head:
      ffff881300f39000 data:ffff881300f39000 tail:0x6d5 end:0x6c0 dev:&lt;NULL&gt;
      ------------[ cut here ]------------
      kernel BUG at net/core/skbuff.c:129!
      [...]
      Call Trace:
       &lt;IRQ&gt;
       [&lt;ffffffff8148be82&gt;] skb_put+0x43/0x44
       [&lt;ffffffff8148fabf&gt;] skb_zerocopy+0x6c/0x1f4
       [&lt;ffffffffa0290d36&gt;] queue_userspace_packet+0x3a3/0x448 [openvswitch]
       [&lt;ffffffffa0292023&gt;] ovs_dp_upcall+0x30/0x5c [openvswitch]
       [&lt;ffffffffa028d435&gt;] output_userspace+0x132/0x158 [openvswitch]
       [&lt;ffffffffa01e6890&gt;] ? ip6_rcv_finish+0x74/0x77 [ipv6]
       [&lt;ffffffffa028e277&gt;] do_execute_actions+0xcc1/0xdc8 [openvswitch]
       [&lt;ffffffffa028e3f2&gt;] ovs_execute_actions+0x74/0x106 [openvswitch]
       [&lt;ffffffffa0292130&gt;] ovs_dp_process_packet+0xe1/0xfd [openvswitch]
       [&lt;ffffffffa0292b77&gt;] ? key_extract+0x63c/0x8d5 [openvswitch]
       [&lt;ffffffffa029848b&gt;] ovs_vport_receive+0xa1/0xc3 [openvswitch]
      [...]

    Also we can find that the actions_len is much little than the orig_len:
      crash&gt; struct sw_flow_actions 0xffff8812f539d000
      struct sw_flow_actions {
        rcu = {
          next = 0xffff8812f5398800,
          func = 0xffffe3b00035db32
        },
        orig_len = 1384,
        actions_len = 592,
        actions = 0xffff8812f539d01c
      }

    So as a quick fix, use the orig_len instead of the actions_len to alloc
    the user_skb.

    Last, this oops happened on our system running a relative old kernel, but
    the same risk still exists on the mainline, since we use the wrong
    actions_len from the beginning.

    Fixes: ccea74457bbd ("openvswitch: include datapath actions with sampled-pac
    Cc: Neil McKee &lt;neil.mckee@inmon.com&gt;
    Signed-off-by: Liping Zhang &lt;zlpnobody@gmail.com&gt;
    Acked-by: Pravin B Shelar &lt;pshelar@ovn.org&gt;
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;

Fixes: 0e469d3b380c ("datapath: Include datapath actions with sampled-packet upcall to userspace.")
Signed-off-by: Greg Rose &lt;gvrose8192@gmail.com&gt;
Signed-off-by: Andy Zhou &lt;azhou@ovn.org&gt;
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Upstream commit:
    commit 494bea39f3201776cdfddc232705f54a0bd210c4
    Author: Liping Zhang &lt;zlpnobody@gmail.com&gt;
    Date:   Wed Aug 16 13:30:07 2017 +0800

    openvswitch: fix skb_panic due to the incorrect actions attrlen

    For sw_flow_actions, the actions_len only represents the kernel part's
    size, and when we dump the actions to the userspace, we will do the
    convertions, so it's true size may become bigger than the actions_len.

    But unfortunately, for OVS_PACKET_ATTR_ACTIONS, we use the actions_len
    to alloc the skbuff, so the user_skb's size may become insufficient and
    oops will happen like this:
      skbuff: skb_over_panic: text:ffffffff8148fabf len:1749 put:157 head:
      ffff881300f39000 data:ffff881300f39000 tail:0x6d5 end:0x6c0 dev:&lt;NULL&gt;
      ------------[ cut here ]------------
      kernel BUG at net/core/skbuff.c:129!
      [...]
      Call Trace:
       &lt;IRQ&gt;
       [&lt;ffffffff8148be82&gt;] skb_put+0x43/0x44
       [&lt;ffffffff8148fabf&gt;] skb_zerocopy+0x6c/0x1f4
       [&lt;ffffffffa0290d36&gt;] queue_userspace_packet+0x3a3/0x448 [openvswitch]
       [&lt;ffffffffa0292023&gt;] ovs_dp_upcall+0x30/0x5c [openvswitch]
       [&lt;ffffffffa028d435&gt;] output_userspace+0x132/0x158 [openvswitch]
       [&lt;ffffffffa01e6890&gt;] ? ip6_rcv_finish+0x74/0x77 [ipv6]
       [&lt;ffffffffa028e277&gt;] do_execute_actions+0xcc1/0xdc8 [openvswitch]
       [&lt;ffffffffa028e3f2&gt;] ovs_execute_actions+0x74/0x106 [openvswitch]
       [&lt;ffffffffa0292130&gt;] ovs_dp_process_packet+0xe1/0xfd [openvswitch]
       [&lt;ffffffffa0292b77&gt;] ? key_extract+0x63c/0x8d5 [openvswitch]
       [&lt;ffffffffa029848b&gt;] ovs_vport_receive+0xa1/0xc3 [openvswitch]
      [...]

    Also we can find that the actions_len is much little than the orig_len:
      crash&gt; struct sw_flow_actions 0xffff8812f539d000
      struct sw_flow_actions {
        rcu = {
          next = 0xffff8812f5398800,
          func = 0xffffe3b00035db32
        },
        orig_len = 1384,
        actions_len = 592,
        actions = 0xffff8812f539d01c
      }

    So as a quick fix, use the orig_len instead of the actions_len to alloc
    the user_skb.

    Last, this oops happened on our system running a relative old kernel, but
    the same risk still exists on the mainline, since we use the wrong
    actions_len from the beginning.

    Fixes: ccea74457bbd ("openvswitch: include datapath actions with sampled-pac
    Cc: Neil McKee &lt;neil.mckee@inmon.com&gt;
    Signed-off-by: Liping Zhang &lt;zlpnobody@gmail.com&gt;
    Acked-by: Pravin B Shelar &lt;pshelar@ovn.org&gt;
    Signed-off-by: David S. Miller &lt;davem@davemloft.net&gt;

Fixes: 0e469d3b380c ("datapath: Include datapath actions with sampled-packet upcall to userspace.")
Signed-off-by: Greg Rose &lt;gvrose8192@gmail.com&gt;
Signed-off-by: Andy Zhou &lt;azhou@ovn.org&gt;
</pre>
</div>
</content>
</entry>
</feed>
