> crc offload of the nvme capsule. Check if all the skb bits are on, and if not > recalculate the crc in SW and check it. > > This patch reworks the receive-side crc calculation to always run at the end, > so as to keep a single flow for both offload and non-offload. This change > simplifies the code, but it may degrade performance for non-offload crc > calculation. > > Signed-off-by: Boris Pismenny <bor...@mellanox.com> > Signed-off-by: Ben Ben-Ishay <benis...@mellanox.com> > Signed-off-by: Or Gerlitz <ogerl...@mellanox.com> > Signed-off-by: Yoray Zack <yor...@mellanox.com> > --- > drivers/nvme/host/tcp.c | 111 ++++++++++++++++++++++++++++++++---- > ---- > 1 file changed, 91 insertions(+), 20 deletions(-) > > diff --git a/drivers/nvme/host/tcp.c b/drivers/nvme/host/tcp.c index > 534fd5c00f33..3c10c8876036 100644 > --- a/drivers/nvme/host/tcp.c > +++ b/drivers/nvme/host/tcp.c > @@ -69,6 +69,7 @@ enum nvme_tcp_queue_flags { > NVME_TCP_Q_LIVE = 1, > NVME_TCP_Q_POLLING = 2, > NVME_TCP_Q_OFFLOADS = 3, > + NVME_TCP_Q_OFF_CRC_RX = 4,
Because only the data digest is offloaded, and not the header digest, in order to avoid confusion, I suggest replacing the term NVME_TCP_Q_OFF_CRC_RX with NVME_TCP_Q_OFF_DDGST_RX. > };