linux/drivers/net/ethernet/mellanox/mlx5/core
Eric Dumazet d48051c5b8 net/mlx5e: fix csum adjustments caused by RXFCS
As shown by Dmitris, we need to use csum_block_add() instead of csum_add()
when adding the FCS contribution to skb csum.

Before 4.18 (more exactly commit 88078d98d1 "net: pskb_trim_rcsum()
and CHECKSUM_COMPLETE are friends"), the whole skb csum was thrown away,
so RXFCS changes were ignored.

Then before commit d55bef5059 ("net: fix pskb_trim_rcsum_slow() with
odd trim offset") both mlx5 and pskb_trim_rcsum_slow() bugs were canceling
each other.

Now we fixed pskb_trim_rcsum_slow() we need to fix mlx5.

Note that this patch also rewrites mlx5e_get_fcs() to :

- Use skb_header_pointer() instead of reinventing it.
- Use __get_unaligned_cpu32() to avoid possible non aligned accesses
  as Dmitris pointed out.

Fixes: 902a545904 ("net/mlx5e: When RXFCS is set, add FCS data into checksum calculation")
Reported-by: Paweł Staszewski <pstaszewski@itcare.pl>
Signed-off-by: Eric Dumazet <edumazet@google.com>
Cc: Eran Ben Elisha <eranbe@mellanox.com>
Cc: Saeed Mahameed <saeedm@mellanox.com>
Cc: Dimitris Michailidis <dmichail@google.com>
Cc: Cong Wang <xiyou.wangcong@gmail.com>
Cc: Paweł Staszewski <pstaszewski@itcare.pl>
Reviewed-by: Eran Ben Elisha <eranbe@mellanox.com>
Tested-By: Maria Pasechnik <mariap@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
2018-10-31 12:40:52 -07:00
..
accel net/mlx5: fix an unused-function warning 2018-07-18 13:38:54 -07:00
diag net/mlx5: Use flow counter IDs and not the wrapping cache object 2018-10-17 14:15:48 -07:00
en net/mlx5e: Add port FEC get/set functions 2018-10-18 13:13:31 -07:00
en_accel net/mlx5e: TLS, Read capabilities only when it is safe 2018-09-17 15:12:31 -07:00
fpga Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-10-19 11:03:06 -07:00
ipoib Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-10-19 11:03:06 -07:00
lib net/mlx5e: Replace PTP clock lock from RW lock to seq lock 2018-09-05 21:14:57 -07:00
alloc.c net/mlx5: Fix QP fragmented buffer allocation 2018-07-18 18:16:58 -07:00
cmd.c Merge branch 'mlx5-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux into net-next 2018-10-17 14:13:36 -07:00
cq.c net/mlx5: Set uid as part of CQ commands 2018-09-25 09:52:35 +03:00
debugfs.c net/mlx5: fix uaccess beyond "count" in debugfs read/write handlers 2018-07-11 12:08:57 -07:00
dev.c net/mlx5: Check for error in mlx5_attach_interface 2018-09-05 17:08:33 -07:00
en_arfs.c net/mlx5e: Add new counter for aRFS rule insertion failures 2018-10-03 16:17:59 -07:00
en_common.c net/mlx5: Rename incorrect naming in IFC file 2018-09-22 00:38:39 +03:00
en_dcbnl.c net/mlx5e: Cleanup of dcbnl related fields 2018-08-08 19:07:37 -07:00
en_dim.c
en_ethtool.c net/mlx5e: Ethtool driver callback for query/set FEC policy 2018-10-18 13:13:31 -07:00
en_fs_ethtool.c net/mlx5e: Ethtool steering, Support masks for l3/l4 filters 2018-10-01 11:32:41 -07:00
en_fs.c
en_main.c net/mlx5e: Support offloading tc priorities and chains for eswitch flows 2018-10-17 14:20:49 -07:00
en_rep.c net/mlx5e: Support offloading tc priorities and chains for eswitch flows 2018-10-17 14:20:49 -07:00
en_rep.h
en_rx.c net/mlx5e: fix csum adjustments caused by RXFCS 2018-10-31 12:40:52 -07:00
en_selftest.c net/mlx5: Rename modify/query_vport state related enums 2018-08-08 19:34:54 -07:00
en_stats.c net/mlx5e: Added 'raw_errors_laneX' fields to ethtool statistics 2018-10-18 13:32:57 -07:00
en_stats.h net/mlx5e: Add new counter for aRFS rule insertion failures 2018-10-03 16:17:59 -07:00
en_tc.c net/mlx5e: Support offloading tc priorities and chains for eswitch flows 2018-10-17 14:20:49 -07:00
en_tc.h
en_tx.c net/mlx5: WQ, fixes for fragmented WQ buffers API 2018-10-10 18:26:16 -07:00
en_txrx.c net/mlx5e: Add support for XDP_REDIRECT in device-out side 2018-07-26 15:23:57 -07:00
en.h net/mlx5e: Do not ignore netdevice TX/RX queues number 2018-10-10 17:58:17 -07:00
eq.c net/mlx5: Take only bit 24-26 of wqe.pftype_wq for page fault type 2018-10-10 18:26:16 -07:00
eswitch_offloads.c net/mlx5e: Support offloading tc priorities and chains for eswitch flows 2018-10-17 14:20:49 -07:00
eswitch.c net/mlx5: Split FDB fast path prio to multiple namespaces 2018-10-17 14:18:16 -07:00
eswitch.h net/mlx5: E-Switch, Enable setting goto slow path chain action 2018-10-17 14:18:50 -07:00
fs_cmd.c net/mlx5: Use flow counter IDs and not the wrapping cache object 2018-10-17 14:15:48 -07:00
fs_cmd.h
fs_core.c net/mlx5: Allocate enough space for the FDB sub-namespaces 2018-10-22 19:46:34 -07:00
fs_core.h net/mlx5: Split FDB fast path prio to multiple namespaces 2018-10-17 14:18:16 -07:00
fs_counters.c net/mlx5: Remove counter from idr after removing it from list 2018-10-18 13:13:31 -07:00
fw.c net/mlx5: Add Fast teardown support 2018-10-03 16:18:00 -07:00
health.c net/mlx5: Add Fast teardown support 2018-10-03 16:18:00 -07:00
Kconfig net/mlx5e: vxlan.c depends on CONFIG_VXLAN 2018-08-13 12:50:17 -07:00
lag.c
mad.c
main.c net/mlx5: Add Fast teardown support 2018-10-03 16:18:00 -07:00
Makefile net/mlx5: Reorganize the makefile 2018-08-13 12:50:17 -07:00
mcg.c
mlx5_core.h Merge branch 'mlx5-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux into net-next 2018-10-17 14:13:36 -07:00
mr.c net/mlx5: Limit scope of dump_fill_mkey function 2018-07-04 21:51:07 +03:00
pagealloc.c
pd.c
port.c net/mlx5: Fix wrong size allocation for QoS ETC TC regitster 2018-06-26 15:26:33 -07:00
qp.c net/mlx5: Set uid as part of DCT commands 2018-09-25 09:52:55 +03:00
rl.c
sriov.c net/mlx5: E-Switch, Avoid setup attempt if not being e-switch manager 2018-06-26 15:26:29 -07:00
srq.c Merge branch 'mlx5-next' of git://git.kernel.org/pub/scm/linux/kernel/git/mellanox/linux into net-next 2018-10-17 14:13:36 -07:00
transobj.c net/mlx5e: Avoid unbounded peer devices when unpairing TC hairpin rules 2018-10-01 10:58:00 -07:00
uar.c
vport.c net/mlx5: Cache the system image guid 2018-10-01 11:32:47 -07:00
wq.c Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net 2018-10-19 11:03:06 -07:00
wq.h net/mlx5: WQ, fixes for fragmented WQ buffers API 2018-10-10 18:26:16 -07:00