ar71xx: change the unaligned access hack to assume an alignment of 2 bytes, slightly improves performance and code size
SVN-Revision: 34912
This commit is contained in:
parent
b41d96e8b7
commit
348dc70c8c
1 changed files with 4 additions and 4 deletions
|
@ -57,7 +57,7 @@
|
||||||
__be32 daddr;
|
__be32 daddr;
|
||||||
/*The options start here. */
|
/*The options start here. */
|
||||||
-};
|
-};
|
||||||
+} __packed;
|
+} __packed __attribute__((aligned(2)));
|
||||||
|
|
||||||
#ifdef __KERNEL__
|
#ifdef __KERNEL__
|
||||||
#include <linux/skbuff.h>
|
#include <linux/skbuff.h>
|
||||||
|
@ -68,7 +68,7 @@
|
||||||
struct in6_addr saddr;
|
struct in6_addr saddr;
|
||||||
struct in6_addr daddr;
|
struct in6_addr daddr;
|
||||||
-};
|
-};
|
||||||
+} __packed;
|
+} __packed __attribute__((aligned(2)));
|
||||||
|
|
||||||
#ifdef __KERNEL__
|
#ifdef __KERNEL__
|
||||||
/*
|
/*
|
||||||
|
@ -79,7 +79,7 @@
|
||||||
__sum16 check;
|
__sum16 check;
|
||||||
__be16 urg_ptr;
|
__be16 urg_ptr;
|
||||||
-};
|
-};
|
||||||
+} __packed;
|
+} __packed __attribute__((aligned(2)));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* The union cast uses a gcc extension to avoid aliasing problems
|
* The union cast uses a gcc extension to avoid aliasing problems
|
||||||
|
@ -90,7 +90,7 @@
|
||||||
__be16 len;
|
__be16 len;
|
||||||
__sum16 check;
|
__sum16 check;
|
||||||
-};
|
-};
|
||||||
+} __packed;
|
+} __packed __attribute__((aligned(2)));
|
||||||
|
|
||||||
/* UDP socket options */
|
/* UDP socket options */
|
||||||
#define UDP_CORK 1 /* Never send partially complete segments */
|
#define UDP_CORK 1 /* Never send partially complete segments */
|
||||||
|
|
Loading…
Reference in a new issue