Displaying 12 results from an estimated 12 matches for "disable_delayed_refill".
2023 May 10
2
[PATCH net v3] virtio_net: Fix error unwinding of XDP initialization
...>>> +err_xdp_info_reg:
>>>>>> + for (i = i - 1; i >= 0; i--)
>>>>>> + virtnet_disable_qp(vi, i);
>>>>>
>>>>> I would to know should we handle for these:
>>>>>
>>>>> disable_delayed_refill(vi);
>>>>> cancel_delayed_work_sync(&vi->refill);
>>>>>
>>>>>
>>>>> Maybe we should call virtnet_close() with "i" directly.
>>>>>
>>>>> Thanks.
>>>>>
>>>>...
2023 May 12
4
[PATCH net v6] virtio_net: Fix error unwinding of XDP initialization
...helper function in virtnet_open.
Fixes: 754b8a21a96d ("virtio_net: setup xdp_rxq_info")
Signed-off-by: Feng Liu <feliu at nvidia.com>
Reviewed-by: Jiri Pirko <jiri at nvidia.com>
Reviewed-by: William Tu <witu at nvidia.com>
---
v5 -> v6
feedbacks from Xuan Zhuo
- add disable_delayed_refill and cancel_delayed_work_sync
v4 -> v5
feedbacks from Michael S. Tsirkin
- rename helper as virtnet_disable_queue_pair
- rename helper as virtnet_enable_queue_pair
v3 -> v4
feedbacks from Jiri Pirko
- Add symmetric helper function virtnet_enable_qp to enable queues.
- Error handle: cleanup...
2023 May 09
1
[PATCH net v3] virtio_net: Fix error unwinding of XDP initialization
...;>>> +err_xdp_info_reg:
> >>>> + for (i = i - 1; i >= 0; i--)
> >>>> + virtnet_disable_qp(vi, i);
> >>>
> >>>
> >>> I would to know should we handle for these:
> >>>
> >>> disable_delayed_refill(vi);
> >>> cancel_delayed_work_sync(&vi->refill);
> >>>
> >>>
> >>> Maybe we should call virtnet_close() with "i" directly.
> >>>
> >>> Thanks.
> >>>
> >>>
> >> Can?t...
2023 May 06
1
[PATCH net v3] virtio_net: Fix error unwinding of XDP initialization
...gt;> +err_xdp_reg_mem_model:
>> + xdp_rxq_info_unreg(&vi->rq[i].xdp_rxq);
>> +err_xdp_info_reg:
>> + for (i = i - 1; i >= 0; i--)
>> + virtnet_disable_qp(vi, i);
>
>
> I would to know should we handle for these:
>
> disable_delayed_refill(vi);
> cancel_delayed_work_sync(&vi->refill);
>
>
> Maybe we should call virtnet_close() with "i" directly.
>
> Thanks.
>
>
Can?t use i directly here, because if xdp_rxq_info_reg fails, napi has
not been enabled for current qp yet, I should ro...
2023 May 06
1
[PATCH net v3] virtio_net: Fix error unwinding of XDP initialization
...[i].vq, &vi->sq[i].napi);
> }
>
> return 0;
> +
> +err_xdp_reg_mem_model:
> + xdp_rxq_info_unreg(&vi->rq[i].xdp_rxq);
> +err_xdp_info_reg:
> + for (i = i - 1; i >= 0; i--)
> + virtnet_disable_qp(vi, i);
I would to know should we handle for these:
disable_delayed_refill(vi);
cancel_delayed_work_sync(&vi->refill);
Maybe we should call virtnet_close() with "i" directly.
Thanks.
> +
> + return err;
> }
>
> static int virtnet_poll_tx(struct napi_struct *napi, int budget)
> @@ -2305,11 +2318,8 @@ static int virtnet_close(struc...
2023 May 24
1
[PATCH V3 net-next 1/2] virtio-net: convert rx mode setting to use workqueue
...dates */
struct work_struct config_work;
+ /* Work struct for config rx mode */
+ struct work_struct rx_mode_work;
+
+ /* Is rx mode work enabled? */
+ bool rx_mode_work_enabled;
+
/* Does the affinity hint is set for virtqueues? */
bool affinity_hint_set;
@@ -388,6 +394,20 @@ static void disable_delayed_refill(struct virtnet_info *vi)
spin_unlock_bh(&vi->refill_lock);
}
+static void enable_rx_mode_work(struct virtnet_info *vi)
+{
+ rtnl_lock();
+ vi->rx_mode_work_enabled = true;
+ rtnl_unlock();
+}
+
+static void disable_rx_mode_work(struct virtnet_info *vi)
+{
+ rtnl_lock();
+ vi->rx_m...
2023 Apr 17
2
[PATCH net-next V2 1/2] virtio-net: convert rx mode setting to use workqueue
...x mode work enabled? */
> > > > + bool rx_mode_work_enabled;
> > > > +
> > > > /* Does the affinity hint is set for virtqueues? */
> > > > bool affinity_hint_set;
> > > >
> > > > @@ -388,6 +394,20 @@ static void disable_delayed_refill(struct virtnet_info *vi)
> > > > spin_unlock_bh(&vi->refill_lock);
> > > > }
> > > >
> > > > +static void enable_rx_mode_work(struct virtnet_info *vi)
> > > > +{
> > > > + rtnl_lock();
> > > > +...
2023 May 03
2
[PATCH net v3] virtio_net: Fix error unwinding of XDP initialization
When initializing XDP in virtnet_open(), some rq xdp initialization
may hit an error causing net device open failed. However, previous
rqs have already initialized XDP and enabled NAPI, which is not the
expected behavior. Need to roll back the previous rq initialization
to avoid leaks in error unwinding of init code.
Also extract a helper function of disable queue pairs, and use newly
introduced
2023 May 24
2
[PATCH V3 net-next 0/2] virtio-net: don't busy poll for cvq command
Hi all:
The code used to busy poll for cvq command which turns out to have
several side effects:
1) infinite poll for buggy devices
2) bad interaction with scheduler
So this series tries to use cond_resched() in the waiting loop. Before
doing this we need first make sure the cvq command is not executed in
atomic environment, so we need first convert rx mode handling to a
workqueue.
Please
2023 Jul 20
2
[PATCH net-next v4 0/2] virtio-net: don't busy poll for cvq command
Hi all:
The code used to busy poll for cvq command which turns out to have
several side effects:
1) infinite poll for buggy devices
2) bad interaction with scheduler
So this series tries to use cond_resched() in the waiting loop. Before
doing this we need first make sure the cvq command is not executed in
atomic environment, so we need first convert rx mode handling to a
workqueue.
Note that,
2023 Apr 13
3
[PATCH net-next V2 0/2] virtio-net: don't busy poll for cvq command
Hi all:
The code used to busy poll for cvq command which turns out to have
several side effects:
1) infinite poll for buggy devices
2) bad interaction with scheduler
So this series tries to use sleep instead of busy polling. In this
version, I take a step back: the hardening part is not implemented and
leave for future investigation. We use to aggree to use interruptible
sleep but it
2022 Dec 26
4
[PATCH 0/4] virtio-net: don't busy poll for cvq command
Hi all:
The code used to busy poll for cvq command which turns out to have
several side effects:
1) infinite poll for buggy devices
2) bad interaction with scheduler
So this series tries to use sleep + timeout instead of busy polling.
Please review.
Thanks
Changes since RFC:
- switch to use BAD_RING in virtio_break_device()
- check virtqueue_is_broken() after being woken up
- use