From: Brice Goglin <brice@myri.com>
To: Stephen Hemminger <shemminger@osdl.org>
Cc: netdev@vger.kernel.org, LKML <linux-kernel@vger.kernel.org>,
"Andrew J. Gallatin" <gallatin@myri.com>
Subject: Re: [PATCH 5/6] myri10ge - Second half of the driver
Date: Fri, 12 May 2006 01:53:21 +0200 [thread overview]
Message-ID: <4463CE71.1000205@myri.com> (raw)
In-Reply-To: <20060510152244.44fb3db7@localhost.localdomain>
Stephen Hemminger wrote:
>> +
>> +static int
>> +myri10ge_open(struct net_device *dev)
>>
>
> It is preferred to put function declarations on one line.
>
> static int mril10ge_open(struct net_device *dev)
>
Well, I have seen several threads about this in the archive, with some
people against and some people pro. I personaly like grepping for the
declaration of function using ^name.
If this codingstyle is really required, I will do.
> I would prefer to just have driver always do NAPI. It's a 10G driver, it
> really needs to be NAPI to prevent machine starvation.
>
When TSO is disabled, we see performance being about 300Mbs lower when
enabling NAPI. But we'll probably enable TSO by default (see below) so
we'll probably drop non-NAPI.
>> + myri10ge_close(mgp->dev);
>> + status = myri10ge_load_firmware(mgp);
>> + if (status != 0) {
>> + printk(KERN_ERR "myri10ge: %s: failed to load firmware\n",
>> + mgp->dev->name);
>> + return;
>> + }
>> + myri10ge_open(mgp->dev);
>> +}
>>
>
> Watchdog's are a sign of buggy hardware and drivers!
>
Well... the watchdog is supposed to help detecting memory parity errors
in the NIC. It's rare, but it happens with cosmic rays. The recovery
part still need some work anyway. So we might drop the watchdog for now
and come back when recovery is ready.
Additionally, we are using our own watchdog because the linux netdev
watchdog does not seem to work well for devices with large hardware
transmit queues. If there is a hardware problem, a single (or even a
handful) of TCP streams will not backup into the hardware queue in a
timely fashion, leading to a long delay before the netdev watchdog
routine is called.
>> +#if 0
>> + /* TSO can be enabled via ethtool -K eth1 tso on */
>> +#ifdef NETIF_F_TSO
>> + netdev->features |= NETIF_F_TSO;
>> +#endif
>> +#endif
>>
>
> If it works enable it, if it doesn't take the code out.
>
It works. We did not enable it by default because there were some
problems in older kernels. They seem to be fixed in recent kernels. So
we'll enable TSO by default and have people disable it if it causes
problems.
>> [PATCH 3/6] myri10ge - Driver header files
>>
>> myri10ge driver header files.
>> myri10ge_mcp.h is the generic header, while myri10ge_mcp_gen_header.h
>> is automatically generated from our firmware image.
>>
>
> Then clean it up after the auto generation.
> Auto generated code still gets maintained by humans.
>
Oops sorry, I forgot to apply my cleaning script before sending.
>> +#define MYRI10GE_MCP_MAJOR 1
>> +#define MYRI10GE_MCP_MINOR 4
>> +
>>
>
> Major/Minor for what. You don't have a character device.
>
That's the firmware version, we'll find better names.
Thanks a lot for all the comments.
Brice
next prev parent reply other threads:[~2006-05-11 23:53 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-05-10 21:22 [PATCH 0/6] myri10ge - Myri-10G Ethernet driver Brice Goglin
2006-05-10 21:34 ` [PATCH 1/6] myri10ge - Revive pci_find_ext_capability Brice Goglin
2006-05-10 21:35 ` [PATCH 2/6] myri10ge - Add missing PCI IDs Brice Goglin
2006-05-10 21:52 ` Andi Kleen
2006-05-10 21:36 ` [PATCH 3/6] myri10ge - Driver header files Brice Goglin
2006-05-10 21:57 ` Roland Dreier
2006-05-10 22:00 ` Stephen Hemminger
2006-05-10 22:02 ` Francois Romieu
2006-05-10 21:40 ` [PATCH 4/6] myri10ge - First half of the driver Brice Goglin
2006-05-10 22:01 ` Stephen Hemminger
2006-05-10 22:06 ` Roland Dreier
2006-05-10 22:04 ` Roland Dreier
2006-05-11 23:53 ` Brice Goglin
2006-05-10 23:13 ` Francois Romieu
2006-05-11 23:53 ` Brice Goglin
2006-05-12 6:47 ` Evgeniy Polyakov
2006-05-12 17:40 ` David S. Miller
2006-05-13 16:13 ` Francois Romieu
2006-05-15 17:02 ` Lee Revell
2006-05-15 17:39 ` Brice Goglin
2006-05-10 21:42 ` [PATCH 5/6] myri10ge - Second " Brice Goglin
2006-05-10 22:22 ` Stephen Hemminger
[not found] ` <200605111924.33125.netdev@axxeo.de>
2006-05-11 18:28 ` [PATCH] expose simplified skb_checksum_recalc Stephen Hemminger
2006-05-11 18:40 ` Ingo Oeser
2006-05-12 19:52 ` David S. Miller
2006-05-11 23:53 ` Brice Goglin [this message]
2006-05-12 0:31 ` [PATCH 5/6] myri10ge - Second half of the driver Herbert Xu
2006-05-10 21:43 ` [PATCH 6/6] myri10ge - Kconfig and Makefile Brice Goglin
2006-05-13 18:51 ` Adrian Bunk
2006-05-13 18:56 ` Brice Goglin
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=4463CE71.1000205@myri.com \
--to=brice@myri.com \
--cc=gallatin@myri.com \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=shemminger@osdl.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).