From: Jesper Dangaard Brouer <hawk@diku.dk>
To: jon_zhou@agilent.com
Cc: netdev@vger.kernel.org
Subject: Re: why some packets lost during transmission?
Date: Wed, 15 Jul 2009 19:17:05 +0200 (CEST) [thread overview]
Message-ID: <Pine.LNX.4.64.0907151911390.29305@tyr.diku.dk> (raw)
In-Reply-To: <60230E21F17E384C9BF0B9C98D9E3FDC04B4D3D8@sgp-sg-mb02.sgp.agilent.com>
On Wed, 15 Jul 2009, jon_zhou@agilent.com wrote:
> I try to send packets like this:
>
> for (i=0;i<loop;i++)
> {
> dev->hard_start_xmit(my_skb,dev);
> }
>
> the 'dev' point to network device.
>
> but too many packets lost if the 'loop' is big(i.e. 5000), I suspect the
> tx buffer of the NIC is full,but the driver does not print any related
> info.
Hint, look at the return value... it returns NETDEV_TX_OK if its okay.
> how does the upper layer(i.e.arp,qdisc) handle this situation?
Have you looked at pktgen?
Doc:
Documentation/networking/pktgen.txt
Code:
net/core/pktgen.c
Look at function pktgen_xmit() and notice that in the latest kernels
the dev->hard_start_xmit function pointer has been changed to
dev->netdev_ops->ndo_start_xmit.
Cheers,
Jesper Brouer
--
-------------------------------------------------------------------
MSc. Master of Computer Science
Dept. of Computer Science, University of Copenhagen
Author of http://www.adsl-optimizer.dk
-------------------------------------------------------------------
prev parent reply other threads:[~2009-07-15 17:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-07-10 9:23 Using Wireless Extensions in a Kernel Module Tim Schneider
2009-07-10 16:39 ` Marcel Holtmann
[not found] ` <4A5850E7.5020708@gdt.id.au>
2009-07-13 6:24 ` Tim Schneider
2009-07-15 9:17 ` why some packets lost during transmission? jon_zhou
2009-07-15 17:17 ` Jesper Dangaard Brouer [this message]
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=Pine.LNX.4.64.0907151911390.29305@tyr.diku.dk \
--to=hawk@diku.dk \
--cc=jon_zhou@agilent.com \
--cc=netdev@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