From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jay Cliburn Subject: Re: [PATHCH 1/16] ServerEngines 10Gb NIC driver Date: Tue, 19 Feb 2008 19:02:12 -0600 Message-ID: <20080219190212.5f410fed@osprey.hogchain.net> References: <20080218180051.f1da667c@mailhost.serverengines.com> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, shemminger@linux-foundation.org, sam@ravnborg.org, jeff@garzik.org To: "Subbu Seetharaman" Return-path: Received: from fmailhost03.isp.att.net ([204.127.217.103]:54807 "EHLO fmailhost03.isp.att.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1756230AbYBTBHQ (ORCPT ); Tue, 19 Feb 2008 20:07:16 -0500 In-Reply-To: <20080218180051.f1da667c@mailhost.serverengines.com> Sender: netdev-owner@vger.kernel.org List-ID: On Mon, 18 Feb 2008 10:00:51 -0800 "Subbu Seetharaman" wrote: > I have one question about bit fields. Several of > headers in the common code are generated by > srcgen from f/w source files. Some of the structures > in these headers have bit fields (with separate definitions > for little endian and big endian hosts). Are these un-acceptable > in Linux driver submissions ? The netdev maintainer, Jeff Garzik (to whom you should submit your driver), frowns upon the use of bitfields, and for good reason. See, for example, http://marc.info/?l=linux-kernel&m=118444531031506&w=2 http://lkml.org/lkml/2005/8/5/361 http://lkml.org/lkml/2006/6/20/470 http://en.wikipedia.org/wiki/Bit_field. You should avoid them if at all possible.