[ovs-git] [openvswitch/ovs] 23185f: tc: Use skip_hw flag when probing tc features.

Ilya Maximets noreply at github.com
Tue Apr 20 10:05:28 UTC 2021


  Branch: refs/heads/branch-2.14
  Home:   https://github.com/openvswitch/ovs
  Commit: 23185ff3c25559dbed7e70bf33fe4a3c57d310ea
      https://github.com/openvswitch/ovs/commit/23185ff3c25559dbed7e70bf33fe4a3c57d310ea
  Author: Roi Dayan <roid at mellanox.com>
  Date:   2021-04-19 (Mon, 19 Apr 2021)

  Changed paths:
    M lib/netdev-offload-tc.c
    M lib/tc.c
    M lib/tc.h

  Log Message:
  -----------
  tc: Use skip_hw flag when probing tc features.

There is no need to pass tc rules to hw when just probing
for tc features. this will avoid redundant errors from hw drivers
that may happen.

Signed-off-by: Roi Dayan <roid at mellanox.com>
Acked-By: Vlad Buslov <vladbu at mellanox.com>
Reviewed-by: Tonghao Zhang <xiangxia.m.yue at gmail.com>
Signed-off-by: Simon Horman <simon.horman at netronome.com>
(cherry picked from commit d5659751f65ebc17d9aec40b60c1cff3a2d87162)
Signed-off-by: Aaron Conole <aconole at redhat.com>
Reviewed-by: Marcelo Ricardo Leitner <marcelo.leitner at gmail.com>
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>


  Commit: 25bf7e7e5517cc158d75b9f7b697c33e9e41a085
      https://github.com/openvswitch/ovs/commit/25bf7e7e5517cc158d75b9f7b697c33e9e41a085
  Author: Paul Blakey <paulb at nvidia.com>
  Date:   2021-04-19 (Mon, 19 Apr 2021)

  Changed paths:
    M acinclude.m4
    M include/linux/pkt_cls.h

  Log Message:
  -----------
  compat: Add ct_state flags definitions.

Add TCA_FLOWER_KEY_CT_FLAGS_REPLY, and TCA_FLOWER_KEY_CT_FLAGS_INVALID.

Signed-off-by: Paul Blakey <paulb at nvidia.com>
Acked-by: Roi Dayan <roid at nvidia.com>
Reviewed-by: Marcelo Ricardo Leitner <marcelo.leitner at gmail.com>
Signed-off-by: Simon Horman <simon.horman at netronome.com>
(cherry picked from commit 0a8bd432ae0cf750b5560312343ddaa05af8c876)
Signed-off-by: Aaron Conole <aconole at redhat.com>
Reviewed-by: Marcelo Ricardo Leitner <marcelo.leitner at gmail.com>
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>


  Commit: 098edeb61569a80b47b7b4ac3e945f870ca211de
      https://github.com/openvswitch/ovs/commit/098edeb61569a80b47b7b4ac3e945f870ca211de
  Author: Paul Blakey <paulb at nvidia.com>
  Date:   2021-04-19 (Mon, 19 Apr 2021)

  Changed paths:
    M lib/netdev-offload-tc.c

  Log Message:
  -----------
  netdev-offload-tc: Probe for support for any of the ct_state flags.

Upstream kernel now rejects unsupported ct_state flags.
Earlier kernels, ignored it but still echoed back the requested ct_state,
if ct_state was supported. ct_state initial support had trk, new, est,
and rel flags.

If kernel echos back ct_state, assume support for trk, new, est, and
rel. If kernel rejects a specific unsupported flag, continue and
use reject mechanisim to probe for flags rep and inv.

Disallow inserting rules with unnsupported ct_state flags.

Signed-off-by: Paul Blakey <paulb at nvidia.com>
Acked-by: Roi Dayan <roid at nvidia.com>
Reviewed-by: Marcelo Ricardo Leitner <marcelo.leitner at gmail.com>
Signed-off-by: Simon Horman <simon.horman at netronome.com>
(cherry picked from commit 1e4aa061ac8b71196c0b0c8ab23d1627cd2e4a27)
Signed-off-by: Aaron Conole <aconole at redhat.com>
Reviewed-by: Marcelo Ricardo Leitner <marcelo.leitner at gmail.com>
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>


  Commit: b6a6cfa0a1b301ce7333d8a9e0ad3fab05ef85e8
      https://github.com/openvswitch/ovs/commit/b6a6cfa0a1b301ce7333d8a9e0ad3fab05ef85e8
  Author: Yunjian Wang <wangyunjian at huawei.com>
  Date:   2021-04-19 (Mon, 19 Apr 2021)

  Changed paths:
    M lib/dpif-netlink.c

  Log Message:
  -----------
  dpif-netlink: Fix using uninitialized info.tc_modify_flow_deleted in out label.

Before info.tc_modify_flow_deleted is assigned a value, error
processing of other statements goes to the out label. In the
out label, the uninitialized variant is used for condition
determination, which may cause uncertain behavior.

