From: "Pierre Falda" <darkstuff@gmail.com>
To: linux-kernel@vger.kernel.org
Subject: dev_queue_xmit question
Date: Mon, 10 Mar 2008 11:31:56 +0100 [thread overview]
Message-ID: <da8150af0803100331l23aa0ac3lcd7f184156a20a56@mail.gmail.com> (raw)
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
reply other threads:[~2008-03-10 10:32 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=da8150af0803100331l23aa0ac3lcd7f184156a20a56@mail.gmail.com \
--to=darkstuff@gmail.com \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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®