2023-04-28 22:52:17

by Feng Liu

[permalink] [raw]
Subject: [PATCH net v1 2/2] virtio_net: Close queue pairs using helper function

Use newly introduced helper function that exactly does the same of
closing the queue pairs.

Signed-off-by: Feng Liu <[email protected]>
Reviewed-by: William Tu <[email protected]>
Reviewed-by: Parav Pandit <[email protected]>
---
drivers/net/virtio_net.c | 7 ++-----
1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
index fc6ee833a09f..5cd78e154d14 100644
--- a/drivers/net/virtio_net.c
+++ b/drivers/net/virtio_net.c
@@ -2319,11 +2319,8 @@ static int virtnet_close(struct net_device *dev)
/* Make sure refill_work doesn't re-enable napi! */
cancel_delayed_work_sync(&vi->refill);

- for (i = 0; i < vi->max_queue_pairs; i++) {
- virtnet_napi_tx_disable(&vi->sq[i].napi);
- napi_disable(&vi->rq[i].napi);
- xdp_rxq_info_unreg(&vi->rq[i].xdp_rxq);
- }
+ for (i = 0; i < vi->max_queue_pairs; i++)
+ virtnet_disable_qp(vi, i);

return 0;
}
--
2.37.1 (Apple Git-137.1)


2023-05-01 12:58:36

by Simon Horman

[permalink] [raw]
Subject: Re: [PATCH net v1 2/2] virtio_net: Close queue pairs using helper function

On Fri, Apr 28, 2023 at 06:43:46PM -0400, Feng Liu wrote:
> Use newly introduced helper function that exactly does the same of
> closing the queue pairs.
>
> Signed-off-by: Feng Liu <[email protected]>
> Reviewed-by: William Tu <[email protected]>
> Reviewed-by: Parav Pandit <[email protected]>

I guess this was put in a separate patch to 1/2, as it's more
net-next material, as opposed to 1/2 which seems to be net material.
FWIIW, I'd lean to putting 1/2 in net. And holding this one for net-next.

That aside, this looks good to me.

Reviewed-by: Simon Horman <[email protected]>

2023-05-01 13:59:57

by Feng Liu

[permalink] [raw]
Subject: Re: [PATCH net v1 2/2] virtio_net: Close queue pairs using helper function



On 2023-05-01 a.m.8:44, Simon Horman wrote:
> External email: Use caution opening links or attachments
>
>
> On Fri, Apr 28, 2023 at 06:43:46PM -0400, Feng Liu wrote:
>> Use newly introduced helper function that exactly does the same of
>> closing the queue pairs.
>>
>> Signed-off-by: Feng Liu <[email protected]>
>> Reviewed-by: William Tu <[email protected]>
>> Reviewed-by: Parav Pandit <[email protected]>
>
> I guess this was put in a separate patch to 1/2, as it's more
> net-next material, as opposed to 1/2 which seems to be net material.
> FWIIW, I'd lean to putting 1/2 in net. And holding this one for net-next.
>
> That aside, this looks good to me.
>
> Reviewed-by: Simon Horman <[email protected]>

Will do, thanks Simon

2023-05-01 14:30:50

by Michael S. Tsirkin

[permalink] [raw]
Subject: Re: [PATCH net v1 2/2] virtio_net: Close queue pairs using helper function

On Mon, May 01, 2023 at 09:58:18AM -0400, Feng Liu wrote:
>
>
> On 2023-05-01 a.m.8:44, Simon Horman wrote:
> > External email: Use caution opening links or attachments
> >
> >
> > On Fri, Apr 28, 2023 at 06:43:46PM -0400, Feng Liu wrote:
> > > Use newly introduced helper function that exactly does the same of
> > > closing the queue pairs.
> > >
> > > Signed-off-by: Feng Liu <[email protected]>
> > > Reviewed-by: William Tu <[email protected]>
> > > Reviewed-by: Parav Pandit <[email protected]>
> >
> > I guess this was put in a separate patch to 1/2, as it's more
> > net-next material, as opposed to 1/2 which seems to be net material.
> > FWIIW, I'd lean to putting 1/2 in net. And holding this one for net-next.
> >
> > That aside, this looks good to me.
> >
> > Reviewed-by: Simon Horman <[email protected]>
>
> Will do, thanks Simon

Nah, I think you should just squash these two patches together.
It's early in the merge window.

--
MST

2023-05-01 14:36:47

by Michael S. Tsirkin

