On 15 Oct 2025, at 16:59, Eli Britstein wrote:
> Instead of dedicated dpdk properties in the schema (dpdk_initialized,
> dpdk_version), introduce a generic 'libraries' table, for key-value
> pairs, making it generic and expandable for future libraries.
> DPDK fills it instead of the special properties.
Hi Eli,
Not a full review, just one quick note: you cannot delete items from a schema
for backward compatibility reasons.
As Ilya is already included, any thoughts on the new libraries table?
Cheers,
Eelco
> Signed-off-by: Eli Britstein <[email protected]>
> ---
> lib/dpdk-stub.c | 14 +++++++++++---
> lib/dpdk.c | 15 ++++++++++++---
> vswitchd/bridge.c | 4 +---
> vswitchd/vswitch.ovsschema | 12 +++++-------
> vswitchd/vswitch.xml | 15 ++++-----------
> 5 files changed, 33 insertions(+), 27 deletions(-)
>
> diff --git a/lib/dpdk-stub.c b/lib/dpdk-stub.c
> index 58ebf6cb6..d44512e53 100644
> --- a/lib/dpdk-stub.c
> +++ b/lib/dpdk-stub.c
> @@ -63,8 +63,16 @@ print_dpdk_version(void)
> void
> dpdk_status(const struct ovsrec_open_vswitch *cfg)
> {
> - if (cfg) {
> - ovsrec_open_vswitch_set_dpdk_initialized(cfg, false);
> - ovsrec_open_vswitch_set_dpdk_version(cfg, "none");
> + struct smap new_libraries;
> +
> + if (!cfg) {
> + return;
> }
> +
> + smap_init(&new_libraries);
> + smap_clone(&new_libraries, &cfg->libraries);
> + smap_replace(&new_libraries, "dpdk-initialized", "false");
> + smap_replace(&new_libraries, "dpdk-version", "none");
> + ovsrec_open_vswitch_set_libraries(cfg, &new_libraries);
> + smap_destroy(&new_libraries);
> }
> diff --git a/lib/dpdk.c b/lib/dpdk.c
> index 19f147418..3dd0bde7d 100644
> --- a/lib/dpdk.c
> +++ b/lib/dpdk.c
> @@ -592,8 +592,17 @@ print_dpdk_version(void)
> void
> dpdk_status(const struct ovsrec_open_vswitch *cfg)
> {
> - if (cfg) {
> - ovsrec_open_vswitch_set_dpdk_initialized(cfg, dpdk_available());
> - ovsrec_open_vswitch_set_dpdk_version(cfg, rte_version());
> + struct smap new_libraries;
> +
> + if (!cfg) {
> + return;
> }
> +
> + smap_init(&new_libraries);
> + smap_clone(&new_libraries, &cfg->libraries);
> + smap_replace(&new_libraries, "dpdk-initialized",
> + dpdk_available() ? "true" : "false");
> + smap_replace(&new_libraries, "dpdk-version", rte_version());
> + ovsrec_open_vswitch_set_libraries(cfg, &new_libraries);
> + smap_destroy(&new_libraries);
> }
> diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c
> index ac36f31ea..fcec6f633 100644
> --- a/vswitchd/bridge.c
> +++ b/vswitchd/bridge.c
> @@ -28,7 +28,6 @@
> #include "daemon.h"
> #include "dirs.h"
> #include "dpif.h"
> -#include "dpdk.h"
> #include "hash.h"
> #include "openvswitch/hmap.h"
> #include "hmapx.h"
> @@ -449,8 +448,7 @@ bridge_init(const char *remote)
> ovsdb_idl_omit(idl, &ovsrec_open_vswitch_col_db_version);
> ovsdb_idl_omit(idl, &ovsrec_open_vswitch_col_system_type);
> ovsdb_idl_omit(idl, &ovsrec_open_vswitch_col_system_version);
> - ovsdb_idl_omit_alert(idl, &ovsrec_open_vswitch_col_dpdk_version);
> - ovsdb_idl_omit_alert(idl, &ovsrec_open_vswitch_col_dpdk_initialized);
> + ovsdb_idl_omit_alert(idl, &ovsrec_open_vswitch_col_libraries);
>
> ovsdb_idl_omit_alert(idl, &ovsrec_bridge_col_datapath_id);
> ovsdb_idl_omit_alert(idl, &ovsrec_bridge_col_datapath_version);
> diff --git a/vswitchd/vswitch.ovsschema b/vswitchd/vswitch.ovsschema
> index c658291c7..ce3079292 100644
> --- a/vswitchd/vswitch.ovsschema
> +++ b/vswitchd/vswitch.ovsschema
> @@ -1,6 +1,6 @@
> {"name": "Open_vSwitch",
> - "version": "8.8.0",
> - "cksum": "2823623553 27869",
> + "version": "8.9.0",
> + "cksum": "3257907134 27827",
> "tables": {
> "Open_vSwitch": {
> "columns": {
> @@ -53,11 +53,9 @@
> "iface_types": {
> "type": {"key": {"type": "string"},
> "min": 0, "max": "unlimited"}},
> - "dpdk_initialized": {
> - "type": "boolean"},
> - "dpdk_version": {
> - "type": {"key": {"type": "string"},
> - "min": 0, "max": 1}}},
> + "libraries": {
> + "type": {"key": "string", "value": "string",
> + "min": 0, "max": "unlimited"}}},
> "isRoot": true,
> "maxRows": 1},
> "Bridge": {
> diff --git a/vswitchd/vswitch.xml b/vswitchd/vswitch.xml
> index 3dcf74402..0c33d2521 100644
> --- a/vswitchd/vswitch.xml
> +++ b/vswitchd/vswitch.xml
> @@ -902,6 +902,10 @@
> </p>
> </column>
>
> + <column name="libraries">
> + Key-value pairs for information about libraries.
> + </column>
> +
> </group>
> <group title="Status">
> <column name="next_cfg">
> @@ -917,11 +921,6 @@
> configuration changes.
> </column>
>
> - <column name="dpdk_initialized">
> - True if <ref column="other_config" key="dpdk-init"/> is set to
> - true and the DPDK library is successfully initialized.
> - </column>
> -
> <group title="Statistics">
> <p>
> The <code>statistics</code> column contains key-value pairs that
> @@ -1106,12 +1105,6 @@
> </p>
> </column>
>
> - <column name="dpdk_version">
> - <p>
> - The version of the linked DPDK library.
> - </p>
> - </column>
> -
> </group>
>
> <group title="Capabilities">
> --
> 2.34.1
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev