lkml.org 
[lkml]   [2008]   [Mar]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
Subjectdev_queue_xmit question
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


\
 
 \ /
  Last update: 2008-03-10 11:35    [W:0.020 / U:7.468 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site