From: David Miller <davem@davemloft.net>
To: ivecera@redhat.com
Cc: netdev@vger.kernel.org, rasesh.mody@qlogic.com
Subject: Re: [PATCH net] bna: fix Rx data corruption with VLAN stripping enabled and MTU > 4096
Date: Fri, 15 Jan 2016 21:52:14 -0500 (EST) [thread overview]
Message-ID: <20160115.215214.1395762209308854330.davem@davemloft.net> (raw)
In-Reply-To: <1452861928-17069-1-git-send-email-ivecera@redhat.com>
From: Ivan Vecera <ivecera@redhat.com>
Date: Fri, 15 Jan 2016 13:45:28 +0100
> The multi-buffer Rx mode implemented in the past introduced
> a regression that causes a data corruption for received VLAN
> traffic when VLAN tag stripping is enabled. This mode is supported
> only be newer chipsets (1860) and is enabled when MTU > 4096.
>
> When this mode is enabled Rx queue contains buffers with fixed size
> 2048 bytes. Any incoming packet larger than 2048 is divided into
> multiple buffers that are attached as skb frags in polling routine.
>
> The driver assumes that all buffers associated with a packet except
> the last one is fully used (e.g. packet with size 5000 are divided
> into 3 buffers 2048 + 2048 + 904 bytes) and ignores true size reported
> in completions. This assumption is usually true but not when VLAN
> packet is received and VLAN tag stripping is enabled. In this case
> the first buffer is 2044 bytes long but as the driver always assumes
> 2048 bytes then 4 extra random bytes are included between the first
> and the second frag. Additionally the driver sets checksum as correct
> so the packet is properly processed by the core.
>
> The driver needs to check the size of used space in each Rx buffer
> reported by FW and not blindly use the fixed value.
>
> Cc: Rasesh Mody <rasesh.mody@qlogic.com>
> Signed-off-by: Ivan Vecera <ivecera@redhat.com>
Applied, thanks.
prev parent reply other threads:[~2016-01-16 2:52 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-01-15 12:45 [PATCH net] bna: fix Rx data corruption with VLAN stripping enabled and MTU > 4096 Ivan Vecera
2016-01-15 20:06 ` David Miller
2016-01-16 1:27 ` Rasesh Mody
2016-01-16 2:52 ` David Miller [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=20160115.215214.1395762209308854330.davem@davemloft.net \
--to=davem@davemloft.net \
--cc=ivecera@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=rasesh.mody@qlogic.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).