search for: skb_head_len

Displaying 4 results from an estimated 4 matches for "skb_head_len".

2010 Mar 03
1
[RFC][ PATCH 1/3] vhost-net: support multiple buffer heads in receiver
...vhost_add_used_and_signal(&net->dev, vq, &head, 1); total_len += len; if (unlikely(total_len >= VHOST_NET_WEIGHT)) { vhost_poll_queue(&vq->poll); @@ -182,12 +181,22 @@ unuse_mm(net->dev.mm); } +static int skb_head_len(struct sk_buff_head *skq) +{ + struct sk_buff *head; + + head = skb_peek(skq); + if (head) + return head->len; + return 0; +} + /* Expects to be always run from workqueue - which acts as * read-size critical section for our kind of RCU. */ static void ha...
2010 Mar 03
1
[RFC][ PATCH 1/3] vhost-net: support multiple buffer heads in receiver
...vhost_add_used_and_signal(&net->dev, vq, &head, 1); total_len += len; if (unlikely(total_len >= VHOST_NET_WEIGHT)) { vhost_poll_queue(&vq->poll); @@ -182,12 +181,22 @@ unuse_mm(net->dev.mm); } +static int skb_head_len(struct sk_buff_head *skq) +{ + struct sk_buff *head; + + head = skb_peek(skq); + if (head) + return head->len; + return 0; +} + /* Expects to be always run from workqueue - which acts as * read-size critical section for our kind of RCU. */ static void ha...
2010 Mar 03
1
[RFC][ PATCH 2/3] vhost-net: handle vnet_hdr processing for MRG_RX_BUF
...o_net_hdr hdr = { - .flags = 0, - .gso_type = VIRTIO_NET_HDR_GSO_NONE - }; - size_t len, total_len = 0; int err, headcount, datalen; - size_t hdr_size; struct socket *sock = rcu_dereference(vq->private_data); if (!sock || !skb_head_len(&sock->sk->sk_receive_queue)) @@ -223,7 +235,6 @@ use_mm(net->dev.mm); mutex_lock(&vq->mutex); vhost_disable_notify(vq); - hdr_size = vq->hdr_size; vq_log = unlikely(vhost_has_feature(&net->dev, VHOST_F_LOG_ALL)) ?...
2010 Mar 03
1
[RFC][ PATCH 2/3] vhost-net: handle vnet_hdr processing for MRG_RX_BUF
...o_net_hdr hdr = { - .flags = 0, - .gso_type = VIRTIO_NET_HDR_GSO_NONE - }; - size_t len, total_len = 0; int err, headcount, datalen; - size_t hdr_size; struct socket *sock = rcu_dereference(vq->private_data); if (!sock || !skb_head_len(&sock->sk->sk_receive_queue)) @@ -223,7 +235,6 @@ use_mm(net->dev.mm); mutex_lock(&vq->mutex); vhost_disable_notify(vq); - hdr_size = vq->hdr_size; vq_log = unlikely(vhost_has_feature(&net->dev, VHOST_F_LOG_ALL)) ?...