* return values for hard_start_xmit and dev_queue_xmit
@ 2004-10-13 18:34 Ben Greear
2004-10-13 18:53 ` Ben Greear
0 siblings, 1 reply; 2+ messages in thread
From: Ben Greear @ 2004-10-13 18:34 UTC (permalink / raw)
To: 'netdev@oss.sgi.com'
While trying to get pktgen to effectively use VLANs to send traffic,
I noticed that the vlan code always returns 0 from it's hard_start_xmit
method. Since it calls dev_queue_xmit inside that method, I tried
returning the value that dev_queue_xmit returns. It seems that the
return values have different meanings because this causes crashes due
to freeing skbs when I shouldn't be...
The dev_queue_xmit method is fairly well documented in dev.c, but
there are zero comments in the netdevice.h file to explain what the
acceptable return values for hard_start_xmit are.
Does anyone know if there is a definative guide to the return values
for hard_start_xmit?
Thanks,
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: return values for hard_start_xmit and dev_queue_xmit
2004-10-13 18:34 return values for hard_start_xmit and dev_queue_xmit Ben Greear
@ 2004-10-13 18:53 ` Ben Greear
0 siblings, 0 replies; 2+ messages in thread
From: Ben Greear @ 2004-10-13 18:53 UTC (permalink / raw)
To: 'netdev@oss.sgi.com'
Ben Greear wrote:
> The dev_queue_xmit method is fairly well documented in dev.c, but
> there are zero comments in the netdevice.h file to explain what the
> acceptable return values for hard_start_xmit are.
Actually, looks like I'm wrong here. The comments in dev.c say that
error codes are < 0, but in fact, this can easily return NET_XMIT_DROP
which is a positive value (1).
Maybe the truth is that any non-zero return value from dev_queue_xmit
is an error?
Ben
--
Ben Greear <greearb@candelatech.com>
Candela Technologies Inc http://www.candelatech.com
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2004-10-13 18:53 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-10-13 18:34 return values for hard_start_xmit and dev_queue_xmit Ben Greear
2004-10-13 18:53 ` Ben Greear
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).