search for: svq

Displaying 20 results from an estimated 161 matches for "svq".

Did you mean: seq
2008 Apr 18
0
virtio: wean net driver off NETDEV_TX_BUSY
...------------- 1 file changed, 38 insertions(+), 19 deletions(-) diff -r a936d320f6d5 drivers/net/virtio_net.c --- a/drivers/net/virtio_net.c Thu Apr 17 05:03:18 2008 +1000 +++ b/drivers/net/virtio_net.c Thu Apr 17 06:15:40 2008 +1000 @@ -40,6 +40,9 @@ struct virtnet_info struct virtqueue *rvq, *svq; struct net_device *dev; struct napi_struct napi; + + /* The skb we couldn't send because buffers were full. */ + struct sk_buff *last_xmit_skb; /* Number of input buffers, and max we've ever had. */ unsigned int num, max; @@ -227,10 +230,9 @@ static void free_old_xmit_skbs(struct...
2008 Apr 18
0
virtio: wean net driver off NETDEV_TX_BUSY
...------------- 1 file changed, 38 insertions(+), 19 deletions(-) diff -r a936d320f6d5 drivers/net/virtio_net.c --- a/drivers/net/virtio_net.c Thu Apr 17 05:03:18 2008 +1000 +++ b/drivers/net/virtio_net.c Thu Apr 17 06:15:40 2008 +1000 @@ -40,6 +40,9 @@ struct virtnet_info struct virtqueue *rvq, *svq; struct net_device *dev; struct napi_struct napi; + + /* The skb we couldn't send because buffers were full. */ + struct sk_buff *last_xmit_skb; /* Number of input buffers, and max we've ever had. */ unsigned int num, max; @@ -227,10 +230,9 @@ static void free_old_xmit_skbs(struct...
2020 Sep 24
0
[PATCH 3/8] vhost scsi: alloc cmds per vq instead of session
...-324,7 +326,9 @@ static void vhost_scsi_release_cmd(struct se_cmd *se_cmd) > { > struct vhost_scsi_cmd *tv_cmd = container_of(se_cmd, > struct vhost_scsi_cmd, tvc_se_cmd); > - struct se_session *se_sess = tv_cmd->tvc_nexus->tvn_se_sess; > + struct vhost_scsi_virtqueue *svq = container_of(tv_cmd->tvc_vq, > + struct vhost_scsi_virtqueue, vq); > + struct vhost_scsi_inflight *inflight = tv_cmd->inflight; > int i; > > if (tv_cmd->tvc_sgl_count) { > @@ -336,8 +340,8 @@ static void vhost_scsi_release_cmd(struct se_cmd *se_cmd) > pu...
2008 Apr 28
3
[PATCH 1/4] virtio: wean net driver off NETDEV_TX_BUSY
...------------- 1 file changed, 40 insertions(+), 18 deletions(-) diff -r 26ba2dd67f46 drivers/net/virtio_net.c --- a/drivers/net/virtio_net.c Tue Apr 22 13:03:07 2008 +1000 +++ b/drivers/net/virtio_net.c Thu Apr 24 12:05:24 2008 +1000 @@ -40,6 +40,9 @@ struct virtnet_info struct virtqueue *rvq, *svq; struct net_device *dev; struct napi_struct napi; + + /* The skb we couldn't send because buffers were full. */ + struct sk_buff *last_xmit_skb; /* Number of input buffers, and max we've ever had. */ unsigned int num, max; @@ -227,17 +230,16 @@ static void free_old_xmit_skbs(struc...
2008 Apr 28
3
[PATCH 1/4] virtio: wean net driver off NETDEV_TX_BUSY
...------------- 1 file changed, 40 insertions(+), 18 deletions(-) diff -r 26ba2dd67f46 drivers/net/virtio_net.c --- a/drivers/net/virtio_net.c Tue Apr 22 13:03:07 2008 +1000 +++ b/drivers/net/virtio_net.c Thu Apr 24 12:05:24 2008 +1000 @@ -40,6 +40,9 @@ struct virtnet_info struct virtqueue *rvq, *svq; struct net_device *dev; struct napi_struct napi; + + /* The skb we couldn't send because buffers were full. */ + struct sk_buff *last_xmit_skb; /* Number of input buffers, and max we've ever had. */ unsigned int num, max; @@ -227,17 +230,16 @@ static void free_old_xmit_skbs(struc...
2023 Mar 06
0
[PATCH v4 12/15] vdpa: block migration if device has unsupported features
...M Jason Wang <jasowang at redhat.com> wrote: > > >> On Mon, Feb 27, 2023 at 4:15?PM Jason Wang <jasowang at redhat.com> wrote: > > >>> > > >>> ? 2023/2/24 23:54, Eugenio P?rez ??: > > >>>> A vdpa net device must initialize with SVQ in order to be migratable at > > >>>> this moment, and initialization code verifies some conditions. If the > > >>>> device is not initialized with the x-svq parameter, it will not expose > > >>>> _F_LOG so the vhost subsystem will block VM mig...
2010 Apr 12
10
[PATCH 0/6] virtio: virtqueue ops cleanup
virtqueue ops were introduced in the hope that we'll have multiple implementations besides virtio_ring, but none have surfaced so far, and given that existing virtio ring is deployed in production we are likely stuck with it now, so this layer just adds complexity and overhead. Further, the need to pass vq twice to each call (as in dev->vq->vq_ops->kick(dev->vq) ) adds potential
2010 Apr 12
10
[PATCH 0/6] virtio: virtqueue ops cleanup
virtqueue ops were introduced in the hope that we'll have multiple implementations besides virtio_ring, but none have surfaced so far, and given that existing virtio ring is deployed in production we are likely stuck with it now, so this layer just adds complexity and overhead. Further, the need to pass vq twice to each call (as in dev->vq->vq_ops->kick(dev->vq) ) adds potential
2007 Dec 21
0
[kvm-devel] [Virtio-for-kvm] [PATCH 6/13] [Mostly resend] virtio additions
...tic void free_old_xmit_skbs(struct virtnet_info *vi) } } +static enum hrtimer_restart kick_xmit(struct hrtimer *t) +{ + struct virtnet_info *vi = container_of(t,struct virtnet_info,tx_timer); + + BUG_ON(!in_softirq()); + BUG_ON(in_irq()); + netif_tx_lock(vi->dev); + vi->svq->vq_ops->kick(vi->svq); + vi->out_num = 0; + netif_tx_unlock(vi->dev); + + return HRTIMER_NORESTART; +} + static int start_xmit(struct sk_buff *skb, struct net_device *dev) { struct virtnet_info *vi = netdev_priv(dev); @@ -273,11 +294,25 @@ static int start_xmit(struc...
2007 Dec 21
0
[kvm-devel] [Virtio-for-kvm] [PATCH 6/13] [Mostly resend] virtio additions
...tic void free_old_xmit_skbs(struct virtnet_info *vi) } } +static enum hrtimer_restart kick_xmit(struct hrtimer *t) +{ + struct virtnet_info *vi = container_of(t,struct virtnet_info,tx_timer); + + BUG_ON(!in_softirq()); + BUG_ON(in_irq()); + netif_tx_lock(vi->dev); + vi->svq->vq_ops->kick(vi->svq); + vi->out_num = 0; + netif_tx_unlock(vi->dev); + + return HRTIMER_NORESTART; +} + static int start_xmit(struct sk_buff *skb, struct net_device *dev) { struct virtnet_info *vi = netdev_priv(dev); @@ -273,11 +294,25 @@ static int start_xmit(struc...
2007 Nov 18
3
[PATCH 1/2] virtio: fix net driver loop case where we fail to restart
skb is only NULL the first time around: it's more correct to test for being under-budget. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> diff -r 2a94425ac7d5 drivers/net/virtio_net.c --- a/drivers/net/virtio_net.c Thu Nov 15 13:47:28 2007 +1100 +++ b/drivers/net/virtio_net.c Thu Nov 15 23:10:44 2007 +1100 @@ -198,8 +198,8 @@ again: if (vi->num < vi->max / 2)
2007 Nov 18
3
[PATCH 1/2] virtio: fix net driver loop case where we fail to restart
skb is only NULL the first time around: it's more correct to test for being under-budget. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> diff -r 2a94425ac7d5 drivers/net/virtio_net.c --- a/drivers/net/virtio_net.c Thu Nov 15 13:47:28 2007 +1100 +++ b/drivers/net/virtio_net.c Thu Nov 15 23:10:44 2007 +1100 @@ -198,8 +198,8 @@ again: if (vi->num < vi->max / 2)
2012 Jun 05
1
[net-next RFC PATCH] virtio_net: collect satistics and export through ethtool
...t;, VIRTNET_STAT_OFF(rx_packets)}, + { "rx_kick", VIRTNET_STAT_OFF(rx_kick)}, + { "rx_callbacks", VIRTNET_STAT_OFF(rx_callbacks)}, }; +#define VIRTNET_NUM_STATS ARRAY_SIZE(virtnet_stats_str_attr) + struct virtnet_info { struct virtio_device *vdev; struct virtqueue *rvq, *svq, *cvq; @@ -142,6 +171,11 @@ static struct page *get_a_page(struct virtnet_info *vi, gfp_t gfp_mask) static void skb_xmit_done(struct virtqueue *svq) { struct virtnet_info *vi = svq->vdev->priv; + struct virtnet_stats *stats = this_cpu_ptr(vi->stats); + + u64_stats_update_begin(&sta...
2012 Jun 05
1
[net-next RFC PATCH] virtio_net: collect satistics and export through ethtool
...t;, VIRTNET_STAT_OFF(rx_packets)}, + { "rx_kick", VIRTNET_STAT_OFF(rx_kick)}, + { "rx_callbacks", VIRTNET_STAT_OFF(rx_callbacks)}, }; +#define VIRTNET_NUM_STATS ARRAY_SIZE(virtnet_stats_str_attr) + struct virtnet_info { struct virtio_device *vdev; struct virtqueue *rvq, *svq, *cvq; @@ -142,6 +171,11 @@ static struct page *get_a_page(struct virtnet_info *vi, gfp_t gfp_mask) static void skb_xmit_done(struct virtqueue *svq) { struct virtnet_info *vi = svq->vdev->priv; + struct virtnet_stats *stats = this_cpu_ptr(vi->stats); + + u64_stats_update_begin(&sta...
2009 May 29
2
[PATCH 2/4] virtio_net: return NETDEV_TX_BUSY instead of queueing an extra skb.
...static void receive_skb(struct net_device *dev, struct sk_buff *skb, @@ -509,12 +505,7 @@ static void xmit_tasklet(unsigned long d struct virtnet_info *vi = (void *)data; netif_tx_lock_bh(vi->dev); - if (vi->last_xmit_skb && xmit_skb(vi, vi->last_xmit_skb) == 0) { - vi->svq->vq_ops->kick(vi->svq); - vi->last_xmit_skb = NULL; - } - if (vi->free_in_tasklet) - free_old_xmit_skbs(vi); + free_old_xmit_skbs(vi); netif_tx_unlock_bh(vi->dev); } @@ -526,27 +517,14 @@ again: /* Free up any pending old buffers before queueing new ones. */ free_old_xm...
2009 May 29
2
[PATCH 2/4] virtio_net: return NETDEV_TX_BUSY instead of queueing an extra skb.
...static void receive_skb(struct net_device *dev, struct sk_buff *skb, @@ -509,12 +505,7 @@ static void xmit_tasklet(unsigned long d struct virtnet_info *vi = (void *)data; netif_tx_lock_bh(vi->dev); - if (vi->last_xmit_skb && xmit_skb(vi, vi->last_xmit_skb) == 0) { - vi->svq->vq_ops->kick(vi->svq); - vi->last_xmit_skb = NULL; - } - if (vi->free_in_tasklet) - free_old_xmit_skbs(vi); + free_old_xmit_skbs(vi); netif_tx_unlock_bh(vi->dev); } @@ -526,27 +517,14 @@ again: /* Free up any pending old buffers before queueing new ones. */ free_old_xm...
2011 Jun 01
5
[PATCH RFC 0/3] virtio and vhost-net capacity handling
OK, here's a new attempt to use the new capacity api. I also added more comments to clarify the logic. Hope this is more readable. Let me know pls. This is on top of the patches applied by Rusty. Note: there are now actually 2 calls to fee_old_xmit_skbs on data path so instead of passing flag '2' to the second one I thought we can just make each call free up at least 1 skb. This
2011 Jun 01
5
[PATCH RFC 0/3] virtio and vhost-net capacity handling
OK, here's a new attempt to use the new capacity api. I also added more comments to clarify the logic. Hope this is more readable. Let me know pls. This is on top of the patches applied by Rusty. Note: there are now actually 2 calls to fee_old_xmit_skbs on data path so instead of passing flag '2' to the second one I thought we can just make each call free up at least 1 skb. This
2008 Jun 08
2
[PATCH 1/4] virtio_net: Fix skb->csum_start computation
From: Mark McLoughlin <markmc at redhat.com> hdr->csum_start is the offset from the start of the ethernet header to the transport layer checksum field. skb->csum_start is the offset from skb->head. skb_partial_csum_set() assumes that skb->data points to the ethernet header - i.e. it computes skb->csum_start by adding the headroom to hdr->csum_start. Since
2011 Jun 02
6
[PATCHv2 RFC 0/4] virtio and vhost-net capacity handling
OK, here's a new attempt to use the new capacity api. I also added more comments to clarify the logic. Hope this is more readable. Let me know pls. This is on top of the patches applied by Rusty. Warning: untested. Posting now to give people chance to comment on the API. Changes from v1: - fix comment in patch 2 to correct confusion noted by Rusty - rewrite patch 3 along the lines