Subject: Re: [PATCH 2.6.8.1-mm4 8/11] r8169: Tx checksum offload

From: Jeff Garzik <[email-masked]>
Date: Sat, 28 Aug 2004 19:15:26 -0400

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.