From: "Tomoya MORINAGA" <tomoya-linux@dsn.okisemi.com>
To: "David Miller" <davem@davemloft.net>
Cc: <wg@grandegger.com>, <w.sang@pengutronix.de>, <chripell@fsfe.org>,
<21cnbao@gmail.com>, <sameo@linux.intel.com>,
<socketcan-core@lists.berlios.de>, <netdev@vger.kernel.org>,
<linux-kernel@vger.kernel.org>, <qi.wang@intel.com>,
<yong.y.wang@intel.com>, <andrew.chih.howe.khor@intel.com>,
<joel.clark@intel.com>, <kok.howg.ewe@intel.com>,
<margie.foster@intel.com>
Subject: Re: [PATCH net-next-2.6 v6 04/20] can: EG20T PCH: Add Tx Flow Control
Date: Fri, 3 Dec 2010 09:58:59 +0900 [thread overview]
Message-ID: <00c001cb9285$46adc4d0$66f8800a@maildom.okisemi.com> (raw)
In-Reply-To: <20101202.131236.28815617.davem@davemloft.net>
On Friday, December 03, 2010 6:12 AM, David Miller wrote :
>
> When implementing functionality like this it is better to use other
> existing well tested network drivers as a guide rather then trying
> to be unique and clever, as you are doing here.
Sure. I will do so.
>
> Second of all, checking the state of the device to determine if a
> stop queue should be performed has two problems:
>
> 1) The test uses a magic constant mask, which is undocumented.
Do you above "magic constant" mean "0xfc00" ?
If so, this constant is replaced to MACRO in 08/20 patch.
>
> 2) It causes the race you have on the wake queue side
>
> Use pure software state to guide your actions, and let the hardware
> interrupt trigger the wake queue.
>
> Also, you don't implement this as a true ring buffer, you only
> consider to stop the queue when you hit the last TX object entry. But
> all the previous slots could be available.
We can't use ring buffer.
Because ring buffer causes issue of tx packet out-of-order.
I show EG20T CAN HW spec below
According to priority, EG20T CAN HW sends packet from message object.
The priority is Message object number.
Lower number is high-priority, Higher is low priority
Thus, I think we can't use ring buffer.
Still, do you think I can use ring buffer ?
------
Thanks,
Tomoya MORINAGA
OKI SEMICONDUCTOR CO., LTD.
prev parent reply other threads:[~2010-12-03 0:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-11-30 4:18 Tomoya MORINAGA
2010-12-02 21:12 ` David Miller
2010-12-03 0:58 ` Tomoya MORINAGA [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='00c001cb9285$46adc4d0$66f8800a@maildom.okisemi.com' \
--to=tomoya-linux@dsn.okisemi.com \
--cc=21cnbao@gmail.com \
--cc=andrew.chih.howe.khor@intel.com \
--cc=chripell@fsfe.org \
--cc=davem@davemloft.net \
--cc=joel.clark@intel.com \
--cc=kok.howg.ewe@intel.com \
--cc=linux-kernel@vger.kernel.org \
--cc=margie.foster@intel.com \
--cc=netdev@vger.kernel.org \
--cc=qi.wang@intel.com \
--cc=sameo@linux.intel.com \
--cc=socketcan-core@lists.berlios.de \
--cc=w.sang@pengutronix.de \
--cc=wg@grandegger.com \
--cc=yong.y.wang@intel.com \
/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®