lkml.org 
[lkml]   [2002]   [Jul]   [30]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
SubjectRe: questions about network device drivers
From
Date
On Tue, 2002-07-30 at 15:15, Abraham vd Merwe wrote:
> 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() ?

0 - OK
1 - I am busy, give me it later.

If you return 1 be sure to netif_stop_queue. The netif_wake_queue will
continue transmission


> 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?

There is not. You can expect just about every packet to be 16bit aligned

> 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?

total and specific error.

dropped - not sure. Its not a precise science since cards vary
themselves how their hardware accounts such things

> 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...

Try again ? If that fails I guess you initiate the self destruct
sequence for just that driver.

>
-
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/

\
 
 \ /
  Last update: 2005-03-22 13:22    [W:2.373 / U:0.088 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site