From: Ben Hutchings <bhutchings@solarflare•com>
To: Jesse Gross <jesse@nicira•com>
Cc: David Miller <davem@davemloft•net>, netdev@vger•kernel.org
Subject: Re: [PATCH net-next-2.6] net: Fix some corner cases in dev_can_checksum()
Date: Tue, 26 Oct 2010 14:29:19 +0100 [thread overview]
Message-ID: <20101026132918.GG15074@solarflare.com> (raw)
In-Reply-To: <AANLkTi=PiB_oCvaFzQpUNhgV8qsn9d-jy_ejGdbOTzQe@mail.gmail.com>
Jesse Gross wrote:
> On Fri, Oct 22, 2010 at 7:12 AM, Ben Hutchings
> <bhutchings@solarflare•com> wrote:
> > dev_can_checksum() incorrectly returns true in these cases:
> >
> > 1. The skb has both out-of-band and in-band VLAN tags and the device
> > supports checksum offload for the encapsulated protocol but only with
> > one layer of encapsulation.
> > 2. The skb has a VLAN tag and the device supports generic checksumming
> > but not in conjunction with VLAN encapsulation.
> >
> > Rearrange the VLAN tag checks to avoid these.
> >
> > Signed-off-by: Ben Hutchings <bhutchings@solarflare•com>
>
> If we assume that cards cannot handle offloading for double tagged
> packets, which is obviously the most conservative approach, we
> probably also need to change the checks for TSO/SG. There's no issue
> with extracting the protocol from the right header but we might assume
> that the card can handle double tag offloading when it can't. For
> both TSO/SG we check if there is either an in-band tag or out-of-band
> tag and use dev->vlan_features if that is the case. Maybe we need to
> handle it in software if it is double tagged.
That's something to check.
> On the other hand, I don't know whether it's true that cards can't
> handle offloading for packets tagged in both manners. I suppose that
> it depends on where the offloading and tagging are in the pipeline.
> For example, when it comes to SG I doubt that the cards care about
> vlan tags much at all.
I do know that current Solarflare controllers can parse two VLAN tags
and generate/validate TCP/IP-style checksums after them. We could add
vlan2_features which would be copied to a VLAN sub-device's
vlan_features, but then what happens when people want to handle triple
VLAN encapsulation?
Ben.
--
Ben Hutchings, Senior Software Engineer, Solarflare Communications
Not speaking for my employer; that's the marketing department's job.
They asked us to note that Solarflare product names are trademarked.
next prev parent reply other threads:[~2010-10-26 13:29 UTC|newest]
Thread overview: 48+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-20 23:56 [PATCH v2 00/14] Move vlan acceleration into networking core Jesse Gross
2010-10-20 23:56 ` [PATCH v2 01/14] ebtables: Allow filtering of hardware accelerated vlan frames Jesse Gross
2010-10-20 23:56 ` [PATCH v2 02/14] vlan: Rename VLAN_GROUP_ARRAY_LEN to VLAN_N_VID Jesse Gross
2010-10-20 23:56 ` [PATCH v2 03/14] vlan: Don't check for vlan group before vlan_tx_tag_present Jesse Gross
2010-10-20 23:56 ` [PATCH v2 04/14] vlan: Enable software emulation for vlan accleration Jesse Gross
2010-10-21 3:32 ` John Fastabend
2010-10-21 15:30 ` Ben Hutchings
2010-10-21 21:44 ` Jesse Gross
2010-10-22 14:12 ` [PATCH net-next-2.6] net: Fix some corner cases in dev_can_checksum() Ben Hutchings
2010-10-22 14:18 ` Ben Hutchings
2010-10-26 0:21 ` Jesse Gross
2010-10-26 13:29 ` Ben Hutchings [this message]
2010-10-26 18:11 ` Jesse Gross
2010-10-27 18:00 ` David Miller
2010-10-20 23:56 ` [PATCH v2 05/14] vlan: Avoid hash table lookup to find group Jesse Gross
2010-10-20 23:56 ` [PATCH v2 06/14] vlan: Centralize handling of hardware acceleration Jesse Gross
2010-10-20 23:56 ` [PATCH v2 07/14] ethtool: Add support for vlan accleration Jesse Gross
2010-10-21 3:27 ` John Fastabend
2010-10-21 19:43 ` Jesse Gross
2010-10-20 23:56 ` [PATCH v2 08/14] bridge: Add support for TX vlan offload Jesse Gross
2010-10-20 23:56 ` [PATCH v2 09/14] bnx2: Update bnx2 to use new vlan accleration Jesse Gross
2010-10-21 15:31 ` Ben Hutchings
2010-10-21 21:38 ` Jesse Gross
2010-10-20 23:56 ` [PATCH v2 10/14] ixgbe: Update ixgbe " Jesse Gross
2010-10-22 13:24 ` Michał Mirosław
2010-10-25 17:50 ` Peter P Waskiewicz Jr
2010-10-25 21:40 ` Michał Mirosław
2010-10-25 22:02 ` John Fastabend
2010-10-25 23:23 ` Michał Mirosław
2010-10-26 0:08 ` Jesse Gross
2010-10-20 23:56 ` [PATCH v2 11/14] bnx2x: Update bnx2x " Jesse Gross
2010-10-21 13:54 ` Vladislav Zolotarov
2010-10-21 14:02 ` Vladislav Zolotarov
2010-10-21 14:50 ` Vladislav Zolotarov
2010-10-21 21:36 ` Jesse Gross
2010-10-22 0:57 ` Dmitry Kravkov
2010-10-24 9:21 ` Vladislav Zolotarov
2010-10-24 10:11 ` Vladislav Zolotarov
2010-10-26 0:29 ` Jesse Gross
2010-10-26 9:14 ` Vladislav Zolotarov
2010-10-26 17:57 ` Jesse Gross
2010-10-21 21:34 ` Jesse Gross
2010-10-20 23:56 ` [PATCH v2 12/14] lro: Remove explicit vlan support Jesse Gross
2010-10-20 23:56 ` [PATCH v2 13/14] bonding: Update bonding for new vlan model Jesse Gross
2010-10-20 23:56 ` [PATCH v2 14/14] vlan: Remove accleration legacy functions Jesse Gross
2010-10-21 2:02 ` [PATCH v2 00/14] Move vlan acceleration into networking core David Dillow
2010-10-21 19:32 ` Jesse Gross
2010-10-21 8:33 ` 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=20101026132918.GG15074@solarflare.com \
--to=bhutchings@solarflare$(echo .)com \
--cc=davem@davemloft$(echo .)net \
--cc=jesse@nicira$(echo .)com \
--cc=netdev@vger$(echo .)kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
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