[permalink] [raw]
Subject: Re: [PATCH net v1 2/2] virtio_net: Close queue pairs using helper function

On Fri, Apr 28, 2023 at 06:43:46PM -0400, Feng Liu wrote:
> Use newly introduced helper function that exactly does the same of
> closing the queue pairs.
>
> Signed-off-by: Feng Liu <[email protected]>
> Reviewed-by: William Tu <[email protected]>
> Reviewed-by: Parav Pandit <[email protected]>

Acked-by: Michael S. Tsirkin <[email protected]>

> ---
> drivers/net/virtio_net.c | 7 ++-----
> 1 file changed, 2 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c
> index fc6ee833a09f..5cd78e154d14 100644
> --- a/drivers/net/virtio_net.c
> +++ b/drivers/net/virtio_net.c
> @@ -2319,11 +2319,8 @@ static int virtnet_close(struct net_device *dev)
> /* Make sure refill_work doesn't re-enable napi! */
> cancel_delayed_work_sync(&vi->refill);
>
> - for (i = 0; i < vi->max_queue_pairs; i++) {
> - virtnet_napi_tx_disable(&vi->sq[i].napi);
> - napi_disable(&vi->rq[i].napi);
> - xdp_rxq_info_unreg(&vi->rq[i].xdp_rxq);
> - }
> + for (i = 0; i < vi->max_queue_pairs; i++)
> + virtnet_disable_qp(vi, i);
>
> return 0;
> }
> --
> 2.37.1 (Apple Git-137.1)

2023-05-01 16:54:47

by Feng Liu

[permalink] [raw]
Subject: Re: [PATCH net v1 2/2] virtio_net: Close queue pairs using helper function



On 2023-05-01 a.m.10:14, Michael S. Tsirkin wrote:
> External email: Use caution opening links or attachments
>
>
> On Mon, May 01, 2023 at 09:58:18AM -0400, Feng Liu wrote:
>>
>>
>> On 2023-05-01 a.m.8:44, Simon Horman wrote:
>>> External email: Use caution opening links or attachments
>>>
>>>
>>> On Fri, Apr 28, 2023 at 06:43:46PM -0400, Feng Liu wrote:
>>>> Use newly introduced helper function that exactly does the same of
>>>> closing the queue pairs.
>>>>
>>>> Signed-off-by: Feng Liu <[email protected]>
>>>> Reviewed-by: William Tu <[email protected]>
>>>> Reviewed-by: Parav Pandit <[email protected]>
>>>
>>> I guess this was put in a separate patch to 1/2, as it's more
>>> net-next material, as opposed to 1/2 which seems to be net material.
>>> FWIIW, I'd lean to putting 1/2 in net. And holding this one for net-next.
>>>
>>> That aside, this looks good to me.
>>>
>>> Reviewed-by: Simon Horman <[email protected]>
>>
>> Will do, thanks Simon
>
> Nah, I think you should just squash these two patches together.
> It's early in the merge window.
>
> --
> MST
>
OK, will do , thx

2023-05-02 06:15:02

by Simon Horman

[permalink] [raw]
Subject: Re: [PATCH net v1 2/2] virtio_net: Close queue pairs using helper function

On Mon, May 01, 2023 at 10:14:00AM -0400, Michael S. Tsirkin wrote:
> On Mon, May 01, 2023 at 09:58:18AM -0400, Feng Liu wrote:
> >
> >
> > On 2023-05-01 a.m.8:44, Simon Horman wrote:
> > > External email: Use caution opening links or attachments
> > >
> > >
> > > On Fri, Apr 28, 2023 at 06:43:46PM -0400, Feng Liu wrote:
> > > > Use newly introduced helper function that exactly does the same of
> > > > closing the queue pairs.
> > > >
> > > > Signed-off-by: Feng Liu <[email protected]>
> > > > Reviewed-by: William Tu <[email protected]>
> > > > Reviewed-by: Parav Pandit <[email protected]>
> > >
> > > I guess this was put in a separate patch to 1/2, as it's more
> > > net-next material, as opposed to 1/2 which seems to be net material.
> > > FWIIW, I'd lean to putting 1/2 in net. And holding this one for net-next.
> > >
> > > That aside, this looks good to me.
> > >
> > > Reviewed-by: Simon Horman <[email protected]>
> >
> > Will do, thanks Simon
>
> Nah, I think you should just squash these two patches together.
> It's early in the merge window.

Ack, sorry for the noise.