Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1594373 > unrolled thread
| Started by | Akshay Bhat <akshay.bhat@timesys.com> |
|---|---|
| First post | 2017-03-07 16:50 +0100 |
| Last post | 2017-03-09 16:40 +0100 |
| Articles | 5 — 2 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH v2 2/2] can: spi: hi311x: Add Holt HI-311x CAN driver Akshay Bhat <akshay.bhat@timesys.com> - 2017-03-07 16:50 +0100
Re: [PATCH v2 2/2] can: spi: hi311x: Add Holt HI-311x CAN driver Wolfgang Grandegger <wg@grandegger.com> - 2017-03-09 11:10 +0100
Re: [PATCH v2 2/2] can: spi: hi311x: Add Holt HI-311x CAN driver Akshay Bhat <akshay.bhat@timesys.com> - 2017-03-09 13:40 +0100
Re: [PATCH v2 2/2] can: spi: hi311x: Add Holt HI-311x CAN driver Wolfgang Grandegger <wg@grandegger.com> - 2017-03-09 15:50 +0100
Re: [PATCH v2 2/2] can: spi: hi311x: Add Holt HI-311x CAN driver Akshay Bhat <akshay.bhat@timesys.com> - 2017-03-09 16:40 +0100
| From | Akshay Bhat <akshay.bhat@timesys.com> |
|---|---|
| Date | 2017-03-07 16:50 +0100 |
| Subject | Re: [PATCH v2 2/2] can: spi: hi311x: Add Holt HI-311x CAN driver |
| Message-ID | <tipx8-18u-25@gated-at.bofh.it> |
On 01/17/2017 02:22 PM, Akshay Bhat wrote: > This patch adds support for the Holt HI-311x CAN controller. The HI311x > CAN controller is capable of transmitting and receiving standard data > frames, extended data frames and remote frames. The HI311x interfaces > with the host over SPI. > > Datasheet: www.holtic.com/documents/371-hi-3110_v-rev-jpdf.do > > Signed-off-by: Akshay Bhat <nodeax@gmail.com> > --- > Hi Marc, Wanted to check if this patch can be included in the next kernel release (4.12). Thanks, Akshay
[toc] | [next] | [standalone]
| From | Wolfgang Grandegger <wg@grandegger.com> |
|---|---|
| Date | 2017-03-09 11:10 +0100 |
| Message-ID | <tj3bd-3I3-49@gated-at.bofh.it> |
| In reply to | #1594373 |
Hello Akshay, unfortunately there are not many CAN controllers for the SPI bus. I just know the MPC251x, which behaves badly (message losses) under Linux, especially at hight bit-rates due to insufficient RX buffering. What is your experience with that driver for the HI-311x? Thanks, Wolfgang. Am 07.03.2017 um 16:31 schrieb Akshay Bhat: > > > On 01/17/2017 02:22 PM, Akshay Bhat wrote: >> This patch adds support for the Holt HI-311x CAN controller. The HI311x >> CAN controller is capable of transmitting and receiving standard data >> frames, extended data frames and remote frames. The HI311x interfaces >> with the host over SPI. >> >> Datasheet: www.holtic.com/documents/371-hi-3110_v-rev-jpdf.do >> >> Signed-off-by: Akshay Bhat <nodeax@gmail.com> >> --- >> > > > Hi Marc, > > Wanted to check if this patch can be included in the next kernel release > (4.12). > > Thanks, > Akshay > -- > To unsubscribe from this list: send the line "unsubscribe linux-can" in > the body of a message to majordomo@vger.kernel.org > More majordomo info at http://vger.kernel.org/majordomo-info.html > >
[toc] | [prev] | [next] | [standalone]
| From | Akshay Bhat <akshay.bhat@timesys.com> |
|---|---|
| Date | 2017-03-09 13:40 +0100 |
| Message-ID | <tj5wl-5a0-1@gated-at.bofh.it> |
| In reply to | #1595882 |
On 03/09/2017 04:59 AM, Wolfgang Grandegger wrote: > Hello Akshay, > > unfortunately there are not many CAN controllers for the SPI bus. I just > know the MPC251x, which behaves badly (message losses) under Linux, > especially at hight bit-rates due to insufficient RX buffering. What is > your experience with that driver for the HI-311x? > Hi Wolfgang, Good question. I have not worked with MPC251x but the HI-311x performs much better because HI-3110 features: 8 message FIFO (as opposed to 2 buffers on MPC2510) 20 MHz SPI interface (as opposed to 2.5 MHz on MPC2510) As for the real world test results: With RT patch applied to the kernel running on a i.MX6 Dual processor (worst case interrupt latency of 50us as reported by cyclictest), there are ZERO packet drops. Tested with Kvaser Leaf sending 100 burst messages (back to back) every 40ms at a 1M CAN bit rate. 10 million messages were sent by the Kvaser leaf and received successfully by the HI-311x driver. Even without the RT patch, I was able to get the packet drop to zero but this was by moving the CAN/SPI IRQ threads to CPU1 instead of CPU0. Hence I feel the driver is a good candidate to be included in the Linux kernel. Below are detailed test results if you like: https://goo.gl/VWgzp7 Ones of particular interest: 10M-msgs-1M-bitrate-100burst-40ms-interval-leaf.png 10M-msgs-1M-bitrate-100burst-40ms-interval-pwc.txt Thanks, Akshay > > Am 07.03.2017 um 16:31 schrieb Akshay Bhat: >> >> >> On 01/17/2017 02:22 PM, Akshay Bhat wrote: >>> This patch adds support for the Holt HI-311x CAN controller. The HI311x >>> CAN controller is capable of transmitting and receiving standard data >>> frames, extended data frames and remote frames. The HI311x interfaces >>> with the host over SPI. >>> >>> Datasheet: www.holtic.com/documents/371-hi-3110_v-rev-jpdf.do >>> >>> Signed-off-by: Akshay Bhat <nodeax@gmail.com> >>> --- >>> >> >> >> Hi Marc, >> >> Wanted to check if this patch can be included in the next kernel release >> (4.12). >> >> Thanks, >> Akshay >> -- >> To unsubscribe from this list: send the line "unsubscribe linux-can" in >> the body of a message to majordomo@vger.kernel.org >> More majordomo info at http://vger.kernel.org/majordomo-info.html >> >>
[toc] | [prev] | [next] | [standalone]
| From | Wolfgang Grandegger <wg@grandegger.com> |
|---|---|
| Date | 2017-03-09 15:50 +0100 |
| Message-ID | <tj7y9-6vj-3@gated-at.bofh.it> |
| In reply to | #1596026 |
Hello Akshay, Am 09.03.2017 um 13:34 schrieb Akshay Bhat: > > > On 03/09/2017 04:59 AM, Wolfgang Grandegger wrote: >> Hello Akshay, >> >> unfortunately there are not many CAN controllers for the SPI bus. I just >> know the MPC251x, which behaves badly (message losses) under Linux, >> especially at hight bit-rates due to insufficient RX buffering. What is >> your experience with that driver for the HI-311x? >> > > Hi Wolfgang, > > Good question. I have not worked with MPC251x but the HI-311x performs > much better because HI-3110 features: > 8 message FIFO (as opposed to 2 buffers on MPC2510) > 20 MHz SPI interface (as opposed to 2.5 MHz on MPC2510) > > As for the real world test results: > > With RT patch applied to the kernel running on a i.MX6 Dual processor > (worst case interrupt latency of 50us as reported by cyclictest), there > are ZERO packet drops. > Tested with Kvaser Leaf sending 100 burst messages (back to back) every > 40ms at a 1M CAN bit rate. 10 million messages were sent by the Kvaser > leaf and received successfully by the HI-311x driver. This corresponds to a bus load of approx. 50%, I think? > Even without the RT patch, I was able to get the packet drop to zero but > this was by moving the CAN/SPI IRQ threads to CPU1 instead of CPU0. Vanilla Linux is more critical here due to higher latencies. With 2500 Messages per sec the RX FIFO (8 Messages) fills up within 3.2 ms... and in a burst even quicker. That's already heavy load. Wolfgang.
[toc] | [prev] | [next] | [standalone]
| From | Akshay Bhat <akshay.bhat@timesys.com> |
|---|---|
| Date | 2017-03-09 16:40 +0100 |
| Message-ID | <tj8ky-76H-25@gated-at.bofh.it> |
| In reply to | #1596109 |
Hi Wolfgang, On 03/09/2017 09:45 AM, Wolfgang Grandegger wrote: > Hello Akshay, > > Am 09.03.2017 um 13:34 schrieb Akshay Bhat: >> >> Hi Wolfgang, >> >> Good question. I have not worked with MPC251x but the HI-311x performs >> much better because HI-3110 features: >> 8 message FIFO (as opposed to 2 buffers on MPC2510) >> 20 MHz SPI interface (as opposed to 2.5 MHz on MPC2510) >> >> As for the real world test results: >> >> With RT patch applied to the kernel running on a i.MX6 Dual processor >> (worst case interrupt latency of 50us as reported by cyclictest), there >> are ZERO packet drops. >> Tested with Kvaser Leaf sending 100 burst messages (back to back) every >> 40ms at a 1M CAN bit rate. 10 million messages were sent by the Kvaser >> leaf and received successfully by the HI-311x driver. > > This corresponds to a bus load of approx. 50%, I think? The usecase I tested above was more like ~30% (data payload length was randomized) but I did test with 50% bus load as well without any dropped messages. > >> Even without the RT patch, I was able to get the packet drop to zero but >> this was by moving the CAN/SPI IRQ threads to CPU1 instead of CPU0. > > Vanilla Linux is more critical here due to higher latencies. With 2500 > Messages per sec the RX FIFO (8 Messages) fills up within 3.2 ms... and > in a burst even quicker. That's already heavy load. > I agree with Vanilla Linux is more critical due to higher latencies, however if the frequency governor is set to performance and CAN/SPI threads are moved to another CPU (if that is an option) with SCHED_FIFO setting, the driver is able to keep up even at high bit rates / bursts. I understand SPI based CAN controllers are not ideal choice but for users that do not have any other option, I feel this controller/driver meets their need :) Thanks, Akshay
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web