mirror of
https://github.com/openvswitch/ovs
synced 2025-10-13 14:07:02 +00:00
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>
This commit is contained in:
@@ -2724,12 +2724,13 @@ dpif_netdev_operate(struct dpif *dpif, struct dpif_op **ops, size_t n_ops)
|
||||
}
|
||||
}
|
||||
|
||||
/* Changes the number or the affinity of pmd threads. The changes are actually
|
||||
* applied in dpif_netdev_run(). */
|
||||
/* Applies datapath configuration from the database. Some of the changes are
|
||||
* actually applied in dpif_netdev_run(). */
|
||||
static int
|
||||
dpif_netdev_pmd_set(struct dpif *dpif, const char *cmask)
|
||||
dpif_netdev_set_config(struct dpif *dpif, const struct smap *other_config)
|
||||
{
|
||||
struct dp_netdev *dp = get_dp_netdev(dpif);
|
||||
const char *cmask = smap_get(other_config, "pmd-cpu-mask");
|
||||
|
||||
if (!nullable_string_is_equal(dp->pmd_cmask, cmask)) {
|
||||
free(dp->pmd_cmask);
|
||||
@@ -4844,7 +4845,7 @@ const struct dpif_class dpif_netdev_class = {
|
||||
dpif_netdev_operate,
|
||||
NULL, /* recv_set */
|
||||
NULL, /* handlers_set */
|
||||
dpif_netdev_pmd_set,
|
||||
dpif_netdev_set_config,
|
||||
dpif_netdev_queue_to_priority,
|
||||
NULL, /* recv */
|
||||
NULL, /* recv_wait */
|
||||
|
Reference in New Issue
Block a user