lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [day] [month] [year] [list]
Message-ID: <da8150af0803100331l23aa0ac3lcd7f184156a20a56@mail.gmail.com>
Date:	Mon, 10 Mar 2008 11:31:56 +0100
From:	"Pierre Falda" <darkstuff@...il.com>
To:	linux-kernel@...r.kernel.org
Subject: 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
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