search for: payload_len

Displaying 20 results from an estimated 82 matches for "payload_len".

2019 Jul 17
0
[PATCH v4 4/5] vhost/vsock: split packets to send using multiple buffers
....c b/drivers/vhost/vsock.c index 6c8390a2af52..9f57736fe15e 100644 --- a/drivers/vhost/vsock.c +++ b/drivers/vhost/vsock.c @@ -102,7 +102,7 @@ vhost_transport_do_send_pkt(struct vhost_vsock *vsock, struct iov_iter iov_iter; unsigned out, in; size_t nbytes; - size_t len; + size_t iov_len, payload_len; int head; spin_lock_bh(&vsock->send_pkt_list_lock); @@ -147,8 +147,24 @@ vhost_transport_do_send_pkt(struct vhost_vsock *vsock, break; } - len = iov_length(&vq->iov[out], in); - iov_iter_init(&iov_iter, READ, &vq->iov[out], in, len); + iov_len = iov_len...
2023 Feb 16
0
[RFC PATCH v1 06/12] vsock/virtio: non-linear skb handling for TAP dev
...= 0; >+ } >+ } >+} >+ > /* Packet capture */ > static struct sk_buff *virtio_transport_build_skb(void *opaque) > { >@@ -109,7 +142,6 @@ static struct sk_buff *virtio_transport_build_skb(void *opaque) > struct af_vsockmon_hdr *hdr; > struct sk_buff *skb; > size_t payload_len; >- void *payload_buf; > > /* A packet could be split to fit the RX buffer, so we can retrieve > * the payload length from the header and the buffer pointer taking >@@ -117,7 +149,6 @@ static struct sk_buff *virtio_transport_build_skb(void *opaque) > */ > pkt_hdr = virtio...
2019 Apr 04
1
[PATCH RFC 2/4] vhost/vsock: split packets to send using multiple buffers
...ck.c b/drivers/vhost/vsock.c index bb5fc0e9fbc2..9951b7e661f6 100644 --- a/drivers/vhost/vsock.c +++ b/drivers/vhost/vsock.c @@ -94,7 +94,7 @@ vhost_transport_do_send_pkt(struct vhost_vsock *vsock, struct iov_iter iov_iter; unsigned out, in; size_t nbytes; - size_t len; + size_t iov_len, payload_len; int head; spin_lock_bh(&vsock->send_pkt_list_lock); @@ -139,8 +139,18 @@ vhost_transport_do_send_pkt(struct vhost_vsock *vsock, break; } - len = iov_length(&vq->iov[out], in); - iov_iter_init(&iov_iter, READ, &vq->iov[out], in, len); + payload_len = pkt...
2019 Jul 17
2
[PATCH v4 4/5] vhost/vsock: split packets to send using multiple buffers
...2af52..9f57736fe15e 100644 > --- a/drivers/vhost/vsock.c > +++ b/drivers/vhost/vsock.c > @@ -102,7 +102,7 @@ vhost_transport_do_send_pkt(struct vhost_vsock *vsock, > struct iov_iter iov_iter; > unsigned out, in; > size_t nbytes; > - size_t len; > + size_t iov_len, payload_len; > int head; > > spin_lock_bh(&vsock->send_pkt_list_lock); > @@ -147,8 +147,24 @@ vhost_transport_do_send_pkt(struct vhost_vsock *vsock, > break; > } > > - len = iov_length(&vq->iov[out], in); > - iov_iter_init(&iov_iter, READ, &vq...
2019 Jul 17
2
[PATCH v4 4/5] vhost/vsock: split packets to send using multiple buffers
...2af52..9f57736fe15e 100644 > --- a/drivers/vhost/vsock.c > +++ b/drivers/vhost/vsock.c > @@ -102,7 +102,7 @@ vhost_transport_do_send_pkt(struct vhost_vsock *vsock, > struct iov_iter iov_iter; > unsigned out, in; > size_t nbytes; > - size_t len; > + size_t iov_len, payload_len; > int head; > > spin_lock_bh(&vsock->send_pkt_list_lock); > @@ -147,8 +147,24 @@ vhost_transport_do_send_pkt(struct vhost_vsock *vsock, > break; > } > > - len = iov_length(&vq->iov[out], in); > - iov_iter_init(&iov_iter, READ, &vq...
2020 Jun 08
2
[PATCH RFC v5 12/13] vhost/vsock: switch to the buf API
...ost/vsock.c b/drivers/vhost/vsock.c > index a483cec31d5c..61c6d3dd2ae3 100644 > --- a/drivers/vhost/vsock.c > +++ b/drivers/vhost/vsock.c > @@ -103,7 +103,8 @@ vhost_transport_do_send_pkt(struct vhost_vsock *vsock, > unsigned out, in; > size_t nbytes; > size_t iov_len, payload_len; > - int head; > + struct vhost_buf buf; > + int ret; > > spin_lock_bh(&vsock->send_pkt_list_lock); > if (list_empty(&vsock->send_pkt_list)) { > @@ -117,16 +118,17 @@ vhost_transport_do_send_pkt(struct vhost_vsock *vsock, > list_del_init(&pkt-...
2020 Jun 08
2
[PATCH RFC v5 12/13] vhost/vsock: switch to the buf API
...ost/vsock.c b/drivers/vhost/vsock.c > index a483cec31d5c..61c6d3dd2ae3 100644 > --- a/drivers/vhost/vsock.c > +++ b/drivers/vhost/vsock.c > @@ -103,7 +103,8 @@ vhost_transport_do_send_pkt(struct vhost_vsock *vsock, > unsigned out, in; > size_t nbytes; > size_t iov_len, payload_len; > - int head; > + struct vhost_buf buf; > + int ret; > > spin_lock_bh(&vsock->send_pkt_list_lock); > if (list_empty(&vsock->send_pkt_list)) { > @@ -117,16 +118,17 @@ vhost_transport_do_send_pkt(struct vhost_vsock *vsock, > list_del_init(&pkt-...
2014 May 25
1
traffic distribution not happening in centos 6.5
...0 opening library handle unbinding existing nf_queue handler for AF_INET (if any) binding nfnetlink_queue as nf_queue handler for AF_INET binding this socket to queue '0' setting copy_packet mode pkt received queue0 hw_protocol=0x0800 hook=1 id=0 hw_src_addr=fc:4d:d4:d3:7f:73 indev=2 payload_len=40 entering callback pkt received queue0 hw_protocol=0x0800 hook=1 id=1 hw_src_addr=fc:4d:d4:d3:7f:73 indev=2 payload_len=40 entering callback pkt received queue0 hw_protocol=0x0800 hook=1 id=2 hw_src_addr=fc:4d:d4:d3:7f:73 indev=2 payload_len=40 entering callback pkt received queue0 hw_pr...
2019 Apr 05
1
[PATCH RFC 2/4] vhost/vsock: split packets to send using multiple buffers
...rzarella wrote: > > @@ -139,8 +139,18 @@ vhost_transport_do_send_pkt(struct vhost_vsock *vsock, > > break; > > } > > > > - len = iov_length(&vq->iov[out], in); > > - iov_iter_init(&iov_iter, READ, &vq->iov[out], in, len); > > + payload_len = pkt->len - pkt->off; > > + iov_len = iov_length(&vq->iov[out], in); > > + iov_iter_init(&iov_iter, READ, &vq->iov[out], in, iov_len); > > + > > + /* If the packet is greater than the space available in the > > + * buffer, we split it usin...
2019 Apr 05
1
[PATCH RFC 2/4] vhost/vsock: split packets to send using multiple buffers
...rzarella wrote: > > @@ -139,8 +139,18 @@ vhost_transport_do_send_pkt(struct vhost_vsock *vsock, > > break; > > } > > > > - len = iov_length(&vq->iov[out], in); > > - iov_iter_init(&iov_iter, READ, &vq->iov[out], in, len); > > + payload_len = pkt->len - pkt->off; > > + iov_len = iov_length(&vq->iov[out], in); > > + iov_iter_init(&iov_iter, READ, &vq->iov[out], in, iov_len); > > + > > + /* If the packet is greater than the space available in the > > + * buffer, we split it usin...
2010 Apr 15
2
Decoded output buffer size
...9;t found it on the manual) is how to decode a multi-frame payload. Once have called speex_bits_read_from, I need a way to know how many speex frames there are, how can I do this? I try to use speex_bits_remaining, but after some cycles it returns always 4. UINT DecodePayload( char* payload, UINT payload_len ) { speex_bits_reset(&spx_bits_); speex_bits_read_from(&spx_bits_, payload, payload_len); UINT nbBytes = speex_bits_remaining(&spx_bits_); while (nbBytes>0) { speex_decode(spx_state_, &spx_bits_, spx_dec_frame_); nbBytes = speex_bits_remaining(&spx_bits_);...
2023 Aug 01
0
[PATCH net-next v5 4/4] vsock/virtio: MSG_ZEROCOPY flag support
...ort_get_type(struct sock *sk) > > > return VIRTIO_VSOCK_TYPE_SEQPACKET; > > > } > > > > > > +static struct sk_buff *virtio_transport_alloc_skb(struct vsock_sock *vsk, > > > + struct virtio_vsock_pkt_info *info, > > > + size_t payload_len, > > > + bool zcopy, > > > + u32 src_cid, > > > + u32 src_port, > > > + u32 dst_cid, > > > + u32 dst_port) > > > +{ > > > + struct sk_buff *skb; > > > + size_t skb_len; > > > + > &...
2019 May 31
7
[PATCH v3 0/5] vsock/virtio: optimizations to increase the throughput
This series tries to increase the throughput of virtio-vsock with slight changes. While I was testing the v2 of this series I discovered an huge use of memory, so I added patch 1 to mitigate this issue. I put it in this series in order to better track the performance trends. v3: - Patch 1: added a threshold to copy only small packets [Jason] - Patch 1: replaced the allocation of a new buffer
2023 Feb 16
0
[RFC PATCH v1 04/12] vhost/vsock: non-linear skb handling support
...>+ return 0; >+} >+ > static void > vhost_transport_do_send_pkt(struct vhost_vsock *vsock, > struct vhost_virtqueue *vq) >@@ -197,11 +235,19 @@ vhost_transport_do_send_pkt(struct vhost_vsock *vsock, > break; > } > >- nbytes = copy_to_iter(skb->data, payload_len, &iov_iter); >- if (nbytes != payload_len) { >- kfree_skb(skb); >- vq_err(vq, "Faulted on copying pkt buf\n"); >- break; >+ if (skb_is_nonlinear(skb)) { >+ if (vhost_transport_copy_nonlinear_skb(skb, &iov_iter, >+ payload_len)) { >+...
2014 Oct 11
0
[PATCH net-next RFC 3/3] virtio-net: conditionally enable tx interrupt
...he loop. > + return sent; > +} > + ... > + > +static bool virtnet_skb_needs_intr(struct sk_buff *skb) > +{ > + union { > + unsigned char *network; > + struct iphdr *ipv4; > + struct ipv6hdr *ipv6; > + } hdr; > + struct tcphdr *th = tcp_hdr(skb); > + u16 payload_len; > + > + hdr.network = skb_network_header(skb); > + > + /* Only IPv4/IPv6 with TCP is supported */ Oh well, yet another packet flow dissector :) If most packets were caught by your implementation, you could use it for fast patj and fallback to skb_flow_dissect() for encapsulated tra...
2019 Jul 30
7
[PATCH net-next v5 0/5] vsock/virtio: optimizations to increase the throughput
This series tries to increase the throughput of virtio-vsock with slight changes. While I was testing the v2 of this series I discovered an huge use of memory, so I added patch 1 to mitigate this issue. I put it in this series in order to better track the performance trends. v5: - rebased all patches on net-next - added Stefan's R-b and Michael's A-b v4:
2019 Jul 30
7
[PATCH net-next v5 0/5] vsock/virtio: optimizations to increase the throughput
This series tries to increase the throughput of virtio-vsock with slight changes. While I was testing the v2 of this series I discovered an huge use of memory, so I added patch 1 to mitigate this issue. I put it in this series in order to better track the performance trends. v5: - rebased all patches on net-next - added Stefan's R-b and Michael's A-b v4:
2019 Apr 05
0
[PATCH RFC 2/4] vhost/vsock: split packets to send using multiple buffers
...019 at 12:58:36PM +0200, Stefano Garzarella wrote: > @@ -139,8 +139,18 @@ vhost_transport_do_send_pkt(struct vhost_vsock *vsock, > break; > } > > - len = iov_length(&vq->iov[out], in); > - iov_iter_init(&iov_iter, READ, &vq->iov[out], in, len); > + payload_len = pkt->len - pkt->off; > + iov_len = iov_length(&vq->iov[out], in); > + iov_iter_init(&iov_iter, READ, &vq->iov[out], in, iov_len); > + > + /* If the packet is greater than the space available in the > + * buffer, we split it using multiple buffers. >...
2020 Apr 24
0
[PATCH net v2 1/2] vhost/vsock: fix packet delivery order to monitoring devices
...diff --git a/drivers/vhost/vsock.c b/drivers/vhost/vsock.c index 97669484a3f6..18aff350a405 100644 --- a/drivers/vhost/vsock.c +++ b/drivers/vhost/vsock.c @@ -181,14 +181,14 @@ vhost_transport_do_send_pkt(struct vhost_vsock *vsock, break; } - vhost_add_used(vq, head, sizeof(pkt->hdr) + payload_len); - added = true; - - /* Deliver to monitoring devices all correctly transmitted - * packets. + /* Deliver to monitoring devices all packets that we + * will transmit. */ virtio_transport_deliver_tap_pkt(pkt); + vhost_add_used(vq, head, sizeof(pkt->hdr) + payload_len); + added...
2020 May 14
0
[PATCH AUTOSEL 5.6 13/62] vhost/vsock: fix packet delivery order to monitoring devices
...ff --git a/drivers/vhost/vsock.c b/drivers/vhost/vsock.c index bb3f63386b475..53294c2f8cff4 100644 --- a/drivers/vhost/vsock.c +++ b/drivers/vhost/vsock.c @@ -181,14 +181,14 @@ vhost_transport_do_send_pkt(struct vhost_vsock *vsock, break; } - vhost_add_used(vq, head, sizeof(pkt->hdr) + payload_len); - added = true; - - /* Deliver to monitoring devices all correctly transmitted - * packets. + /* Deliver to monitoring devices all packets that we + * will transmit. */ virtio_transport_deliver_tap_pkt(pkt); + vhost_add_used(vq, head, sizeof(pkt->hdr) + payload_len); + added...