On 19.03.2019 12:23, Eelco Chaudron wrote:
> When debugging an issue we noticed that by accident someone has changes the
> bridge datapath_type to netdev, where it's clearly a kernel (system bridge)
> with physical and tap devices. Unfortunately, this is not something you
> will easily spot, as the bridge datapath type value is not shown by default.
>
> In addition, OVS is not warning you about this potential mismatch in
> interface and bridge datapath.
>
> I'm sending out this patch as an RFC as I could not find a clear
> demarcation between bridge datapath types and interface datapath types.
> The patch below will at least warn for netdev bridges with system
> interfaces. But no warning will be given for some unsupported virtual
> interfaces. For system bridges, the dpdk types will no be recognized as
> system/virtual interfaces (unless the name exists) which will result in
> an error.
>
> Signed-off-by: Eelco Chaudron <[email protected]>
> ---
Hi.
Hmm. What do you mean under misconfiguration?
In practice, userspace datapath is able to open "system" type netdevs.
It's supported by netdev-linux to open system network devices via socket.
And these devices has "system" type.
On 'datapath_type' changes, bridge/ofproto will be destroyed and re-created.
All the ports from kernel datapath will be destroyed and new ones created
in userspace. All the ports should still work as usual.
The only possible issue will be that this bridge will no longer communicate
with other bridges, because they're in different datapaths now.
So, below warning will be printed on any attempt to add legitimate
system network interface to the userspace bridge.
"system" devices supported by both datapaths, but "dpdk" devices supported
only by userspace, that is why you see the error in case of changing to
'datapath_type=system'.
Maybe I'm missing something? What is the issue you're trying to address?
Best regards, Ilya Maximets.
> vswitchd/bridge.c | 6 ++++++
> 1 file changed, 6 insertions(+)
>
> diff --git a/vswitchd/bridge.c b/vswitchd/bridge.c
> index a427b0122..42c33d1d9 100644
> --- a/vswitchd/bridge.c
> +++ b/vswitchd/bridge.c
> @@ -1808,6 +1808,12 @@ iface_do_create(const struct bridge *br,
> goto error;
> }
>
> + if (!iface_is_internal(iface_cfg, br->cfg)
> + && !strcmp(br->type, "netdev")
> + && !strcmp(netdev_get_type(netdev), "system")) {
> + VLOG_WARN("bridge %s: interface %s is a system type where the bridge
> "
> + "is a netdev one", br->name, iface_cfg->name);
> + }
> VLOG_INFO("bridge %s: added interface %s on port %d",
> br->name, iface_cfg->name, *ofp_portp);
>
>
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev