Displaying 11 results from an estimated 11 matches for "skb_len".
2023 Mar 21
0
[RFC PATCH v2] virtio/vsock: allocate multiple skbuffs on tx
...{
>>> -??????? virtio_transport_put_credit(vvs, pkt_len);
>>> -??????? return -ENOMEM;
>>> -??? }
>>> +??? ret = 0;
>>> +??? rest_len = pkt_len;
>>> +
>>> +??? do {
>>> +??????? struct sk_buff *skb;
>>> +??????? size_t skb_len;
>>> +
>>> +??????? skb_len = min_t(u32, VIRTIO_VSOCK_MAX_PKT_BUF_SIZE, rest_len);
>>> +
>>> +??????? skb = virtio_transport_alloc_skb(info, skb_len,
>>> +???????????????????????? src_cid, src_port,
>>> +???????????????????????? dst_cid, dst_por...
2023 Mar 22
0
[RFC PATCH v4] virtio/vsock: allocate multiple skbuffs on tx
...st_cid, dst_port);
>- if (!skb) {
>- virtio_transport_put_credit(vvs, pkt_len);
>- return -ENOMEM;
>- }
>+ ret = 0;
nit: this initialization seems superfluous since `ret` is
overwritten later ...
>+ rest_len = pkt_len;
>+
>+ do {
>+ struct sk_buff *skb;
>+ size_t skb_len;
>+
>+ skb_len = min_t(u32, VIRTIO_VSOCK_MAX_PKT_BUF_SIZE, rest_len);
>+
>+ skb = virtio_transport_alloc_skb(info, skb_len,
>+ src_cid, src_port,
>+ dst_cid, dst_port);
>+ if (!skb) {
>+ ret = -ENOMEM;
>+ break;
>+ }
>
>- virtio_transport_inc_...
2023 Mar 21
0
[RFC PATCH v3] virtio/vsock: allocate multiple skbuffs on tx
...rtio_transport_alloc_skb(info, pkt_len,
>- src_cid, src_port,
>- dst_cid, dst_port);
>- if (!skb) {
>- virtio_transport_put_credit(vvs, pkt_len);
>- return -ENOMEM;
>- }
>+ ret = 0;
>+ rest_len = pkt_len;
>+
>+ do {
>+ struct sk_buff *skb;
>+ size_t skb_len;
>+
>+ skb_len = min_t(u32, VIRTIO_VSOCK_MAX_PKT_BUF_SIZE, rest_len);
>+
>+ skb = virtio_transport_alloc_skb(info, skb_len,
>+ src_cid, src_port,
>+ dst_cid, dst_port);
>+ if (!skb) {
>+ ret = -ENOMEM;
>+ break;
>+ }
>+
>+ virtio_transport_in...
2023 Feb 16
0
[RFC PATCH v1 07/12] vsock/virtio: MGS_ZEROCOPY flag support
...for (page_idx = 0; page_idx < pages_in_seg; page_idx++) {
>+ int frag_len = PAGE_SIZE;
>+
>+ if (page_idx == (pages_in_seg - 1))
>+ frag_len = last_frag_len;
>+
>+ skb_fill_page_desc(skb, frag_idx++,
>+ user_pages[page_idx], 0,
>+ frag_len);
>+ skb_len_add(skb, frag_len);
>+ }
>+ }
>+
>+ return virtio_transport_init_zcopy_skb(vsk, skb, iter, true);
>+}
>+
>+static int virtio_transport_copy_payload(struct sk_buff *skb,
>+ struct vsock_sock *vsk,
>+ struct virtio_vsock_pkt_info *info,
>+ size_t len)
>...
2023 Aug 01
0
[PATCH net-next v5 4/4] vsock/virtio: MSG_ZEROCOPY flag support
...c_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;
> +
> + skb_len = VIRTIO_VSOCK_SKB_HEADROOM;
> +
> + if (!zcopy)
> + skb_len += payload_len;
> +
> + skb = virtio_vsock_alloc_skb(skb_len, GFP_KERNEL);
> + if (!skb)
> + return NULL;
> +
> + virtio_transport_init_hdr(skb, info, src_cid, src_port,
> + dst_...
2023 Aug 01
0
[PATCH net-next v5 4/4] vsock/virtio: MSG_ZEROCOPY flag support
...> + 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;
> > > +
> > > + skb_len = VIRTIO_VSOCK_SKB_HEADROOM;
> > > +
> > > + if (!zcopy)
> > > + skb_len += payload_len;
> > > +
> > > + skb = virtio_vsock_alloc_skb(skb_len, GFP_KERNEL);
> > > + if (!skb)
> > > + return NU...
2023 Sep 04
0
[PATCH net-next v7 4/4] vsock/virtio: MSG_ZEROCOPY flag support
...c_skb(struct virtio_vsock_pkt_info *info,
>>> -?????????????? size_t len,
>>> -?????????????? u32 src_cid,
>>> -?????????????? u32 src_port,
>>> -?????????????? u32 dst_cid,
>>> -?????????????? u32 dst_port)
>>> -{
>>> -??? const size_t skb_len = VIRTIO_VSOCK_SKB_HEADROOM + len;
>>> -??? struct virtio_vsock_hdr *hdr;
>>> -??? struct sk_buff *skb;
>>> +static bool virtio_transport_can_zcopy(struct virtio_vsock_pkt_info *info,
>>> +?????????????????????? size_t max_to_send)
>> ??????????????????????...
2013 Mar 15
4
[PATCHv3 vringh] caif_virtio: Introduce caif over virtio
...t packets from the host vring */
+static int cfv_rx_poll(struct napi_struct *napi, int quota)
+{
+ struct cfv_info *cfv = container_of(napi, struct cfv_info, napi);
+ int rxcnt = 0;
+ int err = 0;
+ void *buf;
+ struct sk_buff *skb;
+ struct vringh_kiov *riov = &cfv->ctx.riov;
+ unsigned int skb_len;
+
+again:
+ do {
+ skb = NULL;
+
+ /* Put the previous iovec back on the used ring and
+ * fetch a new iovec if we have processed all elements.
+ */
+ if (riov->i == riov->used) {
+ if (cfv->ctx.head != USHRT_MAX) {
+ vringh_complete_kern(cfv->vr_rx,
+ cfv->ctx...
2013 Mar 15
4
[PATCHv3 vringh] caif_virtio: Introduce caif over virtio
...t packets from the host vring */
+static int cfv_rx_poll(struct napi_struct *napi, int quota)
+{
+ struct cfv_info *cfv = container_of(napi, struct cfv_info, napi);
+ int rxcnt = 0;
+ int err = 0;
+ void *buf;
+ struct sk_buff *skb;
+ struct vringh_kiov *riov = &cfv->ctx.riov;
+ unsigned int skb_len;
+
+again:
+ do {
+ skb = NULL;
+
+ /* Put the previous iovec back on the used ring and
+ * fetch a new iovec if we have processed all elements.
+ */
+ if (riov->i == riov->used) {
+ if (cfv->ctx.head != USHRT_MAX) {
+ vringh_complete_kern(cfv->vr_rx,
+ cfv->ctx...
2011 Nov 11
10
[RFC] [ver3 PATCH 0/6] Implement multiqueue virtio-net
This patch series resurrects the earlier multiple TX/RX queues
functionality for virtio_net, and addresses the issues pointed
out. It also includes an API to share irq's, f.e. amongst the
TX vqs.
I plan to run TCP/UDP STREAM and RR tests for local->host and
local->remote, and send the results in the next couple of days.
patch #1: Introduce VIRTIO_NET_F_MULTIQUEUE
patch #2: Move
2011 Nov 11
10
[RFC] [ver3 PATCH 0/6] Implement multiqueue virtio-net
This patch series resurrects the earlier multiple TX/RX queues
functionality for virtio_net, and addresses the issues pointed
out. It also includes an API to share irq's, f.e. amongst the
TX vqs.
I plan to run TCP/UDP STREAM and RR tests for local->host and
local->remote, and send the results in the next couple of days.
patch #1: Introduce VIRTIO_NET_F_MULTIQUEUE
patch #2: Move