search for: peek_head

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

2010 Jun 28
3
[PATCHv2] vhost-net: add dhclient work-around from userspace
...e <linux/if_macvlan.h> +#include <linux/ip.h> +#include <linux/udp.h> +#include <linux/netdevice.h> + #include <net/sock.h> #include "vhost.h" @@ -186,6 +190,44 @@ static void handle_tx(struct vhost_net *net) unuse_mm(net->dev.mm); } +static int peek_head(struct sock *sk) +{ + struct sk_buff *skb; + + lock_sock(sk); + skb = skb_peek(&sk->sk_receive_queue); + if (unlikely(!skb)) { + release_sock(sk); + return 0; + } + /* Userspace virtio server has the following hack so + * guests rely on it, and we have to replicate it, too: */ + /* Use po...
2010 Jun 28
3
[PATCHv2] vhost-net: add dhclient work-around from userspace
...e <linux/if_macvlan.h> +#include <linux/ip.h> +#include <linux/udp.h> +#include <linux/netdevice.h> + #include <net/sock.h> #include "vhost.h" @@ -186,6 +190,44 @@ static void handle_tx(struct vhost_net *net) unuse_mm(net->dev.mm); } +static int peek_head(struct sock *sk) +{ + struct sk_buff *skb; + + lock_sock(sk); + skb = skb_peek(&sk->sk_receive_queue); + if (unlikely(!skb)) { + release_sock(sk); + return 0; + } + /* Userspace virtio server has the following hack so + * guests rely on it, and we have to replicate it, too: */ + /* Use po...
2010 Jun 27
0
[PATCH RFC] vhost-net: add dhclient work-around from userspace
...e <linux/if_macvlan.h> +#include <linux/ip.h> +#include <linux/udp.h> +#include <linux/netdevice.h> + #include <net/sock.h> #include "vhost.h" @@ -191,6 +195,42 @@ static void handle_tx(struct vhost_net *net) unuse_mm(net->dev.mm); } +static int peek_head(struct sock *sk) +{ + struct sk_buff *head; + int ret; + + lock_sock(sk); + head = skb_peek(&sk->sk_receive_queue); + if (likely(head)) { + ret = 1; + /* Userspace virtio server has the following hack so + * guests rely on it, and we have to replicate it, too: */ + /* On linux guests, s...
2010 Jun 27
0
[PATCH RFC] vhost-net: add dhclient work-around from userspace
...e <linux/if_macvlan.h> +#include <linux/ip.h> +#include <linux/udp.h> +#include <linux/netdevice.h> + #include <net/sock.h> #include "vhost.h" @@ -191,6 +195,42 @@ static void handle_tx(struct vhost_net *net) unuse_mm(net->dev.mm); } +static int peek_head(struct sock *sk) +{ + struct sk_buff *head; + int ret; + + lock_sock(sk); + head = skb_peek(&sk->sk_receive_queue); + if (likely(head)) { + ret = 1; + /* Userspace virtio server has the following hack so + * guests rely on it, and we have to replicate it, too: */ + /* On linux guests, s...