From: Robert Olsson <Robert.Olsson@data.slu.se>
To: "David S. Miller" <davem@redhat.com>
Cc: netdev@oss.sgi.com
Subject: [PATCH] pktgen unaligned access on IA-64
Date: Tue, 10 Feb 2004 19:02:57 +0100 [thread overview]
Message-ID: <16425.7377.210243.50268@robur.slu.se> (raw)
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;
next reply other threads:[~2004-02-10 18:02 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-10 18:02 Robert Olsson [this message]
2004-02-11 20:20 ` [PATCH] pktgen unaligned access on IA-64 David S. Miller
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=16425.7377.210243.50268@robur.slu.se \
--to=robert.olsson@data.slu.se \
--cc=davem@redhat.com \
--cc=netdev@oss.sgi.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).