From: Abraham vd Merwe <abraham@2d3d.co.za>
To: Linux Kernel Development <linux-kernel@vger.kernel.org>
Subject: questions about network device drivers
Date: Tue, 30 Jul 2002 16:15:05 +0200 [thread overview]
Message-ID: <20020730161505.A23281@crystal.2d3d.co.za> (raw)
[-- Attachment #1: Type: text/plain, Size: 2483 bytes --]
Hi!
hard_start_xmit() method
========================
when should this function return 0 and when should it return 1 and in which
cases should it do netif_stop_queue() and/or free the dev_kfree_skb() ?
I'd really appreciate it if someone could clear this up. Almost all the
source/docs I've looked at seems to contradict each other ):
also, since hard_start_xmit() is protected by xmit_lock, why are some
drivers (e.g. cs89x0.c) guarding against concurrent calls to
hard_start_xmit (see the spinlock in cs89x0.c:net_send_packet)?
is there any way to control alignment of sk_buff's that gets passed to this
function? e.g. if I want the buffer to be aligned on 16-bit boundary and/or
be padded to a 16-bit boundary - is there any way to tell the kernel to pass
the driver buffers with those characterestics?
get_stats() method
==================
when errors occur that have details error fields in the net_device_stats
structure, am I supposed to increment both the total error count and the
detailed error count or both? also, what about dropped packets?
e.g.
1. i drop a frame because there's no memory left to allocate a sk_buff when
I receive a packet. Do I increment rx_dropped, rx_errors, or both?
2. there's a crc error. do I increment rx_crc_errors and rx_errors or just
rx_crc_errors?
also, I noticed that many drivers keep a private copy of the
net_device_stats structure and just return a pointer to that structure in
the get_stats method. what prevents the other driver methods from racing
with the functions that gets passed this structure?
tx_timeout() method
=================
there is no way to return an error in the tx_timeout method. what should I
do when an error occurs in that function (e.g. I'm unable to reset the
controller)? panic? that seems a bit excessive...
general
=======
What is the difference between netif_wake_queue() and netif_start_queue()?
--
Regards
Abraham
Humor in the Court:
Q. And who is this person you are speaking of?
A. My ex-widow said it.
__________________________________________________________
Abraham vd Merwe - 2d3D, Inc.
Device Driver Development, Outsourcing, Embedded Systems
Cell: +27 82 565 4451 Snailmail:
Tel: +27 21 761 7549 Block C, Aintree Park
Fax: +27 21 761 7648 Doncaster Road
Email: abraham@2d3d.co.za Kenilworth, 7700
Http: http://www.2d3d.com South Africa
[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]
next reply other threads:[~2002-07-30 14:07 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2002-07-30 14:15 Abraham vd Merwe [this message]
2002-07-30 15:48 ` Alan Cox
2002-07-30 14:48 ` Abraham vd Merwe
2002-07-30 14:57 ` Jeff Garzik
2002-07-30 14:54 ` Jeff Garzik
2002-07-30 15:04 ` Russell King
2002-07-31 8:53 ` Abraham vd Merwe
2002-07-31 11:14 jamal
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=20020730161505.A23281@crystal.2d3d.co.za \
--to=abraham@2d3d.co.za \
--cc=linux-kernel@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
all inboxes | Powered by JetHome®