Displaying 20 results from an estimated 472 matches for "page_address".
2014 Jan 15
2
[PATCH stable-only] virtio-net: fix build on m68k and sparc64
On Wed, Jan 15, 2014 at 09:36:13AM +0100, Geert Uytterhoeven wrote:
> On Wed, Jan 15, 2014 at 9:26 AM, Michael S. Tsirkin <mst at redhat.com> wrote:
> > As a result of backporting a bugfix, virtio_net started passing void *
> > to page_address, assuming that it will get silently converted to struct
> > page *. But this does not happen on architectures where page_address is
> > a macro, the result is build failure as the macro tries to dereference
> > void*.
> >
> > Fix by reordering code slightly, so we alwa...
2014 Jan 15
2
[PATCH stable-only] virtio-net: fix build on m68k and sparc64
On Wed, Jan 15, 2014 at 09:36:13AM +0100, Geert Uytterhoeven wrote:
> On Wed, Jan 15, 2014 at 9:26 AM, Michael S. Tsirkin <mst at redhat.com> wrote:
> > As a result of backporting a bugfix, virtio_net started passing void *
> > to page_address, assuming that it will get silently converted to struct
> > page *. But this does not happen on architectures where page_address is
> > a macro, the result is build failure as the macro tries to dereference
> > void*.
> >
> > Fix by reordering code slightly, so we alwa...
2014 Jan 15
2
[PATCH stable-only] virtio-net: fix build on m68k and sparc64
As a result of backporting a bugfix, virtio_net started passing void *
to page_address, assuming that it will get silently converted to struct
page *. But this does not happen on architectures where page_address is
a macro, the result is build failure as the macro tries to dereference
void*.
Fix by reordering code slightly, so we always pass
struct page * to page_address.
Reported-...
2014 Jan 15
2
[PATCH stable-only] virtio-net: fix build on m68k and sparc64
As a result of backporting a bugfix, virtio_net started passing void *
to page_address, assuming that it will get silently converted to struct
page *. But this does not happen on architectures where page_address is
a macro, the result is build failure as the macro tries to dereference
void*.
Fix by reordering code slightly, so we always pass
struct page * to page_address.
Reported-...
2023 Mar 28
1
[PATCH net-next 2/8] virtio_net: mergeable xdp: introduce mergeable_xdp_prepare
...+ } else if (unlikely(headroom < virtnet_get_headroom(vi))) {
+ xdp_room = SKB_DATA_ALIGN(VIRTIO_XDP_HEADROOM +
+ sizeof(struct skb_shared_info));
+ if (*len + xdp_room > PAGE_SIZE)
+ return NULL;
+
+ xdp_page = alloc_page(GFP_ATOMIC);
+ if (!xdp_page)
+ return NULL;
+
+ memcpy(page_address(xdp_page) + VIRTIO_XDP_HEADROOM,
+ page_address(*page) + offset, *len);
+ } else {
+ return page_address(*page) + offset;
+ }
+
+ *frame_sz = PAGE_SIZE;
+
+ put_page(*page);
+
+ *page = xdp_page;
+
+ return page_address(xdp_page) + VIRTIO_XDP_HEADROOM;
+}
+
static struct sk_buff *receive_...
2023 Mar 31
1
[PATCH net-next 2/8] virtio_net: mergeable xdp: introduce mergeable_xdp_prepare
...adroom(vi))) {
> + xdp_room = SKB_DATA_ALIGN(VIRTIO_XDP_HEADROOM +
> + sizeof(struct skb_shared_info));
> + if (*len + xdp_room > PAGE_SIZE)
> + return NULL;
> +
> + xdp_page = alloc_page(GFP_ATOMIC);
> + if (!xdp_page)
> + return NULL;
> +
> + memcpy(page_address(xdp_page) + VIRTIO_XDP_HEADROOM,
> + page_address(*page) + offset, *len);
> + } else {
> + return page_address(*page) + offset;
This makes the code a little harder to be read than the original code.
Why not do a verbatim moving without introducing new logic? (Or
introducing ne...
2017 Jul 18
1
[PATCH net-next 4/5] virtio-net: do not reset during XDP set
...ve_queue *rq,
> + u16 *num_buf,
> + struct page *p,
> + int offset,
> + int page_off,
> + unsigned int *len)
> +{
> + struct page *page = alloc_page(GFP_ATOMIC);
> +
> + if (!page)
> + return NULL;
> +
> + memcpy(page_address(page) + page_off, page_address(p) + offset, *len);
> + page_off += *len;
> +
> + while (--*num_buf) {
> + unsigned int buflen;
> + void *buf;
> + int off;
> +
> + buf = virtqueue_get_buf(rq->vq, &buflen);
> + if (unlikely(!buf))
> + goto err_buf;
> +
&...
2017 Jul 18
1
[PATCH net-next 4/5] virtio-net: do not reset during XDP set
...ve_queue *rq,
> + u16 *num_buf,
> + struct page *p,
> + int offset,
> + int page_off,
> + unsigned int *len)
> +{
> + struct page *page = alloc_page(GFP_ATOMIC);
> +
> + if (!page)
> + return NULL;
> +
> + memcpy(page_address(page) + page_off, page_address(p) + offset, *len);
> + page_off += *len;
> +
> + while (--*num_buf) {
> + unsigned int buflen;
> + void *buf;
> + int off;
> +
> + buf = virtqueue_get_buf(rq->vq, &buflen);
> + if (unlikely(!buf))
> + goto err_buf;
> +
&...
2017 Jul 17
0
[PATCH net-next 4/5] virtio-net: do not reset during XDP set
...g.
+ */
+static struct page *xdp_linearize_page(struct receive_queue *rq,
+ u16 *num_buf,
+ struct page *p,
+ int offset,
+ int page_off,
+ unsigned int *len)
+{
+ struct page *page = alloc_page(GFP_ATOMIC);
+
+ if (!page)
+ return NULL;
+
+ memcpy(page_address(page) + page_off, page_address(p) + offset, *len);
+ page_off += *len;
+
+ while (--*num_buf) {
+ unsigned int buflen;
+ void *buf;
+ int off;
+
+ buf = virtqueue_get_buf(rq->vq, &buflen);
+ if (unlikely(!buf))
+ goto err_buf;
+
+ p = virt_to_head_page(buf);
+ off = buf - page_addre...
2013 Nov 27
0
[PATCH 07/25] block: Convert bio_for_each_segment() to bvec_iter
...>io_addr + bank->size;
transfered = 0;
- bio_for_each_segment(vec, bio, idx) {
- if (unlikely(phys_mem + vec->bv_len > phys_end)) {
+ bio_for_each_segment(vec, bio, iter) {
+ if (unlikely(phys_mem + vec.bv_len > phys_end)) {
bio_io_error(bio);
return;
}
- user_mem = page_address(vec->bv_page) + vec->bv_offset;
+ user_mem = page_address(vec.bv_page) + vec.bv_offset;
if (bio_data_dir(bio) == READ)
- memcpy(user_mem, (void *) phys_mem, vec->bv_len);
+ memcpy(user_mem, (void *) phys_mem, vec.bv_len);
else
- memcpy((void *) phys_mem, user_mem, vec->bv_l...
2013 Nov 27
0
[PATCH 07/25] block: Convert bio_for_each_segment() to bvec_iter
...>io_addr + bank->size;
transfered = 0;
- bio_for_each_segment(vec, bio, idx) {
- if (unlikely(phys_mem + vec->bv_len > phys_end)) {
+ bio_for_each_segment(vec, bio, iter) {
+ if (unlikely(phys_mem + vec.bv_len > phys_end)) {
bio_io_error(bio);
return;
}
- user_mem = page_address(vec->bv_page) + vec->bv_offset;
+ user_mem = page_address(vec.bv_page) + vec.bv_offset;
if (bio_data_dir(bio) == READ)
- memcpy(user_mem, (void *) phys_mem, vec->bv_len);
+ memcpy(user_mem, (void *) phys_mem, vec.bv_len);
else
- memcpy((void *) phys_mem, user_mem, vec->bv_l...
2013 Nov 27
0
[PATCH 07/25] block: Convert bio_for_each_segment() to bvec_iter
...>io_addr + bank->size;
transfered = 0;
- bio_for_each_segment(vec, bio, idx) {
- if (unlikely(phys_mem + vec->bv_len > phys_end)) {
+ bio_for_each_segment(vec, bio, iter) {
+ if (unlikely(phys_mem + vec.bv_len > phys_end)) {
bio_io_error(bio);
return;
}
- user_mem = page_address(vec->bv_page) + vec->bv_offset;
+ user_mem = page_address(vec.bv_page) + vec.bv_offset;
if (bio_data_dir(bio) == READ)
- memcpy(user_mem, (void *) phys_mem, vec->bv_len);
+ memcpy(user_mem, (void *) phys_mem, vec.bv_len);
else
- memcpy((void *) phys_mem, user_mem, vec->bv_l...
2018 Mar 01
0
[PATCH net-next 2/2] virtio-net: simplify XDP handling in small buffer
...m.
- */
-static struct page *xdp_linearize_page(struct receive_queue *rq,
- u16 *num_buf,
- struct page *p,
- int offset,
- int page_off,
- unsigned int *len)
-{
- struct page *page = alloc_page(GFP_ATOMIC);
-
- if (!page)
- return NULL;
-
- memcpy(page_address(page) + page_off, page_address(p) + offset, *len);
- page_off += *len;
-
- while (--*num_buf) {
- unsigned int buflen;
- void *buf;
- int off;
-
- buf = virtqueue_get_buf(rq->vq, &buflen);
- if (unlikely(!buf))
- goto err_buf;
-
- p = virt_to_head_page(buf);
- off = buf - page_addre...
2016 Dec 23
0
[PATCH net 3/9] virtio-net: fix page miscount during XDP linearizing
...*/
static struct page *xdp_linearize_page(struct receive_queue *rq,
- u16 num_buf,
+ u16 *num_buf,
struct page *p,
int offset,
unsigned int *len)
@@ -497,7 +497,7 @@ static struct page *xdp_linearize_page(struct receive_queue *rq,
memcpy(page_address(page) + page_off, page_address(p) + offset, *len);
page_off += *len;
- while (--num_buf) {
+ while (--*num_buf) {
unsigned int buflen;
unsigned long ctx;
void *buf;
@@ -507,19 +507,22 @@ static struct page *xdp_linearize_page(struct receive_queue *rq,
if (unlikely(!ctx))
goto er...
2008 Jul 26
5
BUG: soft lockup - CPU#1 stuck for 61s!
...7
Jul 25 02:15:02 vega2008 kernel: [<c046dfcf>] ? kernel_read+0x32/0x43
Jul 25 02:15:02 vega2008 kernel: [<c0490e60>] ? load_elf_binary+0x359/0x1152
Jul 25 02:15:02 vega2008 kernel: [<c045a6ee>] ? get_user_pages+0x2d5/0x35c
Jul 25 02:15:02 vega2008 kernel: [<c04570d2>] ? page_address+0x78/0x98
Jul 25 02:15:02 vega2008 kernel: [<c045735a>] ? kmap_high+0x19/0x16b
Jul 25 02:15:02 vega2008 kernel: [<c04570d2>] ? page_address+0x78/0x98
Jul 25 02:15:02 vega2008 kernel: [<c046dced>] ? copy_strings+0x169/0x173
Jul 25 02:15:02 vega2008 kernel: [<c046ddad>] ?...
2018 Mar 01
7
[PATCH net-next 0/2] virtio-net: re enable XDP_REDIRECT for mergeable buffer
Hi:
This series tries to re-enable XDP_REDIRECT for mergeable buffer which
was removed since commit 7324f5399b06 ("virtio_net: disable
XDP_REDIRECT in receive_mergeable() case"). Main concerns are:
- not enough tailroom was reserved which breaks cpumap
- complex logic like EWMA and linearizing during XDP processing
Fix those by:
- reserve enough tailroom during refill
- disable EWMA
2018 Mar 01
7
[PATCH net-next 0/2] virtio-net: re enable XDP_REDIRECT for mergeable buffer
Hi:
This series tries to re-enable XDP_REDIRECT for mergeable buffer which
was removed since commit 7324f5399b06 ("virtio_net: disable
XDP_REDIRECT in receive_mergeable() case"). Main concerns are:
- not enough tailroom was reserved which breaks cpumap
- complex logic like EWMA and linearizing during XDP processing
Fix those by:
- reserve enough tailroom during refill
- disable EWMA
2014 Jan 15
0
[PATCH stable-only] virtio-net: fix build on m68k and sparc64
...t;mst at redhat.com> wrote:
> On Wed, Jan 15, 2014 at 09:36:13AM +0100, Geert Uytterhoeven wrote:
>> On Wed, Jan 15, 2014 at 9:26 AM, Michael S. Tsirkin <mst at redhat.com> wrote:
>> > As a result of backporting a bugfix, virtio_net started passing void *
>> > to page_address, assuming that it will get silently converted to struct
>> > page *. But this does not happen on architectures where page_address is
>> > a macro, the result is build failure as the macro tries to dereference
>> > void*.
>> >
>> > Fix by reordering code...
2017 Jul 17
13
[PATCH net-next 0/5] refine virtio-net XDP
Hi:
This series brings two optimizations for virtio-net XDP:
- avoid reset during XDP set
- turn off offloads on demand
Please review.
Thanks
Jason Wang (5):
virtio_ring: allow to store zero as the ctx
virtio-net: pack headroom into ctx for mergeable buffer
virtio-net: switch to use new ctx API for small buffer
virtio-net: do not reset during XDP set
virtio-net: switch off offloads
2017 Jul 17
13
[PATCH net-next 0/5] refine virtio-net XDP
Hi:
This series brings two optimizations for virtio-net XDP:
- avoid reset during XDP set
- turn off offloads on demand
Please review.
Thanks
Jason Wang (5):
virtio_ring: allow to store zero as the ctx
virtio-net: pack headroom into ctx for mergeable buffer
virtio-net: switch to use new ctx API for small buffer
virtio-net: do not reset during XDP set
virtio-net: switch off offloads