From mboxrd@z Thu Jan 1 00:00:00 1970 From: Matt Mackall Subject: Re: [PATCH] Add CRC32C chksums to crypto routines Date: Thu, 15 Jan 2004 19:40:37 -0600 Sender: linux-scsi-owner@vger.kernel.org Message-ID: <20040116014037.GN28521@waste.org> References: Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Return-path: Received: from waste.org ([209.173.204.2]:15811 "EHLO waste.org") by vger.kernel.org with ESMTP id S265238AbUAPBkn (ORCPT ); Thu, 15 Jan 2004 20:40:43 -0500 Content-Disposition: inline In-Reply-To: List-Id: linux-scsi@vger.kernel.org To: Clay Haapala Cc: linux-kernel@vger.kernel.org, linux-scsi@vger.kernel.org On Wed, Jan 14, 2004 at 03:31:10PM -0600, Clay Haapala wrote: > This patch against 2.6.1 adds CRC32C checksumming capabilities to the > crypto routines. The structure of it is based wholly on the existing > digest (md5) routines, the main difference being that chksums are > often used in an "accumulator" fashion, effectively requiring one to > set the seed, and the digest algorithms don't do that. > > CRC32C is a 32-bit CRC variant used by the iSCSI protocol and in other > drivers. iSCSI uses scatterlists, so it was strongly suggested by the > SCSI maintainers during reviews of Version 4 of the linux-iscsi driver > that the code be added to the crypto routines, which operate on > scatterlists. > > Test routines have been added to tcrypt.c. > > The linux-iscsi project can be found on SourceForge: > http://sourceforge.net/projects/linux-iscsi/ Clay! The cryptoapi stuff seems sensible, but we've already got at least one copy of the core crc32c code in the kernel at net/sctp/crc32c.c. It'd be better to work with the sctp folks to push this into lib/crc32.c. Handling multiple polynomials shouldn't be too painful there. -- Matt Mackall : http://www.selenic.com : Linux development and consulting