diff mbox series

[06/11] net/netvsc: request HV_UIO to open sub-channels

Message ID 20210927134231.11177-7-srikanth.k@oneconvergence.com (mailing list archive)
State New
Delegated to: Thomas Monjalon
Headers show
Series add FreeBSD support to VMBUS & NetVSC PMDs | expand

Checks

Context Check Description
ci/checkpatch success coding style OK

Commit Message

Srikanth Kaka Sept. 27, 2021, 1:42 p.m. UTC
On Linux, the request does nothing, while on FreeBSD the HV_UIO
kernel driver receives the request and opens the subchannels on
PMDs behalf.

Signed-off-by: Srikanth Kaka <srikanth.k@oneconvergence.com>
Signed-off-by: Vag Singh <vag.singh@oneconvergence.com>
Signed-off-by: Anand Thulasiram <avelu@juniper.net>
---
 drivers/net/netvsc/hn_ethdev.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Long Li Sept. 30, 2021, 11:19 p.m. UTC | #1
> Subject: [PATCH 06/11] net/netvsc: request HV_UIO to open sub-channels
> 
> [You don't often get email from srikanth.k@oneconvergence.com. Learn
> why this is important at http://aka.ms/LearnAboutSenderIdentification.]
> 
> On Linux, the request does nothing, while on FreeBSD the HV_UIO kernel
> driver receives the request and opens the subchannels on PMDs behalf.
> 
> Signed-off-by: Srikanth Kaka <srikanth.k@oneconvergence.com>
> Signed-off-by: Vag Singh <vag.singh@oneconvergence.com>
> Signed-off-by: Anand Thulasiram <avelu@juniper.net>
> ---
>  drivers/net/netvsc/hn_ethdev.c | 4 ++++
>  1 file changed, 4 insertions(+)
> 
> diff --git a/drivers/net/netvsc/hn_ethdev.c
> b/drivers/net/netvsc/hn_ethdev.c index 9e2a405973..6f9053c4d5 100644
> --- a/drivers/net/netvsc/hn_ethdev.c
> +++ b/drivers/net/netvsc/hn_ethdev.c
> @@ -515,6 +515,10 @@ static int hn_subchan_configure(struct hn_data *hv,
>         if (err)
>                 return  err;
> 
> +       err = rte_vmbus_ioctl(hv->vmbus, subchan);
> +       if (err)
> +               return  err;
> +

Now I see why you return 0 for Linux. Can you add a comment to say this function is not used and should always succeed in Linux?

>         while (subchan > 0) {
>                 struct vmbus_channel *new_sc;
>                 uint16_t chn_index;
> --
> 2.30.2
Srikanth Kaka Oct. 1, 2021, 5:31 a.m. UTC | #2
Sure. I will add the comment in v2.

Regards,
Srikanth


On Fri, Oct 1, 2021 at 4:49 AM Long Li <longli@microsoft.com> wrote:

> > Subject: [PATCH 06/11] net/netvsc: request HV_UIO to open sub-channels
> >
> > [You don't often get email from srikanth.k@oneconvergence.com. Learn
> > why this is important at http://aka.ms/LearnAboutSenderIdentification.]
> >
> > On Linux, the request does nothing, while on FreeBSD the HV_UIO kernel
> > driver receives the request and opens the subchannels on PMDs behalf.
> >
> > Signed-off-by: Srikanth Kaka <srikanth.k@oneconvergence.com>
> > Signed-off-by: Vag Singh <vag.singh@oneconvergence.com>
> > Signed-off-by: Anand Thulasiram <avelu@juniper.net>
> > ---
> >  drivers/net/netvsc/hn_ethdev.c | 4 ++++
> >  1 file changed, 4 insertions(+)
> >
> > diff --git a/drivers/net/netvsc/hn_ethdev.c
> > b/drivers/net/netvsc/hn_ethdev.c index 9e2a405973..6f9053c4d5 100644
> > --- a/drivers/net/netvsc/hn_ethdev.c
> > +++ b/drivers/net/netvsc/hn_ethdev.c
> > @@ -515,6 +515,10 @@ static int hn_subchan_configure(struct hn_data *hv,
> >         if (err)
> >                 return  err;
> >
> > +       err = rte_vmbus_ioctl(hv->vmbus, subchan);
> > +       if (err)
> > +               return  err;
> > +
>
> Now I see why you return 0 for Linux. Can you add a comment to say this
> function is not used and should always succeed in Linux?
>
> >         while (subchan > 0) {
> >                 struct vmbus_channel *new_sc;
> >                 uint16_t chn_index;
> > --
> > 2.30.2
>
>
diff mbox series

Patch

diff --git a/drivers/net/netvsc/hn_ethdev.c b/drivers/net/netvsc/hn_ethdev.c
index 9e2a405973..6f9053c4d5 100644
--- a/drivers/net/netvsc/hn_ethdev.c
+++ b/drivers/net/netvsc/hn_ethdev.c
@@ -515,6 +515,10 @@  static int hn_subchan_configure(struct hn_data *hv,
 	if (err)
 		return  err;
 
+	err = rte_vmbus_ioctl(hv->vmbus, subchan);
+	if (err)
+		return  err;
+
 	while (subchan > 0) {
 		struct vmbus_channel *new_sc;
 		uint16_t chn_index;