[oe-commits] Mario Schuknecht : linux-2.6.24: add additional tcp ioctl ( for hipox machine only)

git version control git at git.openembedded.org
Fri Oct 8 09:09:26 UTC 2010


Module: openembedded.git
Branch: org.openembedded.dev
Commit: 239730044bf8294dec28373c8d2e38d9f81fbf66
URL:    http://gitweb.openembedded.net/?p=openembedded.git&a=commit;h=239730044bf8294dec28373c8d2e38d9f81fbf66

Author: Mario Schuknecht <m.schuknecht at dresearch.de>
Date:   Fri Oct  8 09:20:24 2010 +0200

linux-2.6.24: add additional tcp ioctl (for hipox machine only)

Signed-off-by: Mario Schuknecht <m.schuknecht at dresearch.de>
Acked-by: Steffen Sledz <sledz at dresearch.de>

---

 recipes/linux/linux-2.6.24/hipox/siocoutqsnd.patch |   54 ++++++++++++++++++++
 recipes/linux/linux_2.6.24.bb                      |    3 +-
 2 files changed, 56 insertions(+), 1 deletions(-)

diff --git a/recipes/linux/linux-2.6.24/hipox/siocoutqsnd.patch b/recipes/linux/linux-2.6.24/hipox/siocoutqsnd.patch
new file mode 100644
index 0000000..616a860
--- /dev/null
+++ b/recipes/linux/linux-2.6.24/hipox/siocoutqsnd.patch
@@ -0,0 +1,54 @@
+tcp: ioctl type SIOCOUTQNSD returns amount of data not sent
+
+In contrast to SIOCOUTQ which returns the amount of data sent
+but not yet acknowledged plus data not yet sent this patch only
+returns the data not sent.
+
+For various methods of live streaming bitrate control it may
+be helpful to know how much data are in the tcp outqueue are
+not sent yet.
+
+Signed-off-by: Mario Schuknecht <m.schuknecht at dresearch.de>
+
+diff -Nurd linux-2.6.24.orig//include/asm-arm/ioctls.h linux-2.6.24/include/asm-arm/ioctls.h
+--- linux-2.6.24.orig//include/asm-arm/ioctls.h	2010-10-08 09:03:02.000000000 +0200
++++ linux-2.6.24/include/asm-arm/ioctls.h	2010-10-08 09:09:55.000000000 +0200
+@@ -53,6 +53,8 @@
+ #define TIOCGPTN	_IOR('T',0x30, unsigned int) /* Get Pty Number (of pty-mux device) */
+ #define TIOCSPTLCK	_IOW('T',0x31, int)  /* Lock/unlock Pty */
+ 
++#define TIOCOUTQNSD	0x5437
++
+ #define FIONCLEX	0x5450  /* these numbers need to be adjusted. */
+ #define FIOCLEX		0x5451
+ #define FIOASYNC	0x5452
+diff -Nurd linux-2.6.24.orig//include/linux/sockios.h linux-2.6.24/include/linux/sockios.h
+--- linux-2.6.24.orig//include/linux/sockios.h	2010-10-08 09:03:02.000000000 +0200
++++ linux-2.6.24/include/linux/sockios.h	2010-10-08 09:10:43.000000000 +0200
+@@ -23,6 +23,7 @@
+ /* Linux-specific socket ioctls */
+ #define SIOCINQ		FIONREAD
+ #define SIOCOUTQ	TIOCOUTQ
++#define SIOCOUTQNSD	TIOCOUTQNSD
+ 
+ /* Routing table calls. */
+ #define SIOCADDRT	0x890B		/* add routing table entry	*/
+diff -Nurd linux-2.6.24.orig//net/ipv4/tcp.c linux-2.6.24/net/ipv4/tcp.c
+--- linux-2.6.24.orig//net/ipv4/tcp.c	2010-10-08 09:02:59.000000000 +0200
++++ linux-2.6.24/net/ipv4/tcp.c	2010-10-08 09:10:43.000000000 +0200
+@@ -444,6 +444,15 @@
+ 		else
+ 			answ = tp->write_seq - tp->snd_una;
+ 		break;
++	case SIOCOUTQNSD:
++		if (sk->sk_state == TCP_LISTEN)
++			return -EINVAL;
++
++		if ((1 << sk->sk_state) & (TCPF_SYN_SENT | TCPF_SYN_RECV))
++			answ = 0;
++		else
++			answ = tp->write_seq - tp->snd_nxt;
++		break;
+ 	default:
+ 		return -ENOIOCTLCMD;
+ 	}
diff --git a/recipes/linux/linux_2.6.24.bb b/recipes/linux/linux_2.6.24.bb
index 1919063..bfcdda9 100644
--- a/recipes/linux/linux_2.6.24.bb
+++ b/recipes/linux/linux_2.6.24.bb
@@ -11,7 +11,7 @@ DEFAULT_PREFERENCE_hipox = "1"
 DEFAULT_PREFERENCE_cs-e9302 = "1"
 DEFAULT_PREFERENCE_smartq5 = "1"
 
-PR = "r34"
+PR = "r35"
 
 SRC_URI = "${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/linux-2.6.24.tar.bz2;name=kernel \
            ${KERNELORG_MIRROR}/pub/linux/kernel/v2.6/patch-${PV}.7.bz2;apply=yes;name=stablepatch \
@@ -102,6 +102,7 @@ SRC_URI_append_hipox = " \
 	file://hipox-nand-vs-nor.patch \
 	file://ox810-gmac-without-leon.patch \
 	file://hipox-poe-enable.patch \
+	file://siocoutqsnd.patch \
 	"
 
 EXTRA_OEMAKE_smartq5 = " OBJCOPY=${OBJCOPY}"





More information about the Openembedded-commits mailing list