diff options
author | Daniele Di Proietto <diproiettod@vmware.com> | 2017-01-27 16:41:36 -0800 |
---|---|---|
committer | Daniele Di Proietto <diproiettod@vmware.com> | 2017-02-03 09:45:42 -0800 |
commit | d4f6865c3f1c944cbd60a3011a9f75b5e2c496a8 (patch) | |
tree | 05fbb9464464ab9f9a57d4b714bcf05b0cfd27f9 /lib/dpif.c | |
parent | cb44e6e09bc08821764a780ecf3fdf54d3dfdc0f (diff) | |
download | openvswitch-d4f6865c3f1c944cbd60a3011a9f75b5e2c496a8.tar.gz |
dpif-netdev: Pass Openvswitch other_config smap to dpif.
Currently we parse the 'other_config' column in Openvswitch table in
bridge.c. We extract the values (just 'pmd-cpu-mask' for now) and we
pass them down to the datapath, via different layers.
If we want to pass other values to dpif-netdev.c (like we recently
discussed) we would have to touch ofproto.c, ofproto-dpif.c and dpif.c.
This patch sends the entire other_config column to dpif-netdev, so that
dpif-netdev can extract the values it's interested in.
No functional change.
Signed-off-by: Daniele Di Proietto <diproiettod@vmware.com>
Acked-by: Ben Pfaff <blp@ovn.org>
Diffstat (limited to 'lib/dpif.c')
-rw-r--r-- | lib/dpif.c | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/lib/dpif.c b/lib/dpif.c index 374f013ab..57aa3c6c4 100644 --- a/lib/dpif.c +++ b/lib/dpif.c @@ -1440,17 +1440,17 @@ dpif_print_packet(struct dpif *dpif, struct dpif_upcall *upcall) } } -/* If 'dpif' creates its own I/O polling threads, refreshes poll threads - * configuration. */ +/* Pass custom configuration to the datapath implementation. Some of the + * changes can be postponed until dpif_run() is called. */ int -dpif_poll_threads_set(struct dpif *dpif, const char *cmask) +dpif_set_config(struct dpif *dpif, const struct smap *cfg) { int error = 0; - if (dpif->dpif_class->poll_threads_set) { - error = dpif->dpif_class->poll_threads_set(dpif, cmask); + if (dpif->dpif_class->set_config) { + error = dpif->dpif_class->set_config(dpif, cfg); if (error) { - log_operation(dpif, "poll_threads_set", error); + log_operation(dpif, "set_config", error); } } |