* [PATCH] pktgen unaligned access on IA-64
@ 2004-02-10 18:02 Robert Olsson
2004-02-11 20:20 ` David S. Miller
0 siblings, 1 reply; 2+ messages in thread
From: Robert Olsson @ 2004-02-10 18:02 UTC (permalink / raw)
To: David S. Miller; +Cc: netdev
Hello!
Grant Grundler spotted and cured this.
Cheers.
--ro
--- net/core/pktgen.c.040207 Sat Feb 7 12:54:40 2004
+++ net/core/pktgen.c Mon Feb 9 00:03:52 2004
@@ -50,6 +50,8 @@
* Fix refcount off by one if first packet fails, potential null deref,
* memleak 030710- KJP
*
+ * Fixed unaligned access on IA-64 Grant Grundler <grundler@parisc-linux.org>
+ *
* See Documentation/networking/pktgen.txt for how to use this.
*/
@@ -88,7 +90,7 @@
#define cycles() ((u32)get_cycles())
-#define VERSION "pktgen version 1.31"
+#define VERSION "pktgen version 1.32"
static char version[] __initdata =
"pktgen.c: v1.3: Packet Generator for packet performance testing.\n";
@@ -193,7 +195,8 @@
struct pktgen_hdr {
__u32 pgh_magic;
__u32 seq_num;
- struct timeval timestamp;
+ __u32 tv_sec;
+ __u32 tv_usec;
};
static int cpu_speed;
@@ -563,11 +566,14 @@
/* Stamp the time, and sequence number, convert them to network byte order */
if (pgh) {
+ struct timeval timestamp;
+
pgh->pgh_magic = htonl(PKTGEN_MAGIC);
- do_gettimeofday(&(pgh->timestamp));
- pgh->timestamp.tv_usec = htonl(pgh->timestamp.tv_usec);
- pgh->timestamp.tv_sec = htonl(pgh->timestamp.tv_sec);
- pgh->seq_num = htonl(info->seq_num);
+ pgh->seq_num = htonl(info->seq_num);
+
+ do_gettimeofday(×tamp);
+ pgh->tv_sec = htonl(timestamp.tv_sec);
+ pgh->tv_usec = htonl(timestamp.tv_usec);
}
return skb;
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] pktgen unaligned access on IA-64
2004-02-10 18:02 [PATCH] pktgen unaligned access on IA-64 Robert Olsson
@ 2004-02-11 20:20 ` David S. Miller
0 siblings, 0 replies; 2+ messages in thread
From: David S. Miller @ 2004-02-11 20:20 UTC (permalink / raw)
To: Robert Olsson; +Cc: netdev
On Tue, 10 Feb 2004 19:02:57 +0100
Robert Olsson <Robert.Olsson@data.slu.se> wrote:
> Grant Grundler spotted and cured this.
Applied, thanks.
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-02-11 20:20 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-02-10 18:02 [PATCH] pktgen unaligned access on IA-64 Robert Olsson
2004-02-11 20:20 ` David S. Miller
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).