diff options
author | Ivan Vecera <ivecera@redhat.com> | 2016-01-15 13:45:28 +0100 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-01-15 21:49:25 -0500 |
commit | 6c3f5aef1159a278b54642ebc0bbb5cdab7630cf (patch) | |
tree | b65167bb24f1b50d78ed06008e448205ddf2ed33 /net/batman-adv/bridge_loop_avoidance.c | |
parent | 4e5448a31d73d0e944b7adb9049438a09bc332cb (diff) | |
download | linux-6c3f5aef1159a278b54642ebc0bbb5cdab7630cf.tar.bz2 |
bna: fix Rx data corruption with VLAN stripping enabled and MTU > 4096
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>
Reviewed-by: Rasesh Mody <rasesh.mody@qlogic.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net/batman-adv/bridge_loop_avoidance.c')
0 files changed, 0 insertions, 0 deletions