netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
To: Stefan Richter <stefanr@s5r6.in-berlin.de>
Cc: linux1394-devel@lists.sourceforge.net, netdev@vger.kernel.org,
	linux-kernel@vger.kernel.org,
	YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
Subject: Re: [PATCH] firewire net: Ensure checksumming in upper layer.
Date: Sun, 20 Jan 2013 19:37:09 +0900	[thread overview]
Message-ID: <50FBC8D5.50205@linux-ipv6.org> (raw)
In-Reply-To: <20130120105058.1aee26c4@stein>

Stefan Richter wrote:
> On Jan 20 YOSHIFUJI Hideaki wrote:
>> It is wrong to set skb->ip_summed to CHECKSUM_UNNECESSARY unless
>> the device has already checked it.
>>
>> Signed-off-by: YOSHIFUJI Hideaki <yoshfuji@linux-ipv6.org>
>> ---
>>  drivers/firewire/net.c |    2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/drivers/firewire/net.c b/drivers/firewire/net.c
>> index e7a711f5..df6a1ca 100644
>> --- a/drivers/firewire/net.c
>> +++ b/drivers/firewire/net.c
>> @@ -520,7 +520,7 @@ static int fwnet_finish_incoming_packet(struct net_device *net,
>>  	dev = netdev_priv(net);
>>  	/* Write metadata, and then pass to the receive level */
>>  	skb->dev = net;
>> -	skb->ip_summed = CHECKSUM_UNNECESSARY;  /* don't check it */
>> +	skb->ip_summed = CHECKSUM_NONE;
>>  
>>  	/*
>>  	 * Parse the encapsulation header. This actually does the job of
> 
> Indeed neither the device nor the lower drivers check protocol checksums.
> But the CRCs of the encapsulating 1394 packets are checked in hardware.
> Shall protocol checksums be verified regardless?

Yes, because packets may come from off-link source.

--yoshfuji

  reply	other threads:[~2013-01-20 10:37 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-01-20  7:43 [PATCH] firewire net: Ensure checksumming in upper layer YOSHIFUJI Hideaki
2013-01-20  9:50 ` Stefan Richter
2013-01-20 10:37   ` YOSHIFUJI Hideaki [this message]
2013-01-20 14:46     ` Stephan Gatzka
2013-01-20 15:10       ` YOSHIFUJI Hideaki
2013-01-20 15:17         ` Stephan Gatzka
2013-01-20 15:48           ` YOSHIFUJI Hideaki
2013-01-21  4:16 ` David 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=50FBC8D5.50205@linux-ipv6.org \
    --to=yoshfuji@linux-ipv6.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux1394-devel@lists.sourceforge.net \
    --cc=netdev@vger.kernel.org \
    --cc=stefanr@s5r6.in-berlin.de \
    /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).