
{"id":12883,"date":"2026-05-04T10:31:22","date_gmt":"2026-05-04T10:31:22","guid":{"rendered":"https:\/\/developer.rdkcentral.com\/documentation\/?page_id=12883"},"modified":"2026-05-04T10:33:08","modified_gmt":"2026-05-04T10:33:08","slug":"open-virtual-switch-agent","status":"publish","type":"page","link":"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_broadband_documentation\/components\/open-virtual-switch-agent\/","title":{"rendered":"Open Virtual Switch Agent"},"content":{"rendered":"\n<p>Open Virtual Switch Agent (OvsAgent) is the RDK-B component responsible for translating network bridge configuration requests stored in the Open vSwitch Database (OVSDB) into actual Linux networking operations on the gateway. The component connects to the OVSDB server over a Unix domain socket, monitors the&nbsp;<code>Gateway_Config<\/code>&nbsp;table for incoming configuration commands, and executes the corresponding bridge and port management operations using either Open vSwitch (<code>ovs-vsctl<\/code>) commands or Linux bridge utilities (<code>brctl<\/code>\/<code>ifconfig<\/code>) depending on bridge type. After executing each operation, OvsAgent writes the result status back to the OVSDB&nbsp;<code>Feedback<\/code>&nbsp;table so that requesting components can confirm success or failure.<\/p>\n\n\n\n<p>OvsAgent serves as the southbound executor for virtual networking configuration on RDK-B platforms. Components such as BridgeUtils and MeshAgent submit configuration requests to OVSDB; OvsAgent picks them up, applies them to the Linux kernel networking layer, and reports back. This decoupling allows other middleware components to interact with the virtual switch through a well-defined database interface without needing direct knowledge of the underlying networking commands or platform-specific details.<\/p>\n\n\n\n<div class=\"wp-block-merpress-mermaidjs diagram-source-mermaid\"><pre class=\"mermaid\">graph LR\n    subgraph ExternalSystems [\"External Systems\"]\n        MeshCtrl[\"Mesh Controller\\n(Remote)\"]\n    end\n\n    subgraph RDKBMiddleware [\"RDK-B Middleware (Linux Process)\"]\n        BridgeUtils[\"BridgeUtils\\nComponent\"]\n        MeshAgent[\"MeshAgent\\nComponent\"]\n        OvsAgent[\"OvsAgent\\n(This Component)\"]\n        OvsDbServer[\"OVSDB Server\\n(ovsdb-server)\"]\n        CcspPsm[\"CcspPsm\\n(PSM)\"]\n        CcspCR[\"Component Registry\"]\n    end\n\n    subgraph SystemLayer [\"System &amp; Platform Layer\"]\n        OvsTools[\"ovs-vsctl\\novs-ofctl\"]\n        LinuxNet[\"Linux Bridge\\nbrctl \/ ifconfig\"]\n        Syscfg[\"syscfg\\n(NVRAM Store)\"]\n        DeviceProps[\"\/etc\/device.properties\"]\n    end\n\n    MeshCtrl -->|\"Remote Mgmt\"| MeshAgent\n    BridgeUtils -->|\"Unix Socket\\nJSON-RPC\"| OvsDbServer\n    MeshAgent -->|\"Unix Socket\\nJSON-RPC\"| OvsDbServer\n    OvsAgent -->|\"Unix Socket \/var\/run\/openvswitch\/db.sock\\nJSON-RPC OVSDB Protocol\"| OvsDbServer\n    OvsAgent -->|\"R-BUS\"| CcspCR\n    OvsAgent -->|\"systemd gate\\nConditionPathExists=\/tmp\/psm_initialized\"| CcspPsm\n    OvsAgent -->|\"syscfg_get\\nlan_ipaddr\"| Syscfg\n    OvsAgent -->|\"getenv MODEL_NUM\\nOneWiFiEnabled\"| DeviceProps\n    OvsAgent -->|\"v_secure_system\"| OvsTools\n    OvsAgent -->|\"v_secure_system\\n(non-OVS bridges)\"| LinuxNet\n\n    classDef external fill:#e8f5e8,stroke:#2e7d32,stroke-width:2px;\n    classDef component fill:#e1f5fe,stroke:#0277bd,stroke-width:2px;\n    classDef system fill:#fff3e0,stroke:#ef6c00,stroke-width:2px;\n    classDef thisComp fill:#fce4ec,stroke:#c62828,stroke-width:2px;\n\n    class MeshCtrl external;\n    class BridgeUtils,MeshAgent,OvsDbServer,CcspPsm,CcspCR component;\n    class OvsTools,LinuxNet,Syscfg,DeviceProps system;\n    class OvsAgent thisComp;<\/pre><\/div>\n\n\n\n<p><strong>Key Features &amp; Responsibilities<\/strong>:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>OVSDB Gateway Config Monitoring<\/strong>: Connects to the OVSDB server via Unix domain socket at\u00a0<code>\/var\/run\/openvswitch\/db.sock<\/code>\u00a0and monitors the\u00a0<code>Gateway_Config<\/code>\u00a0table for incoming network interface and bridge configuration requests from other RDK-B components.<\/li>\n\n\n\n<li><strong>Bridge and Port Management<\/strong>: Translates\u00a0<code>Gateway_Config<\/code>\u00a0records into actual Linux networking commands \u2014 creating or removing OVS bridges with\u00a0<code>ovs-vsctl<\/code>, adding or removing ports, bringing interfaces up or down, and configuring VLAN and GRE interfaces.<\/li>\n\n\n\n<li><strong>Dual-mode Networking Backend<\/strong>: Selects between OVS-managed (<code>ovs-vsctl<\/code>) and Linux-native (<code>brctl<\/code>\/<code>ifconfig<\/code>) bridge operations at runtime based on the bridge name. To meet Xfinity WiFi requirements, specific bridges (<code>brlan2<\/code>\u2013<code>brlan5<\/code>,\u00a0<code>brpublic<\/code>,\u00a0<code>bropen6g<\/code>,\u00a0<code>brsecure6g<\/code>) are managed using Linux bridge utilities.<\/li>\n\n\n\n<li><strong>Feedback Reporting<\/strong>: After applying each configuration, inserts a\u00a0<code>Feedback<\/code>\u00a0record into the OVSDB\u00a0<code>Feedback<\/code>\u00a0table containing the request UUID and the operation status, allowing the originating component to confirm the outcome.<\/li>\n\n\n\n<li><strong>OpenFlow Flow Configuration<\/strong>: Sets up OpenFlow flows on OVS bridges for specific Wi-Fi hardware models and Mesh fast-roaming scenarios using\u00a0<code>ovs-ofctl<\/code>\u00a0commands after bridge configuration.<\/li>\n\n\n\n<li><strong>Conditional Startup via syscfg<\/strong>: The service startup path checks the\u00a0<code>mesh_ovs_enable<\/code>\u00a0syscfg key before launching\u00a0<code>\/usr\/bin\/OvsAgent<\/code>. If the key is not set to\u00a0<code>true<\/code>\u00a0and neither\u00a0<code>OneWiFiEnabled<\/code>\u00a0nor\u00a0<code>\/etc\/WFO_enabled<\/code>\u00a0is present, startup is skipped and\u00a0<code>\/tmp\/ovsagent_initialized<\/code>\u00a0is touched to signal readiness without starting the main process.<\/li>\n<\/ul>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"OpenVirtualSwitchAgent-Design\">Design<\/h2>\n\n\n\n<p>OvsAgent is designed around a single-responsibility principle: it is the sole executor of OVSDB-originated network configuration commands on the Linux platform. The design separates concerns into five distinct libraries linked into the final binary \u2014 the core orchestration layer, the public API, the database abstraction layer, the action execution layer, and the CCSP SSP integration layer. Each layer communicates through well-defined C interfaces, making the component straightforward to unit-test and extend.<\/p>\n\n\n\n<p>The northbound interface to OvsAgent is the OVSDB&nbsp;<code>Gateway_Config<\/code>&nbsp;table. Any RDK-B component that needs to configure a bridge or port inserts a row into this table using the OVS Agent API (<code>ovs_agent_api_interact<\/code>). The southbound interface consists of&nbsp;<code>ovs-vsctl<\/code>\/<code>ovs-ofctl<\/code>&nbsp;commands for OVS bridge management and&nbsp;<code>brctl<\/code>\/<code>ifconfig<\/code>&nbsp;utilities for Linux-native bridge operations, all invoked via&nbsp;<code>v_secure_system<\/code>. The R-BUS connection via&nbsp;<code>libOvsAgentSsp<\/code>&nbsp;allows the agent to resolve CCSP component paths if needed, though the primary communication path is through the Unix socket to OVSDB.<\/p>\n\n\n\n<p>The OVSDB socket layer runs a dedicated listener thread (<code>ovsdb_listen<\/code>) that continuously reads from the socket, parses incoming JSON-RPC messages using the jansson library, and dispatches them to the appropriate receipt or monitor update handlers. The main thread initializes all subsystems in sequence and then enters a sleep loop. Synchronization between the listener thread and the calling thread uses a&nbsp;<code>pthread_cond_t<\/code>\/<code>pthread_mutex_t<\/code>&nbsp;pair with a configurable timeout (<code>OVS_BLOCK_MODE_TIMEOUT_SECS = 3<\/code>&nbsp;seconds).<\/p>\n\n\n\n<p>The agent&#8217;s startup is controlled by the&nbsp;<code>mesh_ovs_enable<\/code>&nbsp;syscfg key, which determines whether the service should launch at boot.<\/p>\n\n\n\n<p>A Component diagram showing the component&#8217;s internal structure and dependencies is given below:<\/p>\n\n\n\n<div class=\"wp-block-merpress-mermaidjs diagram-source-mermaid\"><pre class=\"mermaid\">graph LR\n    subgraph ExtSys [\"External Systems\"]\n        OvsDbSrv[(\"OVSDB Server\\n\/var\/run\/openvswitch\/db.sock\")]\n        CcspBus[(\"R-BUS\")]\n    end\n\n    subgraph OvsAgentProc [\"OvsAgent Process (C, Linux)\"]\n        subgraph Core [\"OvsAgentCore\"]\n            Main[\"OvsAgentMain.c\\nEntry point, sleep loop\"]\n            Agent[\"OvsAgent.c\\nInit\/Deinit orchestration\\ngwconf_mon_cb callback\"]\n            Log[\"OvsAgentLog.c\\nRDK Logger init\\nlog4c \/ rdk_debug\"]\n        end\n\n        subgraph ApiLib [\"libOvsAgentApi\"]\n            Api[\"OvsAgentApi.c\\novs_agent_api_init\/deinit\\novs_agent_api_interact\"]\n            TxMgr[\"transaction_manager.c\\nHash table, max 5 entries\\nUUID-based lifecycle\"]\n        end\n\n        subgraph DbLib [\"libOvsDbApi\"]\n            DbApi[\"OvsDbApi.c\\novsdb_init, ovsdb_write\\novsdb_monitor, ovsdb_delete\"]\n            Sock[\"ovsdb_socket.c\\nUnix socket\\n\/var\/run\/openvswitch\/db.sock\"]\n            Parser[\"ovsdb_parser.c\\nJSON-RPC parsing (jansson)\"]\n            GwJson[\"json_parser\/gateway_config.c\\nGateway_Config serialization\"]\n            FbJson[\"json_parser\/feedback.c\\nFeedback serialization\"]\n            RecvList[\"receipt_list.c\\nPending receipt tracking\"]\n            MonList[\"mon_update_list.c\\nMonitor callback dispatch\"]\n        end\n\n        subgraph ActionLib [\"libOvsAction\"]\n            Action[\"ovs_action.c\\novs_action_gateway_config\\novs_action_init\"]\n            Syscfg[\"syscfg.c\\nSyscfgInit, SyscfgGet\\n(lan_ipaddr)\"]\n        end\n\n        subgraph SspLib [\"libOvsAgentSsp\"]\n            Cosa[\"cosa_api.c\\nCCSP_Message_Bus_Init\\nCcspBaseIf_getParameterValues\"]\n        end\n    end\n\n    subgraph OsLayer [\"System Layer\"]\n        OsNet[\"OS Networking\\novs-vsctl \/ brctl \/ ifconfig\"]\n    end\n\n    OvsDbSrv -->|\"Gateway_Config monitor\"| Sock\n    Main --> Agent\n    Agent --> Log\n    Agent --> Api\n    Agent --> Action\n    Agent --> Cosa\n    Api --> TxMgr\n    Api --> DbApi\n    DbApi --> Sock\n    DbApi --> Parser\n    Parser --> GwJson\n    Parser --> FbJson\n    Parser --> RecvList\n    Parser --> MonList\n    Action --> Syscfg\n    Sock -->|\"JSON-RPC\"| OvsDbSrv\n    Cosa -->|\"R-BUS\"| CcspBus\n    Action -->|\"v_secure_system\"| OsNet\n\n    classDef coreStyle fill:#fce4ec,stroke:#c62828,stroke-width:1px;\n    classDef apiStyle fill:#e1f5fe,stroke:#0277bd,stroke-width:1px;\n    classDef dbStyle fill:#f3e5f5,stroke:#7b1fa2,stroke-width:1px;\n    classDef actionStyle fill:#e8f5e8,stroke:#2e7d32,stroke-width:1px;\n    classDef sspStyle fill:#fff3e0,stroke:#ef6c00,stroke-width:1px;\n    classDef extStyle fill:#eceff1,stroke:#546e7a,stroke-width:1px;\n\n    class Main,Agent,Log coreStyle;\n    class Api,TxMgr apiStyle;\n    class DbApi,Sock,Parser,GwJson,FbJson,RecvList,MonList dbStyle;\n    class Action,Syscfg actionStyle;\n    class Cosa sspStyle;\n    class OvsDbSrv,CcspBus,OsNet extStyle;<\/pre><\/div>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"OpenVirtualSwitchAgent-PrerequisitesandDependencies\">Prerequisites and Dependencies<\/h3>\n\n\n\n<p><strong>Build-Time Flags and Configuration:<\/strong><\/p>\n\n\n\n<p>The following configure options are available during the&nbsp;<code>.\/configure<\/code>&nbsp;step:<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><strong>Configure Option<\/strong><\/td><td><strong>Purpose<\/strong><\/td><td><strong>Default<\/strong><\/td><\/tr><tr><td><code>--enable-gtestapp<\/code><\/td><td>Enables building the GTest unit test applications under&nbsp;<code>source\/test\/<\/code>. When disabled, the test subdirectory is excluded from the build.<\/td><td>Disabled<\/td><\/tr><tr><td><code>--enable-core_net_lib_feature_support<\/code><\/td><td>Enables the core network library (<code>libnet<\/code>) backend in&nbsp;<code>OvsAction<\/code>. When active, bridge creation, port add\/remove, and interface up\/down use&nbsp;<code>libnet<\/code>&nbsp;API calls instead of shell commands.<\/td><td>Disabled<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>RDK-B Platform and Integration Requirements:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Build Dependencies<\/strong>:\u00a0<code>libjansson<\/code>\u00a0(JSON parsing for OVSDB protocol),\u00a0<code>libdbus-1 >= 1.6.18<\/code>\u00a0(R-BUS),\u00a0<code>libsyscfg<\/code>\u00a0(syscfg get\/init),\u00a0<code>libccsp_common<\/code>\u00a0(CCSP base interfaces),\u00a0<code>liblog4c<\/code>\u00a0(RDK logging)<\/li>\n\n\n\n<li><strong>RDK-B Components<\/strong>: Component Registry (must be reachable on R-BUS at startup),\u00a0<code>CcspPsm<\/code>\u00a0(PSM must have written\u00a0<code>\/tmp\/psm_initialized<\/code>\u00a0before OvsAgent starts)<\/li>\n\n\n\n<li><strong>Systemd Services<\/strong>: Deployment may use\u00a0<code>OvsAgent.service<\/code>\u00a0with\u00a0<code>OvsAgent_ovsdb-server.service<\/code>\u00a0ordering, and\u00a0<code>OvsAgent.path<\/code>\u00a0may trigger service start when\u00a0<code>\/tmp\/psm_initialized<\/code>\u00a0is created. This is runtime\/unit-file integration and not an in-repo\u00a0<code>libsystemd<\/code>\u00a0build dependency.<\/li>\n\n\n\n<li><strong>Configuration Files<\/strong>:\u00a0<code>\/etc\/device.properties<\/code>\u00a0must export\u00a0<code>MODEL_NUM<\/code>\u00a0and\u00a0<code>OneWiFiEnabled<\/code>\u00a0into the process environment.\u00a0<code>\/etc\/debug.ini<\/code>\u00a0is read by the RDK logger.<\/li>\n\n\n\n<li><strong>syscfg Keys<\/strong>:\u00a0<code>mesh_ovs_enable<\/code>\u00a0(controls service startup),\u00a0<code>lan_ipaddr<\/code>\u00a0(used for OpenFlow rule generation).<\/li>\n\n\n\n<li><strong>Runtime Indicators<\/strong>:\u00a0<code>\/tmp\/ovsagent_initialized<\/code>\u00a0\u2014 created after successful initialization.\u00a0<code>\/nvram\/enable_ovs_debug<\/code>\u00a0\u2014 enables debug-level logging.<\/li>\n<\/ul>\n\n\n\n<p><strong>Threading Model:<\/strong><\/p>\n\n\n\n<p>OvsAgent runs two threads throughout its process lifetime.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Threading Architecture<\/strong>: Two-threaded. The main thread handles initialization and remains in a\u00a0<code>sleep(30)<\/code>\u00a0loop for the lifetime of the process. The listener thread handles all OVSDB socket I\/O.<\/li>\n\n\n\n<li><strong>Main Thread<\/strong>: Executes the full initialization sequence (<code>OvsAgentInit<\/code>), enters an infinite sleep loop, and runs\u00a0<code>OvsAgentDeinit<\/code>\u00a0on shutdown.<\/li>\n\n\n\n<li><strong>Worker Threads<\/strong>:<\/li>\n\n\n\n<li><strong><code>ovsdb_listen<\/code>\u00a0thread<\/strong>: Created during\u00a0<code>ovsdb_init()<\/code>. Calls\u00a0<code>ovsdb_socket_listen()<\/code>\u00a0in a poll loop with a 100ms timeout. On receiving data, passes the raw buffer to\u00a0<code>ovsdb_parse_msg()<\/code>\u00a0for JSON-RPC message dispatch. Thread exits when\u00a0<code>g_terminate<\/code>\u00a0is set during deinit.<\/li>\n\n\n\n<li><strong>Synchronization<\/strong>: Blocking API calls in\u00a0<code>OvsAgentApi<\/code>\u00a0use a\u00a0<code>pthread_cond_t<\/code>\/<code>pthread_mutex_t<\/code>\u00a0pair per context handle with a 3-second timed wait (<code>OVS_BLOCK_MODE_TIMEOUT_SECS<\/code>). The transaction table is protected by\u00a0<code>ovs_agent_api_mutex<\/code>\u00a0(a static\u00a0<code>PTHREAD_MUTEX_INITIALIZER<\/code>).<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"OpenVirtualSwitchAgent-ComponentStateFlow\">Component State Flow<\/h3>\n\n\n\n<p><strong>Initialization to Active State<\/strong><\/p>\n\n\n\n<p>OvsAgent starts conditionally. The systemd service executes&nbsp;<code>syscfg_check.sh<\/code>&nbsp;to read the&nbsp;<code>mesh_ovs_enable<\/code>&nbsp;syscfg key. If OVS is disabled and neither&nbsp;<code>OneWiFiEnabled<\/code>&nbsp;nor&nbsp;<code>\/etc\/WFO_enabled<\/code>&nbsp;is present, the script exits after touching&nbsp;<code>\/tmp\/ovsagent_initialized<\/code>&nbsp;without launching the binary. When OVS is enabled, the binary initializes each subsystem in order \u2014 RDK Logger, R-BUS, OVSDB API with listener thread, OvsAction with syscfg \u2014 then sets a monitor on the&nbsp;<code>Gateway_Config<\/code>&nbsp;table and creates&nbsp;<code>\/tmp\/ovsagent_initialized<\/code>&nbsp;to signal readiness.<\/p>\n\n\n\n<div class=\"wp-block-merpress-mermaidjs diagram-source-mermaid\"><pre class=\"mermaid\">sequenceDiagram\n    autonumber\n    participant Systemd as systemd\n    participant Script as syscfg_check.sh\n    participant OvsAgent as OvsAgent Process\n    participant OvsDbSrv as OVSDB Server\n    participant Cosa as R-BUS\n    participant Syscfg as syscfg\n\n    Systemd->>Script: ExecStart (OvsAgent.service)\n    Script->>Syscfg: syscfg get mesh_ovs_enable\n    Syscfg-->>Script: value\n\n    alt OVS disabled and OneWiFiEnabled != true and \/etc\/WFO_enabled absent\n        Script->>Script: touch \/tmp\/ovsagent_initialized\n        Script->>Systemd: exit 0 (no OvsAgent binary launched)\n    else OVS enabled\n        Script->>OvsAgent: launch \/usr\/bin\/OvsAgent\n        Note over OvsAgent: main() \u2192 OvsAgentInit()\n\n        OvsAgent->>OvsAgent: OvsAgentLogInit()\n        Note over OvsAgent: rdk_logger_init(\"\/etc\/debug.ini\")\n\n        OvsAgent->>Cosa: Cosa_Init()\n        Cosa-->>OvsAgent: CCSP_Message_Bus_Init success\n\n        OvsAgent->>OvsDbSrv: ovs_agent_api_init(OVS_AGENT_COMPONENT_ID)\n        Note over OvsDbSrv: ovsdb_init \u2192 connect to \/var\/run\/openvswitch\/db.sock\n        Note over OvsDbSrv: spawn ovsdb_listen thread\n        OvsDbSrv-->>OvsAgent: init success\n\n        OvsAgent->>Syscfg: ovs_action_init() \u2192 SyscfgInit()\n        Note over OvsAgent: reads MODEL_NUM, OneWiFiEnabled from env\n\n        OvsAgent->>OvsDbSrv: ovs_agent_api_interact(MONITOR, Gateway_Config)\n        Note over OvsDbSrv: ovsdb_monitor sends JSON-RPC monitor request\n        OvsDbSrv-->>OvsAgent: monitor established\n\n        OvsAgent->>OvsAgent: creat(\"\/tmp\/ovsagent_initialized\")\n        Note over OvsAgent: State: Active \u2014 sleep(30) loop\n\n        loop Runtime\n            OvsDbSrv->>OvsAgent: Gateway_Config update \u2192 gwconf_mon_cb()\n            OvsAgent->>OvsAgent: ovs_action_gateway_config()\n            OvsAgent->>OvsDbSrv: ovs_agent_api_interact(INSERT, Feedback)\n        end\n\n        Systemd->>OvsAgent: stop signal\n        OvsAgent->>OvsAgent: OvsAgentDeinit()\n        OvsAgent->>OvsDbSrv: ovs_agent_api_deinit() \u2192 ovsdb_deinit()\n        OvsAgent->>Cosa: Cosa_Shutdown()\n    end<\/pre><\/div>\n\n\n\n<p><strong>Runtime State Changes and Context Switching<\/strong><\/p>\n\n\n\n<p>OvsAgent does not implement a formal state machine beyond init\/active\/deinit. During active operation, the agent reacts to each&nbsp;<code>Gateway_Config<\/code>&nbsp;monitor update independently.<\/p>\n\n\n\n<p><strong>State Change Triggers:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>A new row inserted into the OVSDB\u00a0<code>Gateway_Config<\/code>\u00a0table by BridgeUtils or MeshAgent triggers\u00a0<code>gwconf_mon_cb()<\/code>\u00a0on the listener thread.<\/li>\n\n\n\n<li>The\u00a0<code>if_cmd<\/code>\u00a0field in\u00a0<code>Gateway_Config<\/code>\u00a0determines the specific operation:\u00a0<code>OVS_IF_UP_CMD<\/code>,\u00a0<code>OVS_IF_DOWN_CMD<\/code>,\u00a0<code>OVS_IF_DELETE_CMD<\/code>, or\u00a0<code>OVS_BR_REMOVE_CMD<\/code>.<\/li>\n\n\n\n<li>The\u00a0<code>parent_bridge<\/code>\u00a0name determines whether OVS or Linux bridge tools are used; for Xfinity WiFi support,\u00a0<code>brlan2<\/code>\u2013<code>brlan5<\/code>,\u00a0<code>brpublic<\/code>,\u00a0<code>bropen6g<\/code>,\u00a0<code>brsecure6g<\/code>\u00a0are handled by Linux bridges.<\/li>\n\n\n\n<li>Presence of\u00a0<code>\/nvram\/enable_ovs_debug<\/code>\u00a0at startup switches the log level from\u00a0<code>RDK_LOG_INFO<\/code>\u00a0to\u00a0<code>RDK_LOG_DEBUG<\/code>.<\/li>\n<\/ul>\n\n\n\n<p><strong>Context Switching Scenarios:<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li>If\u00a0<code>mesh_ovs_enable<\/code>\u00a0is\u00a0<code>false<\/code>\u00a0at service start, the shell script exits without launching the binary, touching\u00a0<code>\/tmp\/ovsagent_initialized<\/code>\u00a0to prevent dependent services from stalling.<\/li>\n\n\n\n<li>On specific Wi-Fi hardware models (<code>OVS_CGM4331COM_MODEL<\/code>,\u00a0<code>OVS_CGA4332COM_MODEL<\/code>,\u00a0<code>OVS_CGM4981COM_MODEL<\/code>,\u00a0<code>OVS_CGM601TCOM_MODEL<\/code>,\u00a0<code>OVS_SG417DBCT_MODEL<\/code>,\u00a0<code>OVS_VTER11QEL_MODEL<\/code>,\u00a0<code>OVS_SR203_MODEL<\/code>), additional OpenFlow flows are configured via\u00a0<code>ovs_setup_brcm_wifi_flows()<\/code>\u00a0after bridge setup.<\/li>\n\n\n\n<li>In warehouse mode (<code>\/tmp\/warehouse_mode<\/code>\u00a0present), the agent skips adding\u00a0<code>eth0<\/code>\u00a0to\u00a0<code>brlan0<\/code>.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"OpenVirtualSwitchAgent-CallFlow\">Call Flow<\/h3>\n\n\n\n<p><strong>Initialization Call Flow:<\/strong><\/p>\n\n\n\n<div class=\"wp-block-merpress-mermaidjs diagram-source-mermaid\"><pre class=\"mermaid\">sequenceDiagram\n    participant Main as OvsAgentMain.c\n    participant Agent as OvsAgent.c\n    participant Log as OvsAgentLog.c\n    participant Cosa as cosa_api.c\n    participant Api as OvsAgentApi.c\n    participant DbApi as OvsDbApi.c\n    participant Action as ovs_action.c\n\n    Main->>Agent: OvsAgentInit()\n    Agent->>Log: OvsAgentLogInit()\n    Log-->>Agent: success\n    Agent->>Cosa: Cosa_Init()\n    Cosa-->>Agent: bus_handle acquired\n    Agent->>Api: ovs_agent_api_init(OVS_AGENT_COMPONENT_ID)\n    Api->>DbApi: ovsdb_init(startingId)\n    DbApi->>DbApi: ovsdb_socket_connect(\"\/var\/run\/openvswitch\/db.sock\")\n    DbApi->>DbApi: pthread_create(ovsdb_listen)\n    DbApi-->>Api: OVS_SUCCESS_STATUS\n    Api->>DbApi: ovsdb_monitor(OVS_FEEDBACK_TABLE, feedback_cb)\n    DbApi-->>Api: monitor request sent\n    Api-->>Agent: init success\n    Agent->>Action: ovs_action_init()\n    Action->>Action: getenv(MODEL_NUM), getenv(OneWiFiEnabled)\n    Action->>Action: SyscfgInit()\n    Action-->>Agent: OVS_SUCCESS_STATUS\n    Agent->>Api: ovs_agent_api_interact(MONITOR, Gateway_Config, gwconf_mon_cb)\n    Api->>DbApi: ovsdb_monitor(OVS_GW_CONFIG_TABLE, ...)\n    DbApi-->>Api: success\n    Api-->>Agent: success\n    Agent->>Agent: creat(\"\/tmp\/ovsagent_initialized\")\n    Agent-->>Main: true\n    Main->>Main: while(1) sleep(30)<\/pre><\/div>\n\n\n\n<p><strong>Request Processing Call Flow:<\/strong><\/p>\n\n\n\n<div class=\"wp-block-merpress-mermaidjs diagram-source-mermaid\"><pre class=\"mermaid\">sequenceDiagram\n    participant Caller as BridgeUtils \/ MeshAgent\n    participant OvsDb as OVSDB Server\n    participant Listener as ovsdb_listen thread\n    participant Parser as ovsdb_parser.c\n    participant MonList as mon_update_list.c\n    participant Agent as OvsAgent.c (gwconf_mon_cb)\n    participant Action as ovs_action.c\n    participant Feedback as OvsAgentApi.c\n\n    Caller->>OvsDb: INSERT into Gateway_Config (JSON-RPC)\n    OvsDb->>Listener: monitor update notification\n    Listener->>Parser: ovsdb_parse_msg(buffer, len)\n    Parser->>Parser: parse JSON-RPC update method\n    Parser->>MonList: mon_list_process(uuid, table_config)\n    MonList->>Agent: gwconf_mon_cb(status, table_config)\n    Agent->>Action: ovs_action_gateway_config(config)\n    Note over Action: determine bridge type (OVS vs Linux)\n    Note over Action: removeExistingInterfacePort()\n    Note over Action: configureParentBridge()\n    Note over Action: ovs_setup_bridge_flows() if OVS bridge\n    Action-->>Agent: OVS_SUCCESS_STATUS \/ OVS_FAILED_STATUS\n    Agent->>Feedback: ovs_agent_api_interact(INSERT, Feedback{uuid, status})\n    Feedback->>OvsDb: INSERT into Feedback table (JSON-RPC)\n    OvsDb-->>Feedback: insert receipt with UUID\n    OvsDb->>Listener: Feedback monitor update\n    Listener->>Parser: ovsdb_parse_msg\n    Parser->>Feedback: ovs_agent_api_monitor_feedback_callback\n    Feedback->>Feedback: complete_transaction(uuid, status)\n    Feedback->>OvsDb: DELETE from Gateway_Config (uuid)\n    Feedback->>OvsDb: DELETE from Feedback (req_uuid)<\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"OpenVirtualSwitchAgent-InternalModules\">Internal Modules<\/h2>\n\n\n\n<p>OvsAgent is organized into five library modules with a single executable entry point. Each library has a clearly scoped responsibility.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><strong>Module\/Class<\/strong><\/td><td><strong>Description<\/strong><\/td><td><strong>Key Files<\/strong><\/td><\/tr><tr><td><strong>OvsAgentCore<\/strong><\/td><td>Entry point and top-level orchestration. Calls each subsystem in initialization order, registers the Gateway_Config monitor callback (<code>gwconf_mon_cb<\/code>), creates the&nbsp;<code>\/tmp\/ovsagent_initialized<\/code>&nbsp;marker on success, and drives the deinit sequence on shutdown.<\/td><td><code>OvsAgentMain.c<\/code>,&nbsp;<code>OvsAgent.c<\/code>,&nbsp;<code>OvsAgentLog.c<\/code>,&nbsp;<code>OvsAgentLog.h<\/code><\/td><\/tr><tr><td><strong>OvsAgentApi<\/strong>&nbsp;(<code>libOvsAgentApi<\/code>)<\/td><td>Public interaction API consumed by other RDK-B components. Manages the component lifecycle (<code>ovs_agent_api_init\/deinit<\/code>), serializes requests to the OvsDbApi, tracks each request through a hash-table-based transaction manager (max 5 concurrent entries), and handles timed blocking waits for feedback.<\/td><td><code>OvsAgentApi.c<\/code>,&nbsp;<code>transaction_manager.c<\/code>,&nbsp;<code>transaction_interface.h<\/code><\/td><\/tr><tr><td><strong>OvsDbApi<\/strong>&nbsp;(<code>libOvsDbApi<\/code>)<\/td><td>OVSDB protocol abstraction. Manages the Unix domain socket connection to the OVSDB server, runs the&nbsp;<code>ovsdb_listen<\/code>&nbsp;listener thread, serializes&nbsp;<code>Gateway_Config<\/code>&nbsp;and&nbsp;<code>Feedback<\/code>&nbsp;records to JSON-RPC using jansson, and dispatches received messages to receipt and monitor update lists.<\/td><td><code>OvsDbApi.c<\/code>,&nbsp;<code>ovsdb_socket.c<\/code>,&nbsp;<code>ovsdb_parser.c<\/code>,&nbsp;<code>receipt_list.c<\/code>,&nbsp;<code>mon_update_list.c<\/code>,&nbsp;<code>json_parser\/gateway_config.c<\/code>,&nbsp;<code>json_parser\/feedback.c<\/code><\/td><\/tr><tr><td><strong>OvsAction<\/strong>&nbsp;(<code>libOvsAction<\/code>)<\/td><td>Network operation execution. Reads device model and&nbsp;<code>OneWiFiEnabled<\/code>&nbsp;flag from environment variables and initializes syscfg at startup. Translates each&nbsp;<code>Gateway_Config<\/code>&nbsp;record into the appropriate&nbsp;<code>ovs-vsctl<\/code>,&nbsp;<code>brctl<\/code>, or&nbsp;<code>ifconfig<\/code>&nbsp;command (or&nbsp;<code>libnet<\/code>&nbsp;API calls when&nbsp;<code>CORE_NET_LIB<\/code>&nbsp;is defined). Handles OpenFlow flow setup for specific Wi-Fi hardware models and Mesh scenarios.<\/td><td><code>ovs_action.c<\/code>,&nbsp;<code>ovs_action.h<\/code>,&nbsp;<code>syscfg.c<\/code>,&nbsp;<code>syscfg.h<\/code><\/td><\/tr><tr><td><strong>OvsAgentSsp<\/strong>&nbsp;(<code>libOvsAgentSsp<\/code>)<\/td><td>CCSP Service Support Platform integration. Initializes the R-BUS connection, exposes helpers to discover CCSP component paths (<code>Cosa_FindDestComp<\/code>) and retrieve parameter values (<code>Cosa_GetParamValues<\/code>), and cleanly shuts down the bus handle.<\/td><td><code>cosa_api.c<\/code>,&nbsp;<code>cosa_api.h<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"OpenVirtualSwitchAgent-ComponentInteractions\">Component Interactions<\/h2>\n\n\n\n<p>OvsAgent communicates with the OVSDB server over a Unix domain socket using JSON-RPC, with the&nbsp;<code>ovsdb_listen<\/code>&nbsp;thread handling all incoming messages. Network operations are executed through&nbsp;<code>v_secure_system<\/code>&nbsp;shell commands targeting&nbsp;<code>ovs-vsctl<\/code>,&nbsp;<code>brctl<\/code>, or&nbsp;<code>ifconfig<\/code>. The R-BUS connection initialized via&nbsp;<code>libOvsAgentSsp<\/code>&nbsp;enables CCSP component path resolution at startup.<\/p>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"OpenVirtualSwitchAgent-InteractionMatrix\">Interaction Matrix<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><strong>Target Component\/Layer<\/strong><\/td><td><strong>Interaction Purpose<\/strong><\/td><td><strong>Key APIs\/Endpoints<\/strong><\/td><\/tr><tr><td><strong>RDK-B Middleware Components<\/strong><\/td><td><\/td><td><\/td><\/tr><tr><td>OVSDB Server (<code>ovsdb-server<\/code>)<\/td><td>Primary communication channel. Receives&nbsp;<code>Gateway_Config<\/code>&nbsp;monitor updates; sends&nbsp;<code>Feedback<\/code>&nbsp;inserts and cleanup deletes.<\/td><td>Unix socket&nbsp;<code>\/var\/run\/openvswitch\/db.sock<\/code>, JSON-RPC&nbsp;<code>transact<\/code>,&nbsp;<code>monitor<\/code>,&nbsp;<code>monitor_cancel<\/code>&nbsp;methods<\/td><\/tr><tr><td>BridgeUtils<\/td><td>Indirect; inserts&nbsp;<code>Gateway_Config<\/code>&nbsp;rows that OvsAgent monitors. OvsAgent does not call BridgeUtils directly.<\/td><td>OVSDB&nbsp;<code>Gateway_Config<\/code>&nbsp;table (consumer side)<\/td><\/tr><tr><td>MeshAgent<\/td><td>Indirect; inserts&nbsp;<code>Gateway_Config<\/code>&nbsp;rows for Mesh networking bridge setup. OvsAgent sends Feedback on completion.<\/td><td>OVSDB&nbsp;<code>Gateway_Config<\/code>&nbsp;table (consumer side), OVSDB&nbsp;<code>Feedback<\/code>&nbsp;table<\/td><\/tr><tr><td>Component Registry<\/td><td>CCSP Component Registry \u2014 used during&nbsp;<code>Cosa_Init()<\/code>&nbsp;to establish R-BUS bus handle.<\/td><td><code>CCSP_Message_Bus_Init()<\/code>,&nbsp;<code>CcspBaseIf_discComponentSupportingNamespace()<\/code><\/td><\/tr><tr><td>CcspPsm<\/td><td>Startup gate \u2014 OvsAgent service requires&nbsp;<code>\/tmp\/psm_initialized<\/code>&nbsp;to exist before it starts. No direct API calls to PSM at runtime.<\/td><td><code>ConditionPathExists=\/tmp\/psm_initialized<\/code>&nbsp;(systemd)<\/td><\/tr><tr><td><strong>System &amp; Platform Layer<\/strong><\/td><td><\/td><td><\/td><\/tr><tr><td>syscfg (NVRAM)<\/td><td>Reads&nbsp;<code>lan_ipaddr<\/code>&nbsp;for OpenFlow rule construction;&nbsp;<code>SyscfgInit()<\/code>&nbsp;called once in&nbsp;<code>ovs_action_init()<\/code>.<\/td><td><code>SyscfgInit()<\/code>,&nbsp;<code>SyscfgGet(\"lan_ipaddr\", ...)<\/code>&nbsp;in&nbsp;<code>ovs_action.c<\/code><\/td><\/tr><tr><td><code>\/etc\/device.properties<\/code><\/td><td>Source of&nbsp;<code>MODEL_NUM<\/code>&nbsp;and&nbsp;<code>OneWiFiEnabled<\/code>&nbsp;flags used to select OVS flow configuration paths. Read via&nbsp;<code>getenv()<\/code>.<\/td><td><code>getenv(\"MODEL_NUM\")<\/code>,&nbsp;<code>getenv(\"OneWiFiEnabled\")<\/code><\/td><\/tr><tr><td><code>ovs-vsctl<\/code>&nbsp;\/&nbsp;<code>ovs-ofctl<\/code><\/td><td>Executes OVS bridge\/port management and OpenFlow rule setup via shell command.<\/td><td><code>v_secure_system(\"ovs-vsctl add-br ...\")<\/code>,&nbsp;<code>v_secure_system(\"ovs-ofctl ...\")<\/code><\/td><\/tr><tr><td><code>brctl<\/code>&nbsp;\/&nbsp;<code>ifconfig<\/code><\/td><td>Executes Linux-native bridge and interface commands for non-OVS bridges.<\/td><td><code>v_secure_system(\"brctl addbr ...\")<\/code>,&nbsp;<code>v_secure_system(\"ifconfig ...\")<\/code><\/td><\/tr><tr><td><code>libnet<\/code>&nbsp;(optional)<\/td><td>When built with&nbsp;<code>CORE_NET_LIB<\/code>&nbsp;defined, replaces&nbsp;<code>brctl<\/code>\/<code>ifconfig<\/code>&nbsp;shell calls with&nbsp;<code>libnet<\/code>&nbsp;API calls for bridge and interface operations.<\/td><td><code>bridge_create()<\/code>,&nbsp;<code>interface_add_to_bridge()<\/code>,&nbsp;<code>interface_up()<\/code>,&nbsp;<code>interface_down()<\/code>,&nbsp;<code>interface_remove_from_bridge()<\/code><\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>Note:<\/strong>&nbsp;No configuration changes are persisted across reboots by OvsAgent itself.&nbsp;<code>SyscfgGet<\/code>&nbsp;is used read-only for&nbsp;<code>lan_ipaddr<\/code>. The&nbsp;<code>mesh_ovs_enable<\/code>&nbsp;syscfg key that gates service startup is written and managed by other components.<\/p>\n\n\n\n<p><strong>Major Events Published by OvsAgent:<\/strong><\/p>\n\n\n\n<p>OvsAgent does not publish R-BUS or CCSP events. Its output channel is inserting rows into the OVSDB&nbsp;<code>Feedback<\/code>&nbsp;table over the Unix socket.<\/p>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><strong>Output<\/strong><\/td><td><strong>Target<\/strong><\/td><td><strong>Trigger Condition<\/strong><\/td><td><strong>Description<\/strong><\/td><\/tr><tr><td>OVSDB&nbsp;<code>Feedback<\/code>&nbsp;INSERT<\/td><td>OVSDB Server \u2192 BridgeUtils \/ MeshAgent (monitor)<\/td><td>After each&nbsp;<code>Gateway_Config<\/code>&nbsp;operation completes<\/td><td>Contains&nbsp;<code>req_uuid<\/code>&nbsp;(matching the processed&nbsp;<code>Gateway_Config<\/code>&nbsp;row) and&nbsp;<code>status<\/code>&nbsp;(<code>OVS_SUCCESS_STATUS<\/code>&nbsp;or&nbsp;<code>OVS_FAILED_STATUS<\/code>)<\/td><\/tr><tr><td>OVSDB&nbsp;<code>Gateway_Config<\/code>&nbsp;DELETE<\/td><td>OVSDB Server<\/td><td>After Feedback monitor callback confirms completion<\/td><td>Cleans the processed request row from the table<\/td><\/tr><tr><td>OVSDB&nbsp;<code>Feedback<\/code>&nbsp;DELETE<\/td><td>OVSDB Server<\/td><td>After Feedback monitor callback confirms completion<\/td><td>Cleans the feedback row from the table<\/td><\/tr><tr><td><code>\/tmp\/ovsagent_initialized<\/code>&nbsp;(file)<\/td><td>Dependent systemd units \/ shell scripts<\/td><td>After&nbsp;<code>OvsAgentInit()<\/code>&nbsp;succeeds, or when OVS is disabled at startup<\/td><td>Marker file indicating OvsAgent is ready or has determined it should not run<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"OpenVirtualSwitchAgent-IPCFlowPatterns\">IPC Flow Patterns<\/h3>\n\n\n\n<p><strong>Primary IPC Flow \u2014 Gateway Config Request and Feedback:<\/strong><\/p>\n\n\n\n<div class=\"wp-block-merpress-mermaidjs diagram-source-mermaid\"><pre class=\"mermaid\">sequenceDiagram\n    participant Caller as BridgeUtils \/ MeshAgent\n    participant OvsDb as OVSDB Server\n    participant OvsAgent as OvsAgent\n    participant OS as OS Networking (ovs-vsctl \/ brctl)\n\n    Caller->>OvsDb: JSON-RPC transact (INSERT Gateway_Config)\n    Note over OvsDb: Row inserted with UUID\n    OvsDb->>OvsAgent: JSON-RPC monitor update (Gateway_Config row)\n    Note over OvsAgent: gwconf_mon_cb() invoked on listener thread\n    OvsAgent->>OS: v_secure_system (ovs-vsctl \/ brctl command)\n    OS-->>OvsAgent: command result\n    OvsAgent->>OvsDb: JSON-RPC transact (INSERT Feedback {req_uuid, status})\n    OvsDb->>OvsAgent: JSON-RPC monitor update (Feedback row)\n    Note over OvsAgent: ovs_agent_api_monitor_feedback_callback()\n    OvsAgent->>OvsDb: JSON-RPC transact (DELETE Gateway_Config by uuid)\n    OvsAgent->>OvsDb: JSON-RPC transact (DELETE Feedback by req_uuid)<\/pre><\/div>\n\n\n\n<h2 class=\"wp-block-heading\" id=\"OpenVirtualSwitchAgent-ImplementationDetails\">Implementation Details<\/h2>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"OpenVirtualSwitchAgent-KeyImplementationLogic\">Key Implementation Logic<\/h3>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Bridge Backend Selection<\/strong>: In\u00a0<code>ovs_modifyParentBridge()<\/code>\u00a0(<a href=\"https:\/\/wiki.rdkcentral.com\/source\/OvsAction\/ovs_action.c#L1178-L1186\">ovs_action.c<\/a>), the bridge name is checked against a hard-coded list (<code>brlan2<\/code>\u2013<code>brlan5<\/code>,\u00a0<code>brpublic<\/code>,\u00a0<code>bropen6g<\/code>,\u00a0<code>brsecure6g<\/code>) to meet Xfinity WiFi requirements. These bridges use Linux bridge utilities. All other bridges use\u00a0<code>ovs-vsctl<\/code>.<\/li>\n\n\n\n<li><strong>OpenFlow Flow Setup<\/strong>: After creating or modifying a bridge,\u00a0<code>ovs_setup_bridge_flows()<\/code>\u00a0is called. For specific Wi-Fi hardware models (identified as\u00a0<code>OVS_CGM4331COM_MODEL<\/code>,\u00a0<code>OVS_CGA4332COM_MODEL<\/code>,\u00a0<code>OVS_CGM4981COM_MODEL<\/code>,\u00a0<code>OVS_CGM601TCOM_MODEL<\/code>,\u00a0<code>OVS_SG417DBCT_MODEL<\/code>,\u00a0<code>OVS_VTER11QEL_MODEL<\/code>,\u00a0<code>OVS_SR203_MODEL<\/code>),\u00a0<code>ovs_setup_brcm_wifi_flows()<\/code>\u00a0sets up OpenFlow flows. Additional flows handle Mesh fast-roaming scenarios.<\/li>\n\n\n\n<li><strong>Transaction Manager<\/strong>: Uses a fixed-size hash table in\u00a0<code>transaction_manager.c<\/code>\u00a0with a maximum of 5 concurrent entries (<code>MAX_TABLE_SIZE = 5<\/code>), keyed by a string request ID (<code>rid<\/code>). States:\u00a0<code>TRANSACTION_INIT_ST<\/code>\u00a0\u2192\u00a0<code>TRANSACTION_UUID_RECV_ST<\/code>\u00a0\u2192\u00a0<code>TRANSACTION_COMPLETE_ST<\/code>.<\/li>\n\n\n\n<li><strong>Blocking Mode Timeout<\/strong>:\u00a0<code>wait_for_callback_completion()<\/code>\u00a0in\u00a0<code>OvsAgentApi.c<\/code>\u00a0uses\u00a0<code>pthread_cond_timedwait<\/code>\u00a0with a 3-second timeout (<code>OVS_BLOCK_MODE_TIMEOUT_SECS<\/code>). On timeout,\u00a0<code>OVS_TIMED_OUT_STATUS<\/code>\u00a0is returned.<\/li>\n\n\n\n<li><strong>Warehouse Mode Guard<\/strong>: In\u00a0<code>configureParentBridge()<\/code>, if\u00a0<code>if_name<\/code>\u00a0is\u00a0<code>eth0<\/code>\u00a0and the target bridge is\u00a0<code>brlan0<\/code>\u00a0and\u00a0<code>\/tmp\/warehouse_mode<\/code>\u00a0exists, port addition is skipped to avoid modifying the network in warehouse mode.<\/li>\n\n\n\n<li><strong>Logging and Debug<\/strong>:\u00a0<code>OvsAgentLog.c<\/code>\u00a0initializes RDK Logger from\u00a0<code>\/etc\/debug.ini<\/code>. Log channel is\u00a0<code>LOG.RDK.OVSAGENT<\/code>. Debug logging is enabled at runtime by creating\u00a0<code>\/nvram\/enable_ovs_debug<\/code>.<\/li>\n\n\n\n<li><strong>Error Handling<\/strong>: Each initialization step in\u00a0<code>OvsAgentInit()<\/code>\u00a0performs a teardown of previously initialized subsystems before returning\u00a0<code>false<\/code>. The\u00a0<code>OvsAgent.service<\/code>\u00a0systemd unit has\u00a0<code>Restart=on-failure<\/code>, so the process will be restarted by systemd if it exits with a non-zero return code.<\/li>\n<\/ul>\n\n\n\n<h3 class=\"wp-block-heading\" id=\"OpenVirtualSwitchAgent-KeyConfigurationFiles\">Key Configuration Files<\/h3>\n\n\n\n<figure class=\"wp-block-table\"><table class=\"has-fixed-layout\"><tbody><tr><td><strong>Configuration File<\/strong><\/td><td><strong>Purpose<\/strong><\/td><td><strong>Override Mechanisms<\/strong><\/td><\/tr><tr><td><code>\/etc\/device.properties<\/code><\/td><td>Supplies&nbsp;<code>MODEL_NUM<\/code>&nbsp;(device model identifier) and&nbsp;<code>OneWiFiEnabled<\/code>&nbsp;flag via environment variables injected by the systemd unit (<code>EnvironmentFile=<\/code>).<\/td><td>Replaced per platform at image build time.<\/td><\/tr><tr><td><code>\/etc\/debug.ini<\/code><\/td><td>RDK Logger configuration, read during&nbsp;<code>OvsAgentLogInit()<\/code>.<\/td><td>N\/A<\/td><\/tr><tr><td><code>\/tmp\/ccsp_msg.cfg<\/code><\/td><td>R-BUS configuration file, read by&nbsp;<code>CCSP_Message_Bus_Init()<\/code>&nbsp;in&nbsp;<code>cosa_api.c<\/code>.<\/td><td>Written at runtime by CCSP infrastructure before OvsAgent starts.<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>Configuration Persistence:<\/strong><\/p>\n\n\n\n<p><code>OvsAgent<\/code>&nbsp;reads&nbsp;<code>lan_ipaddr<\/code>&nbsp;from syscfg via&nbsp;<code>SyscfgGet()<\/code>&nbsp;in&nbsp;<code>ovs_action.c<\/code>. This is a read-only operation. No syscfg keys are written or committed by OvsAgent. The&nbsp;<code>mesh_ovs_enable<\/code>&nbsp;key that gates service startup is read exclusively by the&nbsp;<code>syscfg_check.sh<\/code>&nbsp;shell script, not by the C binary. Network interface and bridge configurations applied by OvsAgent are not persisted to any store \u2014 they are re-applied from OVSDB state on each service start.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Open Virtual Switch Agent (OvsAgent) is the RDK-B component responsible for translating network bridge configuration [&hellip;]<\/p>\n","protected":false},"author":659,"featured_media":0,"parent":9575,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"_bbp_topic_count":0,"_bbp_reply_count":0,"_bbp_total_topic_count":0,"_bbp_total_reply_count":0,"_bbp_voice_count":0,"_bbp_anonymous_reply_count":0,"_bbp_topic_count_hidden":0,"_bbp_reply_count_hidden":0,"_bbp_forum_subforum_count":0,"footnotes":""},"class_list":["post-12883","page","type-page","status-publish","hentry"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v24.9 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Open Virtual Switch Agent - RDK Documentation Portal | Documentation<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_broadband_documentation\/components\/open-virtual-switch-agent\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Open Virtual Switch Agent - RDK Documentation Portal | Documentation\" \/>\n<meta property=\"og:description\" content=\"Open Virtual Switch Agent (OvsAgent) is the RDK-B component responsible for translating network bridge configuration [&hellip;]\" \/>\n<meta property=\"og:url\" content=\"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_broadband_documentation\/components\/open-virtual-switch-agent\/\" \/>\n<meta property=\"og:site_name\" content=\"RDK Documentation Portal | Documentation\" \/>\n<meta property=\"article:modified_time\" content=\"2026-05-04T10:33:08+00:00\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"9 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_broadband_documentation\/components\/open-virtual-switch-agent\/\",\"url\":\"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_broadband_documentation\/components\/open-virtual-switch-agent\/\",\"name\":\"Open Virtual Switch Agent - RDK Documentation Portal | Documentation\",\"isPartOf\":{\"@id\":\"https:\/\/developer.rdkcentral.com\/documentation\/#website\"},\"datePublished\":\"2026-05-04T10:31:22+00:00\",\"dateModified\":\"2026-05-04T10:33:08+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_broadband_documentation\/components\/open-virtual-switch-agent\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_broadband_documentation\/components\/open-virtual-switch-agent\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_broadband_documentation\/components\/open-virtual-switch-agent\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/developer.rdkcentral.com\/documentation\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Documentation\",\"item\":\"https:\/\/developer.rdkcentral.com\/documentation\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"RDK Broadband\",\"item\":\"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_broadband_documentation\/\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Components\",\"item\":\"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_broadband_documentation\/components\/\"},{\"@type\":\"ListItem\",\"position\":5,\"name\":\"Open Virtual Switch Agent\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/developer.rdkcentral.com\/documentation\/#website\",\"url\":\"https:\/\/developer.rdkcentral.com\/documentation\/\",\"name\":\"RDK Documentation Portal | Documentation\",\"description\":\"\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/developer.rdkcentral.com\/documentation\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Open Virtual Switch Agent - RDK Documentation Portal | Documentation","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_broadband_documentation\/components\/open-virtual-switch-agent\/","og_locale":"en_US","og_type":"article","og_title":"Open Virtual Switch Agent - RDK Documentation Portal | Documentation","og_description":"Open Virtual Switch Agent (OvsAgent) is the RDK-B component responsible for translating network bridge configuration [&hellip;]","og_url":"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_broadband_documentation\/components\/open-virtual-switch-agent\/","og_site_name":"RDK Documentation Portal | Documentation","article_modified_time":"2026-05-04T10:33:08+00:00","twitter_card":"summary_large_image","twitter_misc":{"Est. reading time":"9 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_broadband_documentation\/components\/open-virtual-switch-agent\/","url":"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_broadband_documentation\/components\/open-virtual-switch-agent\/","name":"Open Virtual Switch Agent - RDK Documentation Portal | Documentation","isPartOf":{"@id":"https:\/\/developer.rdkcentral.com\/documentation\/#website"},"datePublished":"2026-05-04T10:31:22+00:00","dateModified":"2026-05-04T10:33:08+00:00","breadcrumb":{"@id":"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_broadband_documentation\/components\/open-virtual-switch-agent\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_broadband_documentation\/components\/open-virtual-switch-agent\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_broadband_documentation\/components\/open-virtual-switch-agent\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/developer.rdkcentral.com\/documentation\/"},{"@type":"ListItem","position":2,"name":"Documentation","item":"https:\/\/developer.rdkcentral.com\/documentation\/"},{"@type":"ListItem","position":3,"name":"RDK Broadband","item":"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_broadband_documentation\/"},{"@type":"ListItem","position":4,"name":"Components","item":"https:\/\/developer.rdkcentral.com\/documentation\/documentation\/rdk_broadband_documentation\/components\/"},{"@type":"ListItem","position":5,"name":"Open Virtual Switch Agent"}]},{"@type":"WebSite","@id":"https:\/\/developer.rdkcentral.com\/documentation\/#website","url":"https:\/\/developer.rdkcentral.com\/documentation\/","name":"RDK Documentation Portal | Documentation","description":"","potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/developer.rdkcentral.com\/documentation\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"}]}},"_links":{"self":[{"href":"https:\/\/developer.rdkcentral.com\/documentation\/wp-json\/wp\/v2\/pages\/12883","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/developer.rdkcentral.com\/documentation\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/developer.rdkcentral.com\/documentation\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/developer.rdkcentral.com\/documentation\/wp-json\/wp\/v2\/users\/659"}],"replies":[{"embeddable":true,"href":"https:\/\/developer.rdkcentral.com\/documentation\/wp-json\/wp\/v2\/comments?post=12883"}],"version-history":[{"count":1,"href":"https:\/\/developer.rdkcentral.com\/documentation\/wp-json\/wp\/v2\/pages\/12883\/revisions"}],"predecessor-version":[{"id":12884,"href":"https:\/\/developer.rdkcentral.com\/documentation\/wp-json\/wp\/v2\/pages\/12883\/revisions\/12884"}],"up":[{"embeddable":true,"href":"https:\/\/developer.rdkcentral.com\/documentation\/wp-json\/wp\/v2\/pages\/9575"}],"wp:attachment":[{"href":"https:\/\/developer.rdkcentral.com\/documentation\/wp-json\/wp\/v2\/media?parent=12883"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}