[ovs-git] [openvswitch/ovs] 88ace7: dpif-netdev: fix dp_netdev_free()

GitHub noreply at github.com
Fri Oct 3 22:09:38 UTC 2014


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: 88ace79b3e0e7808338e5c70b7554a59f4bc3600
      https://github.com/openvswitch/ovs/commit/88ace79b3e0e7808338e5c70b7554a59f4bc3600
  Author: Daniele Di Proietto <ddiproietto at vmware.com>
  Date:   2014-10-03 (Fri, 03 Oct 2014)

  Changed paths:
    M lib/dpif-netdev.c
    M tests/dpif-netdev.at

  Log Message:
  -----------
  dpif-netdev: fix dp_netdev_free()

dp_netdev_free() must free 'dp->upcall_rwlock', but when upcalls are
disabled (if the datapath is being freed upcalls should be disabled)
'dp->upcall_rwlock' is taken and freeing it causes an assertion to
fail.

This commit takes makes sure that the upcalls are disabled and
releases 'dp->upcall_rwlock' before freeing it. A simple testcase is
added to detect the failure.

Signed-off-by: Daniele Di Proietto <ddiproietto at vmware.com>
Acked-by: Jarno Rajahalme <jrajahalme at nicira.com>


  Commit: 33c24cf9f42dbc7b156a5d0ef5f4851537d343cc
      https://github.com/openvswitch/ovs/commit/33c24cf9f42dbc7b156a5d0ef5f4851537d343cc
  Author: Daniele Di Proietto <ddiproietto at vmware.com>
  Date:   2014-10-03 (Fri, 03 Oct 2014)

  Changed paths:
    M lib/timeval.c

  Log Message:
  -----------
  timeval: Fix seq memory leak

'timewarp_seq' should be initialized only once, while init_clock() is
called multiple times (once for each clock instance).

Found by valgrind

Signed-off-by: Daniele Di Proietto <ddiproietto at vmware.com>
Acked-by: Jarno Rajahalme <jrajahalme at nicira.com>


  Commit: 8bd89cdc06fbb3fc29144fa99ae499d71e14ebf1
      https://github.com/openvswitch/ovs/commit/8bd89cdc06fbb3fc29144fa99ae499d71e14ebf1
  Author: Daniele Di Proietto <ddiproietto at vmware.com>
  Date:   2014-10-03 (Fri, 03 Oct 2014)

  Changed paths:
    M lib/dpif-netdev.c

  Log Message:
  -----------
  dpif-netdev: Destroy pmd_thread cmap at exit

Found by valgrind

Signed-off-by: Daniele Di Proietto <ddiproietto at vmware.com>
Acked-by: Jarno Rajahalme <jrajahalme at nicira.com>


  Commit: d73803ca82842beecd6011dd8f6d1d2e1230b5d9
      https://github.com/openvswitch/ovs/commit/d73803ca82842beecd6011dd8f6d1d2e1230b5d9
  Author: Daniele Di Proietto <ddiproietto at vmware.com>
  Date:   2014-10-03 (Fri, 03 Oct 2014)

  Changed paths:
    M lib/odp-util.c

  Log Message:
  -----------
  odp-util: Parse recirc action in parse_odp_action()

This may be useful for debugging (with dpctl)

Signed-off-by: Daniele Di Proietto <ddiproietto at vmware.com>
Acked-by: Jarno Rajahalme <jrajahalme at nicira.com>


  Commit: 0057762a2f60b1d4a720cb5c4b83ebe97dffbbc9
      https://github.com/openvswitch/ovs/commit/0057762a2f60b1d4a720cb5c4b83ebe97dffbbc9
  Author: Daniele Di Proietto <ddiproietto at vmware.com>
  Date:   2014-10-03 (Fri, 03 Oct 2014)

  Changed paths:
    M lib/odp-execute.c

  Log Message:
  -----------
  odp-execute: Fix memory leak on recirc action

If odp_execute_actions() has been called with 'steal' set to true and
OVS_ACTION_ATTR_RECIRC as last action, it should allow dp_execute_cb()
to steal the packet.

Signed-off-by: Daniele Di Proietto <ddiproietto at vmware.com>
Acked-by: Jarno Rajahalme <jrajahalme at nicira.com>


  Commit: 1164afb6cc6b0f058375b6843e803cc61be69661
      https://github.com/openvswitch/ovs/commit/1164afb6cc6b0f058375b6843e803cc61be69661
  Author: Daniele Di Proietto <ddiproietto at vmware.com>
  Date:   2014-10-03 (Fri, 03 Oct 2014)

  Changed paths:
    M lib/odp-execute.c

  Log Message:
  -----------
  odp-execute: Refactor odp_execute_{actions, sample}()

Firstly, with this change, the 'more_actions' parameter is removed and
is integrated into 'steal'. Then, every function that receives a batch
of packets with 'steal' set to true is responsible for freeing the
packets. Finally, odp_execute_actions() and odp_execute_actions__()
can be be merged.

This also fixes a memory leak in odp_execute_sample(), when the
subactions are not executed

Signed-off-by: Daniele Di Proietto <ddiproietto at vmware.com>
Acked-by: Jarno Rajahalme <jrajahalme at nicira.com>


Compare: https://github.com/openvswitch/ovs/compare/43f9ac0aa926...1164afb6cc6b


More information about the git mailing list