]> git.baikalelectronics.ru Git - kernel.git/commit
net/tls: simplify seq calculation in handle_device_resync()
authorJakub Kicinski <jakub.kicinski@netronome.com>
Tue, 11 Jun 2019 04:39:59 +0000 (21:39 -0700)
committerDavid S. Miller <davem@davemloft.net>
Tue, 11 Jun 2019 19:22:26 +0000 (12:22 -0700)
commit8c83a603446eba476e6a207f6cc69212733b293a
tree23e241c8223f9e59f118e7262f011d3dad463a5d
parent1cbc8a4ee08710e6c5561830fdaf790ec675770d
net/tls: simplify seq calculation in handle_device_resync()

We subtract "TLS_HEADER_SIZE - 1" from req_seq, then if they
match we add the same constant to seq.  Just add it to seq,
and we don't have to touch req_seq.

Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Reviewed-by: Dirk van der Merwe <dirk.vandermerwe@netronome.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
net/tls/tls_device.c