search for: rcu_read_lock_bh

Displaying 20 results from an estimated 49 matches for "rcu_read_lock_bh".

2018 Jan 23
2
[RFC PATCH net-next v2 2/2] virtio_net: Extend virtio to use VF datapath when available
...q[qnum]; > + struct net_device *vf_netdev; > int err; > struct netdev_queue *txq = netdev_get_tx_queue(dev, qnum); > bool kick = !skb->xmit_more; > bool use_napi = sq->napi.weight; > > + /* If VF is present and up then redirect packets > + * called with rcu_read_lock_bh > + */ > + vf_netdev = rcu_dereference_bh(vi->vf_netdev); > + if (vf_netdev && netif_running(vf_netdev) && > + !netpoll_tx_running(dev) && > + is_unicast_ether_addr(eth_hdr(skb)->h_dest)) > + return virtnet_vf_xmit(dev, vf_netdev, skb); >...
2018 Jan 23
2
[RFC PATCH net-next v2 2/2] virtio_net: Extend virtio to use VF datapath when available
...q[qnum]; > + struct net_device *vf_netdev; > int err; > struct netdev_queue *txq = netdev_get_tx_queue(dev, qnum); > bool kick = !skb->xmit_more; > bool use_napi = sq->napi.weight; > > + /* If VF is present and up then redirect packets > + * called with rcu_read_lock_bh > + */ > + vf_netdev = rcu_dereference_bh(vi->vf_netdev); > + if (vf_netdev && netif_running(vf_netdev) && > + !netpoll_tx_running(dev) && > + is_unicast_ether_addr(eth_hdr(skb)->h_dest)) > + return virtnet_vf_xmit(dev, vf_netdev, skb); >...
2014 Feb 13
2
[PATCH net v2] vhost: fix a theoretical race in device cleanup
...ions(+) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index b12176f..f1be80d 100644 --- a/drivers/vhost/net.c +++ b/drivers/vhost/net.c @@ -308,6 +308,8 @@ static void vhost_zerocopy_callback(struct ubuf_info *ubuf, bool success) struct vhost_virtqueue *vq = ubufs->vq; int cnt; + rcu_read_lock_bh(); + /* set len to mark this desc buffers done DMA */ vq->heads[ubuf->desc].len = success ? VHOST_DMA_DONE_LEN : VHOST_DMA_FAILED_LEN; @@ -322,6 +324,8 @@ static void vhost_zerocopy_callback(struct ubuf_info *ubuf, bool success) */ if (cnt <= 1 || !(cnt % 16)) vhost_poll_que...
2014 Feb 13
2
[PATCH net v2] vhost: fix a theoretical race in device cleanup
...ions(+) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index b12176f..f1be80d 100644 --- a/drivers/vhost/net.c +++ b/drivers/vhost/net.c @@ -308,6 +308,8 @@ static void vhost_zerocopy_callback(struct ubuf_info *ubuf, bool success) struct vhost_virtqueue *vq = ubufs->vq; int cnt; + rcu_read_lock_bh(); + /* set len to mark this desc buffers done DMA */ vq->heads[ubuf->desc].len = success ? VHOST_DMA_DONE_LEN : VHOST_DMA_FAILED_LEN; @@ -322,6 +324,8 @@ static void vhost_zerocopy_callback(struct ubuf_info *ubuf, bool success) */ if (cnt <= 1 || !(cnt % 16)) vhost_poll_que...
2018 Jan 23
0
[RFC PATCH net-next v2 2/2] virtio_net: Extend virtio to use VF datapath when available
...f_netdev; >> ????? int err; >> ????? struct netdev_queue *txq = netdev_get_tx_queue(dev, qnum); >> ????? bool kick = !skb->xmit_more; >> ????? bool use_napi = sq->napi.weight; >> ? +??? /* If VF is present and up then redirect packets >> +???? * called with rcu_read_lock_bh >> +???? */ >> +??? vf_netdev = rcu_dereference_bh(vi->vf_netdev); >> +??? if (vf_netdev && netif_running(vf_netdev) && >> +??????? !netpoll_tx_running(dev) && >> +??????? is_unicast_ether_addr(eth_hdr(skb)->h_dest)) >> +??????? retu...
2014 Feb 12
0
[PATCH net 3/3] vhost: fix a theoretical race in device cleanup
...ions(+) diff --git a/drivers/vhost/net.c b/drivers/vhost/net.c index 7eaf2de..78a9d42 100644 --- a/drivers/vhost/net.c +++ b/drivers/vhost/net.c @@ -308,6 +308,8 @@ static void vhost_zerocopy_callback(struct ubuf_info *ubuf, bool success) struct vhost_virtqueue *vq = ubufs->vq; int cnt; + rcu_read_lock_bh(); + /* set len to mark this desc buffers done DMA */ vq->heads[ubuf->desc].len = success ? VHOST_DMA_DONE_LEN : VHOST_DMA_FAILED_LEN; @@ -322,6 +324,8 @@ static void vhost_zerocopy_callback(struct ubuf_info *ubuf, bool success) */ if (cnt <= 1 || !(cnt % 16)) vhost_poll_que...
2019 Aug 13
0
[PATCH V5 0/9] Fixes for vhost metadata acceleration
...ld be preempted If you mean something that prevents RCU grace period from running. I'm afraid MMU notifier is not the only victim.? But it should be no more worse than some one is holding a lock for very long time. If the only concern is the preemption of vhost kthread, I can switch to use rcu_read_lock_bh() instead. Thanks > > So I favor the revert and try again approach as well. It is hard to > get a clear picture with these endless bug fix patches > > Jason Ok. Thanks
2018 Jan 12
7
[RFC PATCH net-next v2 0/2] Enable virtio to act as a backup for a passthru device
This patch series extends virtio_net to take over VF datapath by simulating a transparent bond without creating any additional netdev. I understand that there are some comments suggesting an alternate model that is based on 3 driver model(virtio_net, VF driver, a new driver virt_bond that acts as a master to virtio_net and VF). Would like to get some feedback on the right way to solve the live
2019 Aug 12
2
[PATCH V5 0/9] Fixes for vhost metadata acceleration
On Mon, Aug 12, 2019 at 05:49:08AM -0400, Michael S. Tsirkin wrote: > On Mon, Aug 12, 2019 at 10:44:51AM +0800, Jason Wang wrote: > > > > On 2019/8/11 ??1:52, Michael S. Tsirkin wrote: > > > On Fri, Aug 09, 2019 at 01:48:42AM -0400, Jason Wang wrote: > > > > Hi all: > > > > > > > > This series try to fix several issues introduced by
2019 Aug 12
2
[PATCH V5 0/9] Fixes for vhost metadata acceleration
On Mon, Aug 12, 2019 at 05:49:08AM -0400, Michael S. Tsirkin wrote: > On Mon, Aug 12, 2019 at 10:44:51AM +0800, Jason Wang wrote: > > > > On 2019/8/11 ??1:52, Michael S. Tsirkin wrote: > > > On Fri, Aug 09, 2019 at 01:48:42AM -0400, Jason Wang wrote: > > > > Hi all: > > > > > > > > This series try to fix several issues introduced by
2014 Feb 12
4
[PATCH net 0/3] vhost fixes for 3.14, -stable
This fixes a deadlock with vhost reported in the field, as well as a theoretical race issue found by code review. Patches 1+2 are needed for stable. Thanks to Qin Chuanyu for reporting the issue! Michael S. Tsirkin (3): kref: add kref_sub_return vhost: fix ref cnt checking deadlock vhost: fix a theoretical race in device cleanup include/linux/kref.h | 33
2014 Feb 12
4
[PATCH net 0/3] vhost fixes for 3.14, -stable
This fixes a deadlock with vhost reported in the field, as well as a theoretical race issue found by code review. Patches 1+2 are needed for stable. Thanks to Qin Chuanyu for reporting the issue! Michael S. Tsirkin (3): kref: add kref_sub_return vhost: fix ref cnt checking deadlock vhost: fix a theoretical race in device cleanup include/linux/kref.h | 33
2017 Dec 19
5
[RFC PATCH] virtio_net: Extend virtio to use VF datapath when available
...skb); struct send_queue *sq = &vi->sq[qnum]; + struct net_device *vf_netdev; int err; struct netdev_queue *txq = netdev_get_tx_queue(dev, qnum); bool kick = !skb->xmit_more; bool use_napi = sq->napi.weight; + /* if VF is present and up then redirect packets + * called with rcu_read_lock_bh + */ + vf_netdev = rcu_dereference_bh(vi->vf_netdev); + if (vf_netdev && netif_running(vf_netdev) && !netpoll_tx_running(dev)) + return virtnet_vf_xmit(dev, vf_netdev, skb); + /* Free up any pending old buffers before queueing new ones. */ free_old_xmit_skbs(sq); @@ -1456...
2017 Dec 19
5
[RFC PATCH] virtio_net: Extend virtio to use VF datapath when available
...skb); struct send_queue *sq = &vi->sq[qnum]; + struct net_device *vf_netdev; int err; struct netdev_queue *txq = netdev_get_tx_queue(dev, qnum); bool kick = !skb->xmit_more; bool use_napi = sq->napi.weight; + /* if VF is present and up then redirect packets + * called with rcu_read_lock_bh + */ + vf_netdev = rcu_dereference_bh(vi->vf_netdev); + if (vf_netdev && netif_running(vf_netdev) && !netpoll_tx_running(dev)) + return virtnet_vf_xmit(dev, vf_netdev, skb); + /* Free up any pending old buffers before queueing new ones. */ free_old_xmit_skbs(sq); @@ -1456...
2018 Jan 12
0
[RFC PATCH net-next v2 2/2] virtio_net: Extend virtio to use VF datapath when available
...skb); struct send_queue *sq = &vi->sq[qnum]; + struct net_device *vf_netdev; int err; struct netdev_queue *txq = netdev_get_tx_queue(dev, qnum); bool kick = !skb->xmit_more; bool use_napi = sq->napi.weight; + /* If VF is present and up then redirect packets + * called with rcu_read_lock_bh + */ + vf_netdev = rcu_dereference_bh(vi->vf_netdev); + if (vf_netdev && netif_running(vf_netdev) && + !netpoll_tx_running(dev) && + is_unicast_ether_addr(eth_hdr(skb)->h_dest)) + return virtnet_vf_xmit(dev, vf_netdev, skb); + /* Free up any pending old buf...
2020 Jun 03
1
[PATCH RFC 08/13] vhost/net: convert to new API: heads->bufs
...used_n_bufs(vq, &nvq->bufs[nvq->done_idx], add); > + vhost_signal(vq->dev, vq); > nvq->done_idx = (nvq->done_idx + add) % UIO_MAXIOV; > j -= add; > } > @@ -390,7 +401,7 @@ static void vhost_zerocopy_callback(struct ubuf_info *ubuf, bool success) > rcu_read_lock_bh(); > > /* set len to mark this desc buffers done DMA */ > - nvq->vq.heads[ubuf->desc].in_len = success ? > + nvq->bufs[ubuf->desc].in_len = success ? > VHOST_DMA_DONE_LEN : VHOST_DMA_FAILED_LEN; > cnt = vhost_net_ubuf_put(ubufs); > > @@ -452,7 +46...
2017 Dec 21
0
[RFC PATCH] virtio_net: Extend virtio to use VF datapath when available
...>sq[qnum]; > + struct net_device *vf_netdev; > int err; > struct netdev_queue *txq = netdev_get_tx_queue(dev, qnum); > bool kick = !skb->xmit_more; > bool use_napi = sq->napi.weight; > > + /* if VF is present and up then redirect packets > + * called with rcu_read_lock_bh > + */ > + vf_netdev = rcu_dereference_bh(vi->vf_netdev); > + if (vf_netdev && netif_running(vf_netdev) && !netpoll_tx_running(dev)) > + return virtnet_vf_xmit(dev, vf_netdev, skb); > + > /* Free up any pending old buffers before queueing new ones. */ >...
2020 Jun 02
0
[PATCH RFC 08/13] vhost/net: convert to new API: heads->bufs
...>done_idx], add); + vhost_put_used_n_bufs(vq, &nvq->bufs[nvq->done_idx], add); + vhost_signal(vq->dev, vq); nvq->done_idx = (nvq->done_idx + add) % UIO_MAXIOV; j -= add; } @@ -390,7 +401,7 @@ static void vhost_zerocopy_callback(struct ubuf_info *ubuf, bool success) rcu_read_lock_bh(); /* set len to mark this desc buffers done DMA */ - nvq->vq.heads[ubuf->desc].in_len = success ? + nvq->bufs[ubuf->desc].in_len = success ? VHOST_DMA_DONE_LEN : VHOST_DMA_FAILED_LEN; cnt = vhost_net_ubuf_put(ubufs); @@ -452,7 +463,8 @@ static void vhost_net_signal_used(stru...
2018 Jan 03
6
[PATCH net-next 0/2] Enable virtio to act as a master for a passthru device
This patch series enables virtio to switch over to a VF datapath when a VF netdev is present with the same MAC address. It allows live migration of a VM with a direct attached VF without the need to setup a bond/team between a VF and virtio net device in the guest. The hypervisor needs to unplug the VF device from the guest on the source host and reset the MAC filter of the VF to initiate
2018 Jan 03
6
[PATCH net-next 0/2] Enable virtio to act as a master for a passthru device
This patch series enables virtio to switch over to a VF datapath when a VF netdev is present with the same MAC address. It allows live migration of a VM with a direct attached VF without the need to setup a bond/team between a VF and virtio net device in the guest. The hypervisor needs to unplug the VF device from the guest on the source host and reset the MAC filter of the VF to initiate