From: Arnd Bergmann <arnd@arndb.de>
To: "Misha Tomushev" <misha@fabric7.com>
Cc: jgarzik@pobox.com, netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] VIOC: New Network Device Driver
Date: Sun, 10 Sep 2006 23:39:25 +0200 [thread overview]
Message-ID: <200609102339.25621.arnd@arndb.de> (raw)
In-Reply-To: <000501c6d85c$08a352f0$8301a8c0@calvados>
Am Friday 15 September 2006 02:15 schrieb Misha Tomushev:
> VIOC Device Driver provides a standard device interface to the internal
> fabric interconnected network used on servers designed and built by
> Fabric 7 Systems.
>
> The patch can be found at ftp.fabric7.com/VIOC.
We recently had a discussion about tx descriptor cleanup in general.
It would probably be more efficient to call vnic_clean_txq from the
vioc_rx_poll() function. To do that, your tx interrupt handler
should disable the tx interrupt line and call netif_rx_schedule,
like you do for the receive interrupts.
A few comments on coding style:
- Lots of macros like your GET_VNIC_TX_BUFADDR_LO: they seem overly
complicated. Maybe replace the users with something simpler, e.g.
instead of 'if (GET_VNIC_RXC_FLAGGED(rxcd) != VNIC_RXC_FLAGGED_HW_W)',
do 'if (vnic_rxc_word3(rxcd) & VNIC_RXC_FLAGGED_HW_W)'.
- whitespace: please follow the style in Documentation/CodingStyle,
use tabs for indentation instead of spaces, run everything through
'lindent' or 'indent -kr -i8' once to get spaces in the right places.
- unnecessary typecasts: try to avoid casts in the C source, in particular
from or to 'void *', that is done by C automatically. When you do a
macro like GETRELADDR(), make it return the right type so you don't need
a cast.
- macros: whereever possible, use an inline function instead
- printk: use dev_info/dev_dbg/... instead of plain printk, when you have
a pointer to a device.
- extern declarations: belong into header files, not C files. This will
guarantee that the definition matches the declaration.
- static forward declarations: get rid of them by moving the static
functions into the right order. This also makes reading easier, since you
know static functions are only called from below.
- vmalloc: try to avoid. use it only when allocating more than a few pages.
Arnd <><
next prev parent reply other threads:[~2006-09-10 21:40 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-09-10 10:40 [PATCH] VIOC: New Network Device Driver Misha Tomushev
2006-09-10 10:50 ` Jan-Benedict Glaw
2006-09-10 21:39 ` Arnd Bergmann [this message]
2006-09-10 22:21 ` Francois Romieu
2006-09-11 17:58 ` Misha Tomushev
2006-09-11 19:15 ` Arnd Bergmann
-- strict thread matches above, loose matches on Subject: below --
2006-09-10 10:42 Misha Tomushev
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200609102339.25621.arnd@arndb.de \
--to=arnd@arndb.de \
--cc=jgarzik@pobox.com \
--cc=linux-kernel@vger.kernel.org \
--cc=misha@fabric7.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).