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

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


  Branch: refs/heads/branch-2.13
  Home:   https://github.com/openvswitch/ovs
  Commit: bbd62d7a444e889ea7e05f7f42bedf76e8178f52
      https://github.com/openvswitch/ovs/commit/bbd62d7a444e889ea7e05f7f42bedf76e8178f52
  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: a4730043a43e44bd66eb658849aca1425e3a260f
      https://github.com/openvswitch/ovs/commit/a4730043a43e44bd66eb658849aca1425e3a260f
  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: 1c2a5f170fd98b4884b39c249c5d215a80d511de
      https://github.com/openvswitch/ovs/commit/1c2a5f170fd98b4884b39c249c5d215a80d511de
  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: 4f68040a5c5242197bd518e3d54564addf786829
      https://github.com/openvswitch/ovs/commit/4f68040a5c5242197bd518e3d54564addf786829
  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: 43c2a10922b9a0efee4b1c12fbefb257fc242707
      https://github.com/openvswitch/ovs/commit/43c2a10922b9a0efee4b1c12fbefb257fc242707
  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: 9984d6112495934bdb3ec668830ddcd0df7399c8
      https://github.com/openvswitch/ovs/commit/9984d6112495934bdb3ec668830ddcd0df7399c8
  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/759da53f07d3...9984d6112495


More information about the git mailing list