lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Date:	Sun, 25 May 2008 17:31:42 +0400
From:	Evgeniy Polyakov <johnpol@....mipt.ru>
To:	David Miller <davem@...emloft.net>
Cc:	kchudgar@...c.com, kchudgar.linux@...il.com, netdev@...r.kernel.org
Subject: Re: Single packet receiving in multiple ring buffers

On Sun, May 25, 2008 at 06:04:34AM -0700, David Miller (davem@...emloft.net) wrote:
> > If it is not convenient to use such scheme, you can always put data
> > into pages and then copy tiny bit into skb->data to be able to
> > specify IP layer protocol, all the rest system will do for itself
> > via pskb_may_copy() if needed.
> 
> The network input uses "pskb_may_pull()" not "pskb_may_copy()" :-)

For those who like pskb_may_copy() name, here is a patch :)

diff --git a/include/linux/skbuff.h b/include/linux/skbuff.h
index bbd8d00..1fb5723 100644
--- a/include/linux/skbuff.h
+++ b/include/linux/skbuff.h
@@ -990,6 +990,11 @@ static inline int pskb_may_pull(struct sk_buff *skb, unsigned int len)
 	return __pskb_pull_tail(skb, len-skb_headlen(skb)) != NULL;
 }
 
+static inline int pskb_may_copy(struct sk_buff *skb, unsigned int len)
+{
+	return pskb_may_pull(skb, len);
+}
+
 /**
  *	skb_headroom - bytes at buffer head
  *	@skb: buffer to check


-- 
	Evgeniy Polyakov
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