Fixes: 65b84d4a32bd ("dpif-netlink: avoid netlink modify flow put op failed after tc modify flow put op failed.")
Signed-off-by: Mengfan Lv <lvmengfan at huawei.com>
Signed-off-by: Yunjian Wang <wangyunjian at huawei.com>
Reviewed-by: Simon Horman <simon.horman at netronome.com>
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>


  Commit: 4cdc15c89e4ed7a839f31b97666c323de97c0ee9
      https://github.com/openvswitch/ovs/commit/4cdc15c89e4ed7a839f31b97666c323de97c0ee9
  Author: Ilya Maximets <i.maximets at ovn.org>
  Date:   2021-04-19 (Mon, 19 Apr 2021)

  Changed paths:
    M lib/odp-util.c

  Log Message:
  -----------
  odp-util: Fix use of uninitialized erspan metadata.

'struct erspan_metadata' contains union with fields of different
sizes, hence not all the memory initiliazed.  This memory goes
to syscalls and also used to compare ukeys with memcmp which may
cause unexpected behavior.

 Thread 15 revalidator13:
 Conditional jump or move depends on uninitialised value(s)
    at 0x4C377B6: bcmp (vg_replace_strmem.c:1111)
    by 0x43F844: ofpbuf_equal (ofpbuf.h:273)
    by 0x43F844: revalidate_ukey__ (ofproto-dpif-upcall.c:2227)
    by 0x43F9C9: revalidate_ukey (ofproto-dpif-upcall.c:2294)
    by 0x4425C2: revalidate.isra.33 (ofproto-dpif-upcall.c:2734)
    by 0x4434B8: udpif_revalidator (ofproto-dpif-upcall.c:943)
    by 0x4FDE2C: ovsthread_wrapper (ovs-thread.c:383)
    by 0x5E19159: start_thread (in /usr/lib64/libpthread-2.28.so)
    by 0x69ECF72: clone (in /usr/lib64/libc-2.28.so)
  Uninitialised value was created by a stack allocation
    at 0x4B1CE0: tun_key_to_attr (odp-util.c:3129)

Fixes: 98514eea21f4 ("erspan: add kernel datapath support")
Acked-by: William Tu <u9012063 at gmail.com>
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>


  Commit: 03e29bb68b5b1bc89f8df499d89be08e3e948f73
      https://github.com/openvswitch/ovs/commit/03e29bb68b5b1bc89f8df499d89be08e3e948f73
  Author: Ilya Maximets <i.maximets at ovn.org>
  Date:   2021-04-19 (Mon, 19 Apr 2021)

  Changed paths:
    M lib/dpif.c
    M lib/dpif.h

  Log Message:
  -----------
  dpif: Fix use of uninitialized execute hash.

'dpif_execute_helper_cb' doesn't initilalize the 'hash' field that
may be passed down to datapath and might cause execution of a different
set of actions, e.g. on recirculation.

 Thread 6 handler27:
 Conditional jump or move depends on uninitialised value(s)
    at 0x53A2C2: dpif_netlink_encode_execute (dpif-netlink.c:1841)
    by 0x53A2C2: dpif_netlink_operate__ (dpif-netlink.c:1919)
    by 0x53A82D: dpif_netlink_operate_chunks (dpif-netlink.c:2238)
    by 0x53A82D: dpif_netlink_operate (dpif-netlink.c:2297)
    by 0x48135F: dpif_operate (dpif.c:1366)
    by 0x481923: dpif_execute.part.24 (dpif.c:1320)
    by 0x481C46: dpif_execute (dpif.c:1312)
    by 0x481C46: dpif_execute_helper_cb (dpif.c:1243)
    by 0x4AE943: odp_execute_actions (odp-execute.c:865)
    by 0x47F272: dpif_execute_with_help (dpif.c:1296)
    by 0x4812FF: dpif_operate (dpif.c:1422)
    by 0x442226: handle_upcalls (ofproto-dpif-upcall.c:1617)
    by 0x442226: recv_upcalls.isra.36 (ofproto-dpif-upcall.c:855)
    by 0x442351: udpif_upcall_handler (ofproto-dpif-upcall.c:755)
    by 0x4FDE2C: ovsthread_wrapper (ovs-thread.c:383)
    by 0x5E19159: start_thread (in /usr/lib64/libpthread-2.28.so)
    by 0x69ECF72: clone (in /usr/lib64/libc-2.28.so)
  Uninitialised value was created by a stack allocation
    at 0x481966: dpif_execute_helper_cb (dpif.c:1159)

Additionally added a missing comment to the 'struct dpif_execute'.

Fixes: 0442bfb11d6c ("ofproto-dpif-upcall: Echo HASH attribute back to datapath.")
Acked-by: Tonghao Zhang <xiangxia.m.yue at gmail.com>
Signed-off-by: Ilya Maximets <i.maximets at ovn.org>


Compare: https://github.com/openvswitch/ovs/compare/fdd82b2318dd...03e29bb68b5b


More information about the git mailing list