dev_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