Displaying 20 results from an estimated 138 matches for "err_names".
2017 Mar 29
2
[PATCH 4/6] virtio_net: allow specifying context for rx
.../* 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_vqs(struct virtnet_info *vi)
names = kmalloc(total_vqs * sizeof(*names), GFP_KERNEL);
if (!names)
goto err_names;
+ if (vi->mergeable_rx_bufs) {
+ ctx = kzalloc(total_vqs * sizeof(*ctx), GFP_KERNEL);
+ if (!ctx)
+ goto err_ctx;
+ } else {
+ ctx = NULL;
+ }
/* Parameters for control virtqueue, if any */
if (vi->has_cvq) {
@@ -2077,9 +2085,12 @@ static int virtnet_find_vqs(struct virtnet_info *...
2017 Mar 29
2
[PATCH 4/6] virtio_net: allow specifying context for rx
.../* 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_vqs(struct virtnet_info *vi)
names = kmalloc(total_vqs * sizeof(*names), GFP_KERNEL);
if (!names)
goto err_names;
+ if (vi->mergeable_rx_bufs) {
+ ctx = kzalloc(total_vqs * sizeof(*ctx), GFP_KERNEL);
+ if (!ctx)
+ goto err_ctx;
+ } else {
+ ctx = NULL;
+ }
/* Parameters for control virtqueue, if any */
if (vi->has_cvq) {
@@ -2077,9 +2085,12 @@ static int virtnet_find_vqs(struct virtnet_info *...
2016 Jul 18
2
[PATCH v2] virtio_blk: Fix a slient kernel panic
...nit_vq(struct virtio_blk *vblk)
num_vqs = 1;
vblk->vqs = kmalloc(sizeof(*vblk->vqs) * num_vqs, GFP_KERNEL);
- if (!vblk->vqs) {
- err = -ENOMEM;
- goto out;
- }
+ if (!vblk->vqs)
+ return -ENOMEM;
names = kmalloc(sizeof(*names) * num_vqs, GFP_KERNEL);
- if (!names)
- goto err_names;
-
callbacks = kmalloc(sizeof(*callbacks) * num_vqs, GFP_KERNEL);
- if (!callbacks)
- goto err_callbacks;
-
vqs = kmalloc(sizeof(*vqs) * num_vqs, GFP_KERNEL);
- if (!vqs)
- goto err_vqs;
+ if (!names || !callbacks || !vqs) {
+ err = -ENOMEM;
+ goto out;
+ }
for (i = 0; i < num_vqs; i...
2016 Jul 18
2
[PATCH v2] virtio_blk: Fix a slient kernel panic
...nit_vq(struct virtio_blk *vblk)
num_vqs = 1;
vblk->vqs = kmalloc(sizeof(*vblk->vqs) * num_vqs, GFP_KERNEL);
- if (!vblk->vqs) {
- err = -ENOMEM;
- goto out;
- }
+ if (!vblk->vqs)
+ return -ENOMEM;
names = kmalloc(sizeof(*names) * num_vqs, GFP_KERNEL);
- if (!names)
- goto err_names;
-
callbacks = kmalloc(sizeof(*callbacks) * num_vqs, GFP_KERNEL);
- if (!callbacks)
- goto err_callbacks;
-
vqs = kmalloc(sizeof(*vqs) * num_vqs, GFP_KERNEL);
- if (!vqs)
- goto err_vqs;
+ if (!names || !callbacks || !vqs) {
+ err = -ENOMEM;
+ goto out;
+ }
for (i = 0; i < num_vqs; i...
2017 Mar 30
1
[PATCH 4/6] virtio_net: allow specifying context for rx
...tqueue, followed by
> > * possible N-1 RX/TX queue pairs used in multiqueue mode, followed by
> > @@ -2062,6 +2063,13 @@ 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) {
> > + ctx = kzalloc(total_vqs * sizeof(*ctx), GFP_KERNEL);
> > + if (!ctx)
> > + goto err_ctx;
> > + } else {
> > + ctx = NULL;
> > + }
> >
> > /* Parameters for control virtqueue, if any */
> &...
2017 Mar 30
1
[PATCH 4/6] virtio_net: allow specifying context for rx
...tqueue, followed by
> > * possible N-1 RX/TX queue pairs used in multiqueue mode, followed by
> > @@ -2062,6 +2063,13 @@ 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) {
> > + ctx = kzalloc(total_vqs * sizeof(*ctx), GFP_KERNEL);
> > + if (!ctx)
> > + goto err_ctx;
> > + } else {
> > + ctx = NULL;
> > + }
> >
> > /* Parameters for control virtqueue, if any */
> &...
2017 Aug 03
2
[PATCH v13 5/5] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ
...(nvqs, sizeof(*callbacks), GFP_KERNEL);
> + if (!callbacks)
> + goto err_callback;
> + names = kmalloc_array(nvqs, sizeof(*names), GFP_KERNEL);
is size here (integer) intentional?
> + if (!names)
> + goto err_names;
> +
> + callbacks[0] = balloon_ack;
> + names[0] = "inflate";
> + callbacks[1] = balloon_ack;
> + names[1] = "deflate";
> +
> + i = 2;
> + if (virtio_has_feature(vb->vdev, VIRTIO_BALLOON_F_STATS_VQ)) {
> +...
2017 Aug 03
2
[PATCH v13 5/5] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ
...(nvqs, sizeof(*callbacks), GFP_KERNEL);
> + if (!callbacks)
> + goto err_callback;
> + names = kmalloc_array(nvqs, sizeof(*names), GFP_KERNEL);
is size here (integer) intentional?
> + if (!names)
> + goto err_names;
> +
> + callbacks[0] = balloon_ack;
> + names[0] = "inflate";
> + callbacks[1] = balloon_ack;
> + names[1] = "deflate";
> +
> + i = 2;
> + if (virtio_has_feature(vb->vdev, VIRTIO_BALLOON_F_STATS_VQ)) {
> +...
2016 Aug 09
0
[PATCH RESEND] virtio_blk: Fix a slient kernel panic
...nit_vq(struct virtio_blk *vblk)
num_vqs = 1;
vblk->vqs = kmalloc(sizeof(*vblk->vqs) * num_vqs, GFP_KERNEL);
- if (!vblk->vqs) {
- err = -ENOMEM;
- goto out;
- }
+ if (!vblk->vqs)
+ return -ENOMEM;
names = kmalloc(sizeof(*names) * num_vqs, GFP_KERNEL);
- if (!names)
- goto err_names;
-
callbacks = kmalloc(sizeof(*callbacks) * num_vqs, GFP_KERNEL);
- if (!callbacks)
- goto err_callbacks;
-
vqs = kmalloc(sizeof(*vqs) * num_vqs, GFP_KERNEL);
- if (!vqs)
- goto err_vqs;
+ if (!names || !callbacks || !vqs) {
+ err = -ENOMEM;
+ goto out;
+ }
for (i = 0; i < num_vqs; i...
2017 Mar 30
0
[PATCH 4/6] virtio_net: allow specifying context for rx
...ueue 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_vqs(struct virtnet_info *vi)
> names = kmalloc(total_vqs * sizeof(*names), GFP_KERNEL);
> if (!names)
> goto err_names;
> + if (vi->mergeable_rx_bufs) {
> + ctx = kzalloc(total_vqs * sizeof(*ctx), GFP_KERNEL);
> + if (!ctx)
> + goto err_ctx;
> + } else {
> + ctx = NULL;
> + }
>
> /* Parameters for control virtqueue, if any */
> if (vi->has_cvq) {
> @@ -2077,9 +2085,...
2017 Aug 03
1
[PATCH v13 5/5] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ
...izeof(*names), GFP_KERNEL);
> >
> > is size here (integer) intentional?
>
>
> Sorry, I didn't get it. Could you please elaborate more?
This is okay
>
>
> >
> >> + if (!names)
> >> + goto err_names;
> >> +
> >> + callbacks[0] = balloon_ack;
> >> + names[0] = "inflate";
> >> + callbacks[1] = balloon_ack;
> >> + names[1] = "deflate";
> >> +
> >> + i = 2;
> >> + i...
2016 Aug 09
0
[PATCH RESEND] virtio_blk: Fix a slient kernel panic
...nit_vq(struct virtio_blk *vblk)
num_vqs = 1;
vblk->vqs = kmalloc(sizeof(*vblk->vqs) * num_vqs, GFP_KERNEL);
- if (!vblk->vqs) {
- err = -ENOMEM;
- goto out;
- }
+ if (!vblk->vqs)
+ return -ENOMEM;
names = kmalloc(sizeof(*names) * num_vqs, GFP_KERNEL);
- if (!names)
- goto err_names;
-
callbacks = kmalloc(sizeof(*callbacks) * num_vqs, GFP_KERNEL);
- if (!callbacks)
- goto err_callbacks;
-
vqs = kmalloc(sizeof(*vqs) * num_vqs, GFP_KERNEL);
- if (!vqs)
- goto err_vqs;
+ if (!names || !callbacks || !vqs) {
+ err = -ENOMEM;
+ goto out;
+ }
for (i = 0; i < num_vqs; i...
2017 Aug 03
1
[PATCH v13 5/5] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ
...izeof(*names), GFP_KERNEL);
> >
> > is size here (integer) intentional?
>
>
> Sorry, I didn't get it. Could you please elaborate more?
This is okay
>
>
> >
> >> + if (!names)
> >> + goto err_names;
> >> +
> >> + callbacks[0] = balloon_ack;
> >> + names[0] = "inflate";
> >> + callbacks[1] = balloon_ack;
> >> + names[1] = "deflate";
> >> +
> >> + i = 2;
> >> + i...
2016 Jul 18
2
[PATCH v2] virtio_blk: Fix a slient kernel panic
...num_vqs, GFP_KERNEL);
> > - if (!vblk->vqs) {
> > - err = -ENOMEM;
> > - goto out;
> > - }
> > + if (!vblk->vqs)
> > + return -ENOMEM;
> >
> > names = kmalloc(sizeof(*names) * num_vqs, GFP_KERNEL);
> > - if (!names)
> > - goto err_names;
> > -
> > callbacks = kmalloc(sizeof(*callbacks) * num_vqs, GFP_KERNEL);
> > - if (!callbacks)
> > - goto err_callbacks;
> > -
> > vqs = kmalloc(sizeof(*vqs) * num_vqs, GFP_KERNEL);
> > - if (!vqs)
> > - goto err_vqs;
> > + if (!names ||...
2016 Jul 18
2
[PATCH v2] virtio_blk: Fix a slient kernel panic
...num_vqs, GFP_KERNEL);
> > - if (!vblk->vqs) {
> > - err = -ENOMEM;
> > - goto out;
> > - }
> > + if (!vblk->vqs)
> > + return -ENOMEM;
> >
> > names = kmalloc(sizeof(*names) * num_vqs, GFP_KERNEL);
> > - if (!names)
> > - goto err_names;
> > -
> > callbacks = kmalloc(sizeof(*callbacks) * num_vqs, GFP_KERNEL);
> > - if (!callbacks)
> > - goto err_callbacks;
> > -
> > vqs = kmalloc(sizeof(*vqs) * num_vqs, GFP_KERNEL);
> > - if (!vqs)
> > - goto err_vqs;
> > + if (!names ||...
2014 Dec 26
0
[RFC PATCH 3/3] virtio-net: using single MSIX irq for each TX/RX queue pair
.../* 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 +1545,14 @@ static int virtnet_find_vqs(struct virtnet_info *vi)
names = kmalloc(total_vqs * sizeof(*names), GFP_KERNEL);
if (!names)
goto err_names;
+ channel_names = kmalloc_array(vi->max_queue_pairs,
+ sizeof(*channel_names),
+ GFP_KERNEL);
+ if (!channel_names)
+ goto err_channel_names;
+ channels = kmalloc_array(total_vqs, sizeof(*channels), GFP_KERNEL);
+ if (!channels)
+ goto err_channels;
/* Parameters for con...
2014 Dec 26
0
[RFC PATCH 3/3] virtio-net: using single MSIX irq for each TX/RX queue pair
.../* 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 +1545,14 @@ static int virtnet_find_vqs(struct virtnet_info *vi)
names = kmalloc(total_vqs * sizeof(*names), GFP_KERNEL);
if (!names)
goto err_names;
+ channel_names = kmalloc_array(vi->max_queue_pairs,
+ sizeof(*channel_names),
+ GFP_KERNEL);
+ if (!channel_names)
+ goto err_channel_names;
+ channels = kmalloc_array(total_vqs, sizeof(*channels), GFP_KERNEL);
+ if (!channels)
+ goto err_channels;
/* Parameters for con...
2014 Jun 26
1
[PATCH v2 2/2] block: virtio-blk: support multi virt queues per virtio-blk device
...NULL) just in case someone redefined it, either.
> + if (!name_array)
> + goto err_name_array;
You want vmalloc here, it will fail on high # of vqs, and speed
doesn't matter for names.
> +
> + names = kmalloc(sizeof(*names) * num_vqs, GFP_KERNEL);
> + if (!names)
> + goto err_names;
> +
> + callbacks = kmalloc(sizeof(*callbacks) * num_vqs, GFP_KERNEL);
> + if (!callbacks)
> + goto err_callbacks;
> +
> + vqs = kmalloc(sizeof(*vqs) * num_vqs, GFP_KERNEL);
> + if (!vqs)
> + goto err_vqs;
> +
> + for (i = 0; i < num_vqs; i++) {
> + callbacks...
2014 Jun 26
1
[PATCH v2 2/2] block: virtio-blk: support multi virt queues per virtio-blk device
...NULL) just in case someone redefined it, either.
> + if (!name_array)
> + goto err_name_array;
You want vmalloc here, it will fail on high # of vqs, and speed
doesn't matter for names.
> +
> + names = kmalloc(sizeof(*names) * num_vqs, GFP_KERNEL);
> + if (!names)
> + goto err_names;
> +
> + callbacks = kmalloc(sizeof(*callbacks) * num_vqs, GFP_KERNEL);
> + if (!callbacks)
> + goto err_callbacks;
> +
> + vqs = kmalloc(sizeof(*vqs) * num_vqs, GFP_KERNEL);
> + if (!vqs)
> + goto err_vqs;
> +
> + for (i = 0; i < num_vqs; i++) {
> + callbacks...
2018 Jan 17
2
[PATCH v22 2/3] virtio-balloon: VIRTIO_BALLOON_F_FREE_PAGE_VQ
...= kcalloc(nvqs, sizeof(*vqs), GFP_KERNEL);
> + if (!vqs)
> + goto err_vq;
> + callbacks = kmalloc_array(nvqs, sizeof(*callbacks), GFP_KERNEL);
> + if (!callbacks)
> + goto err_callback;
> + names = kmalloc_array(nvqs, sizeof(*names), GFP_KERNEL);
> + if (!names)
> + goto err_names;
> +
> + callbacks[0] = balloon_ack;
> + names[0] = "inflate";
> + callbacks[1] = balloon_ack;
> + names[1] = "deflate";
> +
> + i = 2;
> + if (virtio_has_feature(vb->vdev, VIRTIO_BALLOON_F_STATS_VQ)) {
> + callbacks[i] = stats_request;
> + nam...