* dev_queue_xmit question
@ 2008-03-10 10:31 Pierre Falda
0 siblings, 0 replies; only message in thread
From: Pierre Falda @ 2008-03-10 10:31 UTC (permalink / raw)
To: linux-kernel
Hi,
I apologize whether this question has been asked already, however I
performed a check on the archives and didn't find anything suitable to
my case.
I would like some enlightenment about dev_queue_xmit use:
The man page explains that the buffer is being 'consumed', however I
can increase the reference count value in order to attempt a resend.
Does this mean that I should proceed this way (see code below) in case
I am willing to send the same skb more than once (ie, multiple times)?
***********************************************************************
...
...
while(i want to send this skb)
{
skb_get(skb)
skb->dev = output_device;
skb->packet_type = PACKET_OUTGOING;
xmit_rvalue = dev_queue_xmit(skb)
if(xmit_rvalue) /* != 0 not successful send */
goto error;
}
return (0);
error:
dev_kfree_skb(skb);
return (-1);
***********************************************************************
So, is it okay or this piece of code and technique should be used only
in case of skb transmission error?
In short, what I would like to obtain is avoiding a (p)skb_copy
overhead before the dev_queue_xmit call.
Thank you in advance :)
Pierre
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2008-03-10 10:32 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2008-03-10 10:31 dev_queue_xmit question Pierre Falda
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®