linux/drivers/infiniband/hw/nes
Arnd Bergmann 07f3355df7 infiniband: i40iw, nes: don't use wall time for TCP sequence numbers
The nes infiniband driver uses current_kernel_time() to get a nanosecond
granunarity timestamp to initialize its tcp sequence counters. This is
one of only a few remaining users of that deprecated function, so we
should try to get rid of it.

Aside from using a deprecated API, there are several problems I see here:

- Using a CLOCK_REALTIME based time source makes it predictable in
  case the time base is synchronized.
- Using a coarse timestamp means it only gets updated once per jiffie,
  making it even more predictable in order to avoid having to access
  the hardware clock source
- The upper 2 bits are always zero because the nanoseconds are at most
  999999999.

For the Linux TCP implementation, we use secure_tcp_seq(), which appears
to be appropriate here as well, and solves all the above problems.

i40iw uses a variant of the same code, so I do that same thing there
for ipv4. Unlike nes, i40e also supports ipv6, which needs to call
secure_tcpv6_seq instead.

Acked-by: Shiraz Saleem <shiraz.saleem@intel.com>
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Signed-off-by: Jason Gunthorpe <jgg@mellanox.com>
2018-07-11 12:10:19 -06:00
..
Kconfig RDMA/nes: Replace LRO with GRO 2016-02-29 17:11:57 -05:00
Makefile
nes_cm.c infiniband: i40iw, nes: don't use wall time for TCP sequence numbers 2018-07-11 12:10:19 -06:00
nes_cm.h nes: Change accelerated flag to bool 2017-12-22 13:33:30 -07:00
nes_context.h RDMA/nes: Copyright update 2012-01-30 16:18:07 -08:00
nes_hw.c RDMA/nes: Avoid complaints about unused variables 2018-07-10 21:01:29 -06:00
nes_hw.h RDMA/nes: Convert timers to use timer_setup() 2017-10-09 12:19:41 -04:00
nes_mgt.c treewide: kzalloc() -> kcalloc() 2018-06-12 16:19:22 -07:00
nes_mgt.h RDMA/nes: Copyright update 2012-01-30 16:18:07 -08:00
nes_nic.c treewide: kmalloc() -> kmalloc_array() 2018-06-12 16:19:22 -07:00
nes_utils.c Merge branch 'timer_setup' into for-next 2017-10-18 13:12:09 -04:00
nes_verbs.c IB/core: add max_send_sge and max_recv_sge attributes 2018-06-18 13:17:28 -06:00
nes_verbs.h RDMA/nes: Adding queue drain functions 2016-05-13 19:39:59 -04:00
nes.c IB/nes: Fix a race condition in nes_inetaddr_event() 2017-10-14 20:47:07 -04:00
nes.h RDMA/nes: Avoid complaints about unused variables 2018-07-10 21:01:29 -06:00