linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
From: "Russell McGuire" <rmcguire@videopresence.com>
To: <linuxppc-embedded@ozlabs.org>
Subject: Virtual device hdlc0 asks to que packet!
Date: Tue, 4 Mar 2008 15:33:37 -0800	[thread overview]
Message-ID: <000301c87e50$2bbdc680$6405a8c0@absolut> (raw)
In-Reply-To: <mailman.1516.1204637021.17968.linuxppc-embedded@ozlabs.org>

All,

Background MPC8360, using a T1 PHY as an HDLC device.

Developing my hdlc driver, and was writing a simple send utility. To test it
out. Things seem well when I had massive delays in between the write() or
sendot(), and I was able to attain 100+Kbytes/sec. However, when I replaced
the simple usleeps(xxx) with select statements, suddenly I started getting a
ton of these messages.

"Virtual device hdlc0 asks to que packet!"

Along with dropped or non-sent data.

In my driver I am tracking the available TX buffers, and issue a
netif_stop_que() statement inside the start_xmit() call, with a
corresponding netif_wake_que() in the tx_handler.

Is there something else that needs to be done in order to make a select
statement wait for the socket to not be busy? It seems that it always
returns immediately with no timeout.

I guess the other pieces of the scenario are as follows:

* Using 'sethdlc hdlc0 hdlc' for the mode, so no IP stack is used.
* Opening the socket to the hdlc device directly to the device itself, i.e.
no port number socket(PF_PACKET, SOCK_RAW, htons(ETH_P_ALL));

I have used both sendto() and write() to pass data down, and they both
return as if all the data has been sent, i.e. I never get an error.

-Russ

       reply	other threads:[~2008-03-04 23:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <mailman.1516.1204637021.17968.linuxppc-embedded@ozlabs.org>
2008-03-04 23:33 ` Russell McGuire [this message]
2008-03-05  8:11   ` Virtual device hdlc0 asks to que packet! Joakim Tjernlund
2008-03-05  8:43     ` Russell McGuire
2008-03-05 10:04       ` Joakim Tjernlund
2008-03-05 11:52         ` Joakim Tjernlund

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='000301c87e50$2bbdc680$6405a8c0@absolut' \
    --to=rmcguire@videopresence.com \
    --cc=linuxppc-embedded@ozlabs.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;
as well as URLs for NNTP newsgroup(s).