Message ID | 20170217111010.12064-1-aserdean@cloudbasesolutions.com |
---|---|
State | Accepted |
Headers | show |
On 17 February 2017 at 03:10, Alin Serdean <aserdean@cloudbasesolutions.com> wrote: > Commit fa07525f9cf3fa698ebc23ea09da477d3d881a87 fixed error logging for > for regular netdevs, however it overlooked "internal" netdevs. > > This patch allows "internal" netdev objects to be created and passed to > dpif_port_add(). > > Reported-by: Nithin Raju <nithin@vmware.com> > Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> > --- > Intended for branch-2.5,branch-2.6,branch-2.7,master > Thanks, applied to all the above branches. > --- > lib/netdev-windows.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/lib/netdev-windows.c b/lib/netdev-windows.c > index b22bd09..375cb32 100644 > --- a/lib/netdev-windows.c > +++ b/lib/netdev-windows.c > @@ -159,7 +159,10 @@ netdev_windows_system_construct(struct netdev > *netdev_) > > /* Query the attributes and runtime status of the netdev. */ > ret = query_netdev(netdev_get_name(&netdev->up), &info, &buf); > - if (ret) { > + /* "Internal" netdevs do not exist in the kernel yet. They need to be > + * transformed into a netdev object and passed to dpif_port_add(), > which > + * will add them to the kernel. */ > + if (strcmp(netdev_get_type(&netdev->up), "internal") && ret) { > return ret; > } > ofpbuf_delete(buf); > -- > 2.10.2.windows.1 > _______________________________________________ > dev mailing list > dev@openvswitch.org > https://mail.openvswitch.org/mailman/listinfo/ovs-dev >
On 17 February 2017 at 03:10, Alin Serdean <aserdean@cloudbasesolutions.com> wrote: > Commit fa07525f9cf3fa698ebc23ea09da477d3d881a87 fixed error logging for > for regular netdevs, however it overlooked "internal" netdevs. > > This patch allows "internal" netdev objects to be created and passed to > dpif_port_add(). > > Reported-by: Nithin Raju <nithin@vmware.com> > Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> > --- In future, please title commits as for how it changes the codebase, rather than current status. For instance, for this commit: "windows: Fix broken internal netdevs." This makes it easier to read through git logs and understand the changes occurring over time (and most commit titles are written this way.) Thanks!
> -----Original Message----- > From: Joe Stringer [mailto:joe@ovn.org] > Sent: Wednesday, February 22, 2017 11:00 PM > To: Alin Serdean <aserdean@cloudbasesolutions.com> > Cc: dev@openvswitch.org > Subject: Re: [ovs-dev] [PATCH] windows: Broken internal netdevs > > On 17 February 2017 at 03:10, Alin Serdean > <aserdean@cloudbasesolutions.com> wrote: > > Commit fa07525f9cf3fa698ebc23ea09da477d3d881a87 fixed error logging > > for for regular netdevs, however it overlooked "internal" netdevs. > > > > This patch allows "internal" netdev objects to be created and passed > > to dpif_port_add(). > > > > Reported-by: Nithin Raju <nithin@vmware.com> > > Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> > > --- > > In future, please title commits as for how it changes the codebase, rather > than current status. For instance, for this commit: "windows: > Fix broken internal netdevs." This makes it easier to read through git logs and > understand the changes occurring over time (and most commit titles are > written this way.) > > Thanks! [Alin Serdean] Sorry! I'll keep it in mind for the next commits.
diff --git a/lib/netdev-windows.c b/lib/netdev-windows.c index b22bd09..375cb32 100644 --- a/lib/netdev-windows.c +++ b/lib/netdev-windows.c @@ -159,7 +159,10 @@ netdev_windows_system_construct(struct netdev *netdev_) /* Query the attributes and runtime status of the netdev. */ ret = query_netdev(netdev_get_name(&netdev->up), &info, &buf); - if (ret) { + /* "Internal" netdevs do not exist in the kernel yet. They need to be + * transformed into a netdev object and passed to dpif_port_add(), which + * will add them to the kernel. */ + if (strcmp(netdev_get_type(&netdev->up), "internal") && ret) { return ret; } ofpbuf_delete(buf);
Commit fa07525f9cf3fa698ebc23ea09da477d3d881a87 fixed error logging for for regular netdevs, however it overlooked "internal" netdevs. This patch allows "internal" netdev objects to be created and passed to dpif_port_add(). Reported-by: Nithin Raju <nithin@vmware.com> Signed-off-by: Alin Gabriel Serdean <aserdean@cloudbasesolutions.com> --- Intended for branch-2.5,branch-2.6,branch-2.7,master --- lib/netdev-windows.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-)