netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Jeff Garzik <jgarzik@pobox.com>
To: Francois Romieu <romieu@fr.zoreil.com>
Cc: akpm@osdl.org, netdev@oss.sgi.com
Subject: Re: [PATCH 2.6.8.1-mm4 8/11] r8169: Tx checksum offload
Date: Sat, 28 Aug 2004 19:15:26 -0400	[thread overview]
Message-ID: <4131120E.7010108@pobox.com> (raw)
In-Reply-To: <20040823225505.GH20726@electric-eye.fr.zoreil.com>

Francois Romieu wrote:
> +static inline u32 rtl8169_tx_csum(struct sk_buff *skb)
> +{
> +	if (skb->ip_summed == CHECKSUM_HW) {
> +		const struct iphdr *ip = skb->nh.iph;
> +
> +		if (ip->protocol == IPPROTO_TCP)
> +			return IPCS | TCPCS;
> +		else if (ip->protocol == IPPROTO_UDP)
> +			return IPCS | UDPCS;
> +		BUG();
> +	}
> +	return 0;
> +}

I am applying this patch BUT...  BUG() is a bit too "rude" when you can 
obviously return safely.  Prefer WARN_ON() because we don't need to kill 
the machine for this condition.

  parent reply	other threads:[~2004-08-28 23:15 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2004-08-23 22:41 [DESC 2.6.8.1-mm4] r8169 patches Francois Romieu
2004-08-23 22:44 ` [PATCH 2.6.8.1-mm4 1/11] r8169: add ethtool_ops.{get_regs_len/get_regs} Francois Romieu
2004-08-23 22:45   ` [PATCH 2.6.8.1-mm4 2/11] r8169: per device receive buffer size Francois Romieu
2004-08-23 22:47     ` [PATCH 2.6.8.1-mm4 3/11] r8169: code cleanup Francois Romieu
2004-08-23 22:48       ` [PATCH 2.6.8.1-mm4 4/11] r8169: enable MWI Francois Romieu
2004-08-23 22:49         ` [PATCH 2.6.8.1-mm4 5/11] r8169: bump version number Francois Romieu
2004-08-23 22:51           ` [PATCH 2.6.8.1-mm4 6/11] r8169: sync the names of a few bits with the 8139cp driver Francois Romieu
2004-08-23 22:53             ` [PATCH 2.6.8.1-mm4 7/11] r8169: comment a gcc 2.95.x bug Francois Romieu
2004-08-23 22:55               ` [PATCH 2.6.8.1-mm4 8/11] r8169: Tx checksum offload Francois Romieu
2004-08-23 22:56                 ` [PATCH 2.6.8.1-mm4 9/11] r8169: advertise DMA to high memory Francois Romieu
2004-08-23 22:57                   ` [PATCH 2.6.8.1-mm4 10/11] r8169: Rx checksum support Francois Romieu
2004-08-23 22:59                     ` [PATCH 2.6.8.1-mm4 11/11] r8169: vlan support Francois Romieu
2004-08-28 23:21                       ` Jeff Garzik
2004-08-29 21:00                         ` Francois Romieu
2004-08-29 21:23                           ` Jeff Garzik
2004-08-28 23:15                 ` Jeff Garzik [this message]
2004-08-27 15:09 ` [DESC 2.6.8.1-mm4] r8169 patches Jon Mason

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=4131120E.7010108@pobox.com \
    --to=jgarzik@pobox.com \
    --cc=akpm@osdl.org \
    --cc=netdev@oss.sgi.com \
    --cc=romieu@fr.zoreil.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).