Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id ; Fri, 12 Oct 2001 15:25:23 -0400 Received: (majordomo@vger.kernel.org) by vger.kernel.org id ; Fri, 12 Oct 2001 15:25:14 -0400 Received: from mandrakesoft.mandrakesoft.com ([216.71.84.35]:23331 "EHLO mandrakesoft.mandrakesoft.com") by vger.kernel.org with ESMTP id ; Fri, 12 Oct 2001 15:25:05 -0400 Date: Fri, 12 Oct 2001 14:25:30 -0500 (CDT) From: Jeff Garzik To: Matt Domsch cc: linux-kernel@vger.kernel.org Subject: Re: crc32 cleanups In-Reply-To: Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org I like it. I even had local patches that did something similar, creating lib/crc32, but it never got to the polished stage. Donald Becker had also suggested at the 2.5 kernel summit that the ether_crc stuff become generic code, so your code here follows along well with that plan. So, after some testing, I'm definitely interested in these patches (at least as they related to net drivers). WRT initialization, I would suggest refcounting: driver calls init_crc32 at module load time, and cleanup_crc32 at module removal time. When the first reference appears, the desired poly table is initialized. When the last reference disappears, the poly table is kfree'd. I considered other initialization scenarios but this seems to be the cleanest. Jeff - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/