[ovs-git] [openvswitch/ovs] a7d1bb: ofproto-dpif: Use DPIF_FP_CREATE but not DPIF_FP_M...

GitHub noreply at github.com
Mon Aug 4 19:36:52 UTC 2014


  Branch: refs/heads/master
  Home:   https://github.com/openvswitch/ovs
  Commit: a7d1bbdcfe49e8c7a5575c9ab46b2ac9e5642ef1
      https://github.com/openvswitch/ovs/commit/a7d1bbdcfe49e8c7a5575c9ab46b2ac9e5642ef1
  Author: Ben Pfaff <blp at nicira.com>
  Date:   2014-08-04 (Mon, 04 Aug 2014)

  Changed paths:
    M ofproto/ofproto-dpif-upcall.c
    M ofproto/ofproto-dpif.c

  Log Message:
  -----------
  ofproto-dpif: Use DPIF_FP_CREATE but not DPIF_FP_MODIFY.

A dpif reports EEXIST if a flow put operation that should create a new flow
instead attempts to modify an existing flow, or ENOENT if a flow put would
create a flow that overlaps some existing flow.  The latter does not always
indicate a bug in OVS userspace, because it can also mean that two
userspace OVS packet handler threads received packets that generated
the same megaflow for different microflows.  Until now, userspace has
logged this, which confuses users by making them suspect a bug.  We could
simply not log ENOENT in userspace, but that would suppress logging for
genuine bugs too.  Instead, this commit drops DPIF_FP_MODIFY from flow
put operations in ofproto-dpif, which transforms this particular
problem into EEXIST, which userspace already logs at "debug" level (see
flow_message_log_level()), effectively suppressing the logging in normal
circumstances.

It appears that in practice ofproto-dpif doesn't actually ever need to
modify flows in the datapath, only create and delete them, so this
shouldn't cause problems.

Suggested-by: Jesse Gross <jesse at nicira.com>
Signed-off-by: Ben Pfaff <blp at nicira.com>
Acked-by: Jesse Gross <jesse at nicira.com>


  Commit: 084c03f36631f0bb6bec75fd8819409b31594557
      https://github.com/openvswitch/ovs/commit/084c03f36631f0bb6bec75fd8819409b31594557
  Author: Andy Zhou <azhou at nicira.com>
  Date:   2014-08-04 (Mon, 04 Aug 2014)

  Changed paths:
    M ofproto/ofproto-dpif.c

  Log Message:
  -----------
  ofproto-dpif: fix an ovs crash when dpif_recv_set returns error

When dpif_recv_set returns an error, close_dpif_backer gets called,
which in term calls recirc_id_pool_destroy, which can lead to a crash
since recirc_id_pool_create() was not called before this patch.

Reported-by: Mukesh Hira <mhira at vmware.com>
Signed-off-by: Andy Zhou <azhou at nicira.com>
Acked-by: Ben Pfaff <blp at nicira.com>


Compare: https://github.com/openvswitch/ovs/compare/6a54dedc6693...084c03f36631


More information about the git mailing list