search for: mrg_ctx_header_shift

Displaying 7 results from an estimated 7 matches for "mrg_ctx_header_shift".

2017 Jul 18
1
[PATCH net-next 2/5] virtio-net: pack headroom into ctx for mergeable buffer
...tio_net.c b/drivers/net/virtio_net.c > index 1f8c15c..8fae9a8 100644 > --- a/drivers/net/virtio_net.c > +++ b/drivers/net/virtio_net.c > @@ -270,6 +270,23 @@ static void skb_xmit_done(struct virtqueue *vq) > netif_wake_subqueue(vi->dev, vq2txq(vq)); > } > > +#define MRG_CTX_HEADER_SHIFT 22 > +static void *mergeable_len_to_ctx(unsigned int truesize, > + unsigned int headroom) > +{ > + return (void *)(unsigned long)((headroom << MRG_CTX_HEADER_SHIFT) | truesize); > +} > + > +static unsigned int mergeable_ctx_to_headroom(void *mrg_ctx) > +{ > + r...
2017 Jul 18
1
[PATCH net-next 2/5] virtio-net: pack headroom into ctx for mergeable buffer
...tio_net.c b/drivers/net/virtio_net.c > index 1f8c15c..8fae9a8 100644 > --- a/drivers/net/virtio_net.c > +++ b/drivers/net/virtio_net.c > @@ -270,6 +270,23 @@ static void skb_xmit_done(struct virtqueue *vq) > netif_wake_subqueue(vi->dev, vq2txq(vq)); > } > > +#define MRG_CTX_HEADER_SHIFT 22 > +static void *mergeable_len_to_ctx(unsigned int truesize, > + unsigned int headroom) > +{ > + return (void *)(unsigned long)((headroom << MRG_CTX_HEADER_SHIFT) | truesize); > +} > + > +static unsigned int mergeable_ctx_to_headroom(void *mrg_ctx) > +{ > + r...
2017 Jul 17
0
[PATCH net-next 2/5] virtio-net: pack headroom into ctx for mergeable buffer
...letions(-) diff --git a/drivers/net/virtio_net.c b/drivers/net/virtio_net.c index 1f8c15c..8fae9a8 100644 --- a/drivers/net/virtio_net.c +++ b/drivers/net/virtio_net.c @@ -270,6 +270,23 @@ static void skb_xmit_done(struct virtqueue *vq) netif_wake_subqueue(vi->dev, vq2txq(vq)); } +#define MRG_CTX_HEADER_SHIFT 22 +static void *mergeable_len_to_ctx(unsigned int truesize, + unsigned int headroom) +{ + return (void *)(unsigned long)((headroom << MRG_CTX_HEADER_SHIFT) | truesize); +} + +static unsigned int mergeable_ctx_to_headroom(void *mrg_ctx) +{ + return (unsigned long)mrg_ctx >> MRG_CTX...
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
2017 Jul 19
9
[PATCH net-next V2 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 Changes from V1: - Various tweaks on commit logs and comments - Use virtnet_napi_enable() when enabling NAPI on XDP set - Copy the small buffer packet only if xdp_headroom is smaller than required Please review. Thanks Jason Wang (5): virtio_ring: allow to store zero as
2017 Jul 19
9
[PATCH net-next V2 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 Changes from V1: - Various tweaks on commit logs and comments - Use virtnet_napi_enable() when enabling NAPI on XDP set - Copy the small buffer packet only if xdp_headroom is smaller than required Please review. Thanks Jason Wang (5): virtio_ring: allow to store zero as