From: Chris Snook <csnook@redhat.com>
To: Al Viro <viro@ftp.linux.org.uk>
Cc: torvalds@linux-foundation.org, jgarzik@pobox.com,
linux-kernel@vger.kernel.org,
Jay Cliburn <jacliburn@bellsouth.net>
Subject: Re: [PATCH 14/17] atl1 trivial endianness misannotations
Date: Thu, 15 Mar 2007 15:02:34 -0400 [thread overview]
Message-ID: <45F9984A.4020206@redhat.com> (raw)
In-Reply-To: <E1HRPeU-0003a3-2G@ZenIV.linux.org.uk>
Al Viro wrote:
> NB: driver is choke-full of code that will break on big-endian; as long
> as the hardware is onboard-only we can live with that, but sooner or
> later that'll need fixing.
>
> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
> ---
> drivers/net/atl1/atl1_main.c | 4 ++--
> 1 files changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/drivers/net/atl1/atl1_main.c b/drivers/net/atl1/atl1_main.c
> index 88d4f70..dee3638 100644
> --- a/drivers/net/atl1/atl1_main.c
> +++ b/drivers/net/atl1/atl1_main.c
> @@ -1328,7 +1328,7 @@ static int atl1_tx_csum(struct atl1_adapter *adapter, struct sk_buff *skb,
>
> if (likely(skb->ip_summed == CHECKSUM_PARTIAL)) {
> cso = skb->h.raw - skb->data;
> - css = (skb->h.raw + skb->csum) - skb->data;
> + css = (skb->h.raw + skb->csum_offset) - skb->data;
> if (unlikely(cso & 0x1)) {
> printk(KERN_DEBUG "%s: payload offset != even number\n",
> atl1_driver_name);
This could certainly explain some checksumming problems we've seen.
> @@ -1562,7 +1562,7 @@ static int atl1_xmit_frame(struct sk_buff *skb, struct net_device *netdev)
> /* mss will be nonzero if we're doing segment offload (TSO/GSO) */
> mss = skb_shinfo(skb)->gso_size;
> if (mss) {
> - if (skb->protocol == ntohs(ETH_P_IP)) {
> + if (skb->protocol == htons(ETH_P_IP)) {
> proto_hdr_len = ((skb->h.raw - skb->data) +
> (skb->h.th->doff << 2));
> if (unlikely(proto_hdr_len > len)) {
ACK.
prev parent reply other threads:[~2007-03-15 19:03 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-03-14 9:20 [PATCH 14/17] atl1 trivial endianness misannotations Al Viro
2007-03-14 9:57 ` Jeff Garzik
2007-03-15 19:02 ` Chris Snook [this message]
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=45F9984A.4020206@redhat.com \
--to=csnook@redhat.com \
--cc=jacliburn@bellsouth.net \
--cc=jgarzik@pobox.com \
--cc=linux-kernel@vger.kernel.org \
--cc=torvalds@linux-foundation.org \
--cc=viro@ftp.linux.org.uk \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.