[ovs-dev] [const 0/9] Mark many static data structures as const.

Ben Pfaff blp at nicira.com
Wed May 1 18:20:57 UTC 2013


In preparation for multithreading OVS, it makes sense to mark any
static data that we can "const", because read-only access to data
is obviously thread-safe.

Ben Pfaff (9):
  dpif-linux: Make dummy_action const in dpif_linux_init_flow_put().
  Make most "struct option" instances "const".
  hmap: Make HMAP_INITIALIZER a valid initializer for a const hmap.
  netdev-linux: Mark more static data as "const".
  netdev: Make 'smap' variable const in netdev_set_qos().
  stream-fd: Mark 'fd_pstream_class' const.
  vlog: Mark more static data const.
  ofp-util: Make names[] in ofputil_action_code_from_name() const-ier.
  vconn: Mark class structures as const.

 lib/dpif-linux.c           |    6 ++++--
 lib/hmap.h                 |    3 ++-
 lib/netdev-linux.c         |   30 ++++++++++++++----------------
 lib/netdev.c               |    2 +-
 lib/ofp-util.c             |    4 ++--
 lib/stream-fd.c            |    4 ++--
 lib/vconn-provider.h       |   20 ++++++++++----------
 lib/vconn-stream.c         |   20 ++++++++++----------
 lib/vconn.c                |   30 +++++++++++++++---------------
 lib/vlog.c                 |    6 +++---
 ovsdb/ovsdb-client.c       |    4 ++--
 ovsdb/ovsdb-server.c       |    2 +-
 ovsdb/ovsdb-tool.c         |    2 +-
 tests/test-jsonrpc.c       |    4 ++--
 tests/test-netflow.c       |    2 +-
 tests/test-ovsdb.c         |    2 +-
 tests/test-sflow.c         |    2 +-
 tests/test-util.c          |    2 +-
 utilities/ovs-benchmark.c  |    4 ++--
 utilities/ovs-controller.c |    2 +-
 utilities/ovs-dpctl.c      |    2 +-
 utilities/ovs-ofctl.c      |    2 +-
 vswitchd/ovs-vswitchd.c    |    2 +-
 23 files changed, 79 insertions(+), 78 deletions(-)

-- 
1.7.2.5




More information about the dev mailing list