search for: virtnet_find_vq

Displaying 20 results from an estimated 67 matches for "virtnet_find_vq".

Did you mean: virtnet_find_vqs
2017 Mar 29
2
[PATCH 4/6] virtio_net: allow specifying context for rx
....com> --- drivers/net/virtio_net.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 6802169..340f737 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -2044,6 +2044,7 @@ static int virtnet_find_vqs(struct virtnet_info *vi) int ret = -ENOMEM; int i, total_vqs; const char **names; + const bool *ctx; /* We expect 1 RX virtqueue followed by 1 TX virtqueue, followed by * possible N-1 RX/TX queue pairs used in multiqueue mode, followed by @@ -2062,6 +2063,13 @@ static int virtnet_find...
2017 Mar 29
2
[PATCH 4/6] virtio_net: allow specifying context for rx
....com> --- drivers/net/virtio_net.c | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 6802169..340f737 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -2044,6 +2044,7 @@ static int virtnet_find_vqs(struct virtnet_info *vi) int ret = -ENOMEM; int i, total_vqs; const char **names; + const bool *ctx; /* We expect 1 RX virtqueue followed by 1 TX virtqueue, followed by * possible N-1 RX/TX queue pairs used in multiqueue mode, followed by @@ -2062,6 +2063,13 @@ static int virtnet_find...
2017 Mar 30
1
[PATCH 4/6] virtio_net: allow specifying context for rx
...1 file changed, 14 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c > > index 6802169..340f737 100644 > > --- a/drivers/net/virtio_net.c > > +++ b/drivers/net/virtio_net.c > > @@ -2044,6 +2044,7 @@ static int virtnet_find_vqs(struct virtnet_info *vi) > > int ret = -ENOMEM; > > int i, total_vqs; > > const char **names; > > + const bool *ctx; > > > > /* We expect 1 RX virtqueue followed by 1 TX virtqueue, followed by > > * possible N-1 RX/TX queue pairs used in multi...
2017 Mar 30
1
[PATCH 4/6] virtio_net: allow specifying context for rx
...1 file changed, 14 insertions(+), 1 deletion(-) > > > > diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c > > index 6802169..340f737 100644 > > --- a/drivers/net/virtio_net.c > > +++ b/drivers/net/virtio_net.c > > @@ -2044,6 +2044,7 @@ static int virtnet_find_vqs(struct virtnet_info *vi) > > int ret = -ENOMEM; > > int i, total_vqs; > > const char **names; > > + const bool *ctx; > > > > /* We expect 1 RX virtqueue followed by 1 TX virtqueue, followed by > > * possible N-1 RX/TX queue pairs used in multi...
2014 Dec 26
0
[RFC PATCH 3/3] virtio-net: using single MSIX irq for each TX/RX queue pair
...c +++ b/drivers/net/virtio_net.c @@ -72,6 +72,9 @@ struct send_queue { /* Name of the send queue: output.$index */ char name[40]; + + /* Name of the channel, share with rxq */ + char channel_name[40]; }; /* Internal representation of a receive virtqueue */ @@ -1522,6 +1525,8 @@ static int virtnet_find_vqs(struct virtnet_info *vi) int ret = -ENOMEM; int i, total_vqs; const char **names; + const char **channel_names; + unsigned *channels; /* We expect 1 RX virtqueue followed by 1 TX virtqueue, followed by * possible N-1 RX/TX queue pairs used in multiqueue mode, followed by @@ -1540,6 +1...
2014 Dec 26
0
[RFC PATCH 3/3] virtio-net: using single MSIX irq for each TX/RX queue pair
...c +++ b/drivers/net/virtio_net.c @@ -72,6 +72,9 @@ struct send_queue { /* Name of the send queue: output.$index */ char name[40]; + + /* Name of the channel, share with rxq */ + char channel_name[40]; }; /* Internal representation of a receive virtqueue */ @@ -1522,6 +1525,8 @@ static int virtnet_find_vqs(struct virtnet_info *vi) int ret = -ENOMEM; int i, total_vqs; const char **names; + const char **channel_names; + unsigned *channels; /* We expect 1 RX virtqueue followed by 1 TX virtqueue, followed by * possible N-1 RX/TX queue pairs used in multiqueue mode, followed by @@ -1540,6 +1...
2017 Mar 30
0
[PATCH 4/6] virtio_net: allow specifying context for rx
...t.c | 15 ++++++++++++++- > 1 file changed, 14 insertions(+), 1 deletion(-) > > diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c > index 6802169..340f737 100644 > --- a/drivers/net/virtio_net.c > +++ b/drivers/net/virtio_net.c > @@ -2044,6 +2044,7 @@ static int virtnet_find_vqs(struct virtnet_info *vi) > int ret = -ENOMEM; > int i, total_vqs; > const char **names; > + const bool *ctx; > > /* We expect 1 RX virtqueue followed by 1 TX virtqueue, followed by > * possible N-1 RX/TX queue pairs used in multiqueue mode, followed by > @@ -20...
2017 Mar 29
1
[PATCH] virtio_net: fix support for small rings
...rtqueue_get_vring_size(vq); + unsigned int packet_len = vi->big_packets ? IP_MAX_MTU : vi->dev->max_mtu; + unsigned int buf_len = hdr_len + ETH_HLEN + VLAN_HLEN + packet_len; + unsigned int min_buf_len = DIV_ROUND_UP(buf_len, rq_size); + + return max(min_buf_len, hdr_len); +} + static int virtnet_find_vqs(struct virtnet_info *vi) { vq_callback_t **callbacks; @@ -2151,6 +2170,7 @@ static int virtnet_find_vqs(struct virtnet_info *vi) for (i = 0; i < vi->max_queue_pairs; i++) { vi->rq[i].vq = vqs[rxq2vq(i)]; + vi->rq[i].min_buf_len = mergeable_min_buf_len(vi, vi->rq[i].vq);...
2017 Mar 29
1
[PATCH] virtio_net: fix support for small rings
...rtqueue_get_vring_size(vq); + unsigned int packet_len = vi->big_packets ? IP_MAX_MTU : vi->dev->max_mtu; + unsigned int buf_len = hdr_len + ETH_HLEN + VLAN_HLEN + packet_len; + unsigned int min_buf_len = DIV_ROUND_UP(buf_len, rq_size); + + return max(min_buf_len, hdr_len); +} + static int virtnet_find_vqs(struct virtnet_info *vi) { vq_callback_t **callbacks; @@ -2151,6 +2170,7 @@ static int virtnet_find_vqs(struct virtnet_info *vi) for (i = 0; i < vi->max_queue_pairs; i++) { vi->rq[i].vq = vqs[rxq2vq(i)]; + vi->rq[i].min_buf_len = mergeable_min_buf_len(vi, vi->rq[i].vq);...
2017 Mar 29
1
[PATCH v2] virtio_net: fix support for small rings
...rtqueue_get_vring_size(vq); + unsigned int packet_len = vi->big_packets ? IP_MAX_MTU : vi->dev->max_mtu; + unsigned int buf_len = hdr_len + ETH_HLEN + VLAN_HLEN + packet_len; + unsigned int min_buf_len = DIV_ROUND_UP(buf_len, rq_size); + + return max(min_buf_len, hdr_len); +} + static int virtnet_find_vqs(struct virtnet_info *vi) { vq_callback_t **callbacks; @@ -2151,6 +2171,7 @@ static int virtnet_find_vqs(struct virtnet_info *vi) for (i = 0; i < vi->max_queue_pairs; i++) { vi->rq[i].vq = vqs[rxq2vq(i)]; + vi->rq[i].min_buf_len = mergeable_min_buf_len(vi, vi->rq[i].vq);...
2017 Mar 29
1
[PATCH v2] virtio_net: fix support for small rings
...rtqueue_get_vring_size(vq); + unsigned int packet_len = vi->big_packets ? IP_MAX_MTU : vi->dev->max_mtu; + unsigned int buf_len = hdr_len + ETH_HLEN + VLAN_HLEN + packet_len; + unsigned int min_buf_len = DIV_ROUND_UP(buf_len, rq_size); + + return max(min_buf_len, hdr_len); +} + static int virtnet_find_vqs(struct virtnet_info *vi) { vq_callback_t **callbacks; @@ -2151,6 +2171,7 @@ static int virtnet_find_vqs(struct virtnet_info *vi) for (i = 0; i < vi->max_queue_pairs; i++) { vi->rq[i].vq = vqs[rxq2vq(i)]; + vi->rq[i].min_buf_len = mergeable_min_buf_len(vi, vi->rq[i].vq);...
2017 Jul 07
2
[PATCH net] virtio-net: fix leaking of ctx array
...ason Wang <jasowang at redhat.com> --- drivers/net/virtio_net.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 2e69bcd..99a26a9 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -2229,6 +2229,7 @@ static int virtnet_find_vqs(struct virtnet_info *vi) kfree(names); kfree(callbacks); kfree(vqs); + kfree(ctx); return 0; -- 2.7.4
2017 Jul 07
2
[PATCH net] virtio-net: fix leaking of ctx array
...ason Wang <jasowang at redhat.com> --- drivers/net/virtio_net.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 2e69bcd..99a26a9 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -2229,6 +2229,7 @@ static int virtnet_find_vqs(struct virtnet_info *vi) kfree(names); kfree(callbacks); kfree(vqs); + kfree(ctx); return 0; -- 2.7.4
2017 Jun 01
4
[PATCH] virtio_net: lower limit on buffer size
...t_info *vi, struct virtqu unsigned int buf_len = hdr_len + ETH_HLEN + VLAN_HLEN + packet_len; unsigned int min_buf_len = DIV_ROUND_UP(buf_len, rq_size); - return max(min_buf_len, hdr_len); + return max(max(min_buf_len, hdr_len) - hdr_len, + (unsigned int)GOOD_PACKET_LEN); } static int virtnet_find_vqs(struct virtnet_info *vi) -- MST
2017 Jun 01
4
[PATCH] virtio_net: lower limit on buffer size
...t_info *vi, struct virtqu unsigned int buf_len = hdr_len + ETH_HLEN + VLAN_HLEN + packet_len; unsigned int min_buf_len = DIV_ROUND_UP(buf_len, rq_size); - return max(min_buf_len, hdr_len); + return max(max(min_buf_len, hdr_len) - hdr_len, + (unsigned int)GOOD_PACKET_LEN); } static int virtnet_find_vqs(struct virtnet_info *vi) -- MST
2014 Dec 26
8
[RFC PATCH 0/3] Sharing MSIX irq for tx/rx queue pairs
Hi all: This series try to share MSIX irq for each tx/rx queue pair. This is done through: - introducing virtio pci channel which are group of virtqueues that sharing a single MSIX irq (Patch 1) - expose channel setting to virtio core api (Patch 2) - try to use channel setting in virtio-net (Patch 3) For the transport that does not support channel, channel paramters were simply ignored. For
2014 Dec 26
8
[RFC PATCH 0/3] Sharing MSIX irq for tx/rx queue pairs
Hi all: This series try to share MSIX irq for each tx/rx queue pair. This is done through: - introducing virtio pci channel which are group of virtqueues that sharing a single MSIX irq (Patch 1) - expose channel setting to virtio core api (Patch 2) - try to use channel setting in virtio-net (Patch 3) For the transport that does not support channel, channel paramters were simply ignored. For
2017 Jul 18
1
[PATCH net-next 3/5] virtio-net: switch to use new ctx API for small buffer
...t; void *buf; > struct virtnet_stats *stats = this_cpu_ptr(vi->stats); > > - if (vi->mergeable_rx_bufs) { > + if (!vi->big_packets || vi->mergeable_rx_bufs) { > void *ctx; > > while (received < budget && > @@ -2198,7 +2200,7 @@ static int virtnet_find_vqs(struct virtnet_info *vi) > names = kmalloc(total_vqs * sizeof(*names), GFP_KERNEL); > if (!names) > goto err_names; > - if (vi->mergeable_rx_bufs) { > + if (!vi->big_packets || vi->mergeable_rx_bufs) { > ctx = kzalloc(total_vqs * sizeof(*ctx), GFP_KERNEL); >...
2017 Jul 18
1
[PATCH net-next 3/5] virtio-net: switch to use new ctx API for small buffer
...t; void *buf; > struct virtnet_stats *stats = this_cpu_ptr(vi->stats); > > - if (vi->mergeable_rx_bufs) { > + if (!vi->big_packets || vi->mergeable_rx_bufs) { > void *ctx; > > while (received < budget && > @@ -2198,7 +2200,7 @@ static int virtnet_find_vqs(struct virtnet_info *vi) > names = kmalloc(total_vqs * sizeof(*names), GFP_KERNEL); > if (!names) > goto err_names; > - if (vi->mergeable_rx_bufs) { > + if (!vi->big_packets || vi->mergeable_rx_bufs) { > ctx = kzalloc(total_vqs * sizeof(*ctx), GFP_KERNEL); >...
2023 Apr 13
1
[PATCH net-next V2 2/2] virtio-net: sleep instead of busy waiting for cvq command
...vq, &tmp) && > - !virtqueue_is_broken(vi->cvq)) > - cpu_relax(); > + wait_for_completion(&vi->completion); > + virtqueue_get_buf(vi->cvq, &tmp); > > return vi->ctrl->status == VIRTIO_NET_OK; > } > @@ -3672,7 +3678,7 @@ static int virtnet_find_vqs(struct virtnet_info *vi) > > /* Parameters for control virtqueue, if any */ > if (vi->has_cvq) { > - callbacks[total_vqs - 1] = NULL; > + callbacks[total_vqs - 1] = virtnet_cvq_done; This depends the interrupt, right? I worry that there may be some devices that may not su...