From: Pavel Pisa <pisa@cmp.felk.cvut.cz>
To: "Marc Kleine-Budde" <mkl@pengutronix.de>
Cc: linux-can@vger.kernel.org,
Oliver Hartkopp <socketcan@hartkopp.net>,
Wolfgang Grandegger <wg@grandegger.com>,
David Miller <davem@davemloft.net>,
netdev@vger.kernel.org, linux-kernel@vger.kernel.org,
Marin Jerabek <martin.jerabek01@gmail.com>,
Ondrej Ille <ondrej.ille@gmail.com>,
Jiri Novak <jnovak@fel.cvut.cz>,
Jaroslav Beran <jara.beran@gmail.com>,
Petr Porazil <porazil@pikron.com>, Pavel Machek <pavel@ucw.cz>,
Carsten Emde <c.emde@osadl.org>,
Drew Fustini <pdp7pdp7@gmail.com>,
Matej Vasilevski <matej.vasilevski@gmail.com>,
Andrew Dennison <andrew.dennison@motec.com.au>
Subject: Re: [PATCH v1 0/4] can: ctucanfd: clenup acoording to the actual rules and documentation linking
Date: Fri, 29 Apr 2022 23:31:28 +0200 [thread overview]
Message-ID: <202204292331.28980.pisa@cmp.felk.cvut.cz> (raw)
In-Reply-To: <20220428072239.kfgtu2bfcud6tetc@pengutronix.de>
Hello Marc,
On Thursday 28 of April 2022 09:22:39 Marc Kleine-Budde wrote:
> > Jiapeng Chong (2):
> > can: ctucanfd: Remove unnecessary print function dev_err()
> > can: ctucanfd: Remove unused including <linux/version.h>
>
> I had these already applied.
>
> > Pavel Pisa (2):
> > can: ctucanfd: remove PCI module debug parameters and core debug
> > statements.
> > docs: networking: device drivers: can: add ctucanfd and its author
> > e-mail update
>
> Split into separate patches and applied.
Excuse me for late reply and thanks much for split to preferred
form. Matej Vasilevski has tested updated linux-can-next testing
on Xilinx Zynq 7000 based MZ_APO board and used it with his
patches to do proceed next round of testing of Jan Charvat's NuttX
TWAI (CAN) driver on ESP32C3. We plan that CTU CAN FD timestamping
will be send for RFC/discussion soon.
I would like to thank to Andrew Dennison who implemented, tested
and shares integration with LiteX and RISC-V
https://github.com/litex-hub/linux-on-litex-vexriscv
He uses development version of the CTU CAN FD IP core with configurable
number of Tx buffers (2 to 8) for which will be required
automatic setup logic in the driver.
I need to discuss with Ondrej Ille actual state and his plans.
But basically ntxbufs in the ctucan_probe_common() has to be assigned
from TXTB_INFO TXT_BUFFER_COUNT field. For older core version
the TXT_BUFFER_COUNT field bits should be equal to zero so when
value is zero, the original version with fixed 4 buffers will
be recognized. When value is configurable then for (uncommon) number
of buffers which is not power of two, there will be likely
a problem with way how buffers queue is implemented
txtb_id = priv->txb_head % priv->ntxbufs;
...
priv->txb_head++;
...
priv->txb_tail++;
When I have provided example for this type of queue many years
ago I have probably shown example with power of 2 masking,
but modulo by arbitrary number does not work with sequence
overflow. Which means to add there two "if"s unfortunately
if (++priv->txb_tail == 2 * priv->ntxbufs)
priv->txb_tail = 0;
We need 2 * priv->ntxbufs range to distinguish empty and full queue...
But modulo is not nice either so I probably come with some other
solution in a longer term. In the long term, I want to implement
virtual queues to allow multiqueue to use dynamic Tx priority
of up to 8 the buffers...
Best wishes,
Pavel Pisa
phone: +420 603531357
e-mail: pisa@cmp.felk.cvut.cz
Department of Control Engineering FEE CVUT
Karlovo namesti 13, 121 35, Prague 2
university: http://control.fel.cvut.cz/
personal: http://cmp.felk.cvut.cz/~pisa
projects: https://www.openhub.net/accounts/ppisa
CAN related:http://canbus.pages.fel.cvut.cz/
Open Technologies Research Education and Exchange Services
https://gitlab.fel.cvut.cz/otrees/org/-/wikis/home
next prev parent reply other threads:[~2022-04-29 21:32 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-24 16:28 Pavel Pisa
2022-04-24 16:28 ` [PATCH v1 1/4] can: ctucanfd: remove PCI module debug parameters and core debug statements Pavel Pisa
2022-04-25 7:48 ` Vincent Mailhol
2022-04-25 8:10 ` Pavel Pisa
2022-04-25 8:34 ` Vincent Mailhol
2022-04-24 16:28 ` [PATCH v1 2/4] can: ctucanfd: Remove unnecessary print function dev_err() Pavel Pisa
2022-04-24 16:28 ` [PATCH v1 3/4] can: ctucanfd: Remove unused including <linux/version.h> Pavel Pisa
2022-04-24 16:28 ` [PATCH v1 4/4] docs: networking: device drivers: can: add ctucanfd and its author e-mail update Pavel Pisa
2022-04-28 7:22 ` [PATCH v1 0/4] can: ctucanfd: clenup acoording to the actual rules and documentation linking Marc Kleine-Budde
2022-04-29 21:31 ` Pavel Pisa [this message]
2022-05-02 7:21 ` Marc Kleine-Budde
2022-05-02 7:35 ` Marc Kleine-Budde
[not found] ` <CAHQrW0_bxDyTf7pNHgXwcO=-0YRWtsxscOSWWU4fDmNYo8d-9Q@mail.gmail.com>
2022-05-03 6:46 ` Marc Kleine-Budde
2022-05-03 7:21 ` Andrew Dennison
2022-05-03 7:27 ` Pavel Pisa
2022-05-03 8:55 ` Marc Kleine-Budde
[not found] ` <CAA7ZjpbzaSiX6jbV5B88_VqqJga=9y0Kf_Z77Q4DN-5YfQFy0g@mail.gmail.com>
2022-05-08 2:51 ` Andrew Dennison
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=202204292331.28980.pisa@cmp.felk.cvut.cz \
--to=pisa@cmp.felk.cvut.cz \
--cc=andrew.dennison@motec.com.au \
--cc=c.emde@osadl.org \
--cc=davem@davemloft.net \
--cc=jara.beran@gmail.com \
--cc=jnovak@fel.cvut.cz \
--cc=linux-can@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.jerabek01@gmail.com \
--cc=matej.vasilevski@gmail.com \
--cc=mkl@pengutronix.de \
--cc=netdev@vger.kernel.org \
--cc=ondrej.ille@gmail.com \
--cc=pavel@ucw.cz \
--cc=pdp7pdp7@gmail.com \
--cc=porazil@pikron.com \
--cc=socketcan@hartkopp.net \
--cc=wg@grandegger.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®