net/drivers: igc: introduce rt_igc driver
cover net/drivers: igc: introduce rt_igc driver
ported basic network functions not including TSN.
1. passed three network related smokey test: UDP, raw, dgram, But I do not know if these three test is enough to validate the driver, please let me know if there is other tests need to cover.
2. In addtion, another thing I want to discuss here is TSN functions of i225 has the very similiar effect with TDMA not only from clock sync, master and slave arch, timing mangement but the difference for TSN is that most of fucntions is implemented by hardware. We are considering if it is feasible to implement TSN-enabled TDMA-TSN driver to make use of i225 hardware feature because TDMA itself is really heavy.
Hongzhan Chen (1):
net/drivers: igc: introduce rt_igc driver
kernel/drivers/net/drivers/Kconfig | 3 + kernel/drivers/net/drivers/Makefile | 2 + kernel/drivers/net/drivers/igc/Makefile | 19 + kernel/drivers/net/drivers/igc/igc.h | 557 +++ kernel/drivers/net/drivers/igc/igc_base.c | 432 ++ kernel/drivers/net/drivers/igc/igc_base.h | 90 + kernel/drivers/net/drivers/igc/igc_defines.h | 537 +++ kernel/drivers/net/drivers/igc/igc_dump.c | 294 ++ kernel/drivers/net/drivers/igc/igc_hw.h | 299 ++ kernel/drivers/net/drivers/igc/igc_i225.c | 645 +++ kernel/drivers/net/drivers/igc/igc_i225.h | 16 + kernel/drivers/net/drivers/igc/igc_mac.c | 881 ++++ kernel/drivers/net/drivers/igc/igc_mac.h | 39 + kernel/drivers/net/drivers/igc/igc_main.c | 4276 ++++++++++++++++++ kernel/drivers/net/drivers/igc/igc_nvm.c | 215 + kernel/drivers/net/drivers/igc/igc_nvm.h | 14 + kernel/drivers/net/drivers/igc/igc_phy.c | 793 ++++ kernel/drivers/net/drivers/igc/igc_phy.h | 21 + kernel/drivers/net/drivers/igc/igc_regs.h | 267 ++ 19 files changed, 9400 insertions(+) create mode 100644 kernel/drivers/net/drivers/igc/Makefile create mode 100644 kernel/drivers/net/drivers/igc/igc.h create mode 100644 kernel/drivers/net/drivers/igc/igc_base.c create mode 100644 kernel/drivers/net/drivers/igc/igc_base.h create mode 100644 kernel/drivers/net/drivers/igc/igc_defines.h create mode 100644 kernel/drivers/net/drivers/igc/igc_dump.c create mode 100644 kernel/drivers/net/drivers/igc/igc_hw.h create mode 100644 kernel/drivers/net/drivers/igc/igc_i225.c create mode 100644 kernel/drivers/net/drivers/igc/igc_i225.h create mode 100644 kernel/drivers/net/drivers/igc/igc_mac.c create mode 100644 kernel/drivers/net/drivers/igc/igc_mac.h create mode 100644 kernel/drivers/net/drivers/igc/igc_main.c create mode 100644 kernel/drivers/net/drivers/igc/igc_nvm.c create mode 100644 kernel/drivers/net/drivers/igc/igc_nvm.h create mode 100644 kernel/drivers/net/drivers/igc/igc_phy.c create mode 100644 kernel/drivers/net/drivers/igc/igc_phy.h create mode 100644 kernel/drivers/net/drivers/igc/igc_regs.h
Signature · 1 line
2.17.1
PATCH 1/1 net/drivers: igc: introduce rt_igc driver
ported basic network function not including TSN feature.
--- kernel/drivers/net/drivers/Kconfig | 3 + kernel/drivers/net/drivers/Makefile | 2 + kernel/drivers/net/drivers/igc/Makefile | 19 + kernel/drivers/net/drivers/igc/igc.h | 557 +++ kernel/drivers/net/drivers/igc/igc_base.c | 432 ++ kernel/drivers/net/drivers/igc/igc_base.h | 90 + kernel/drivers/net/drivers/igc/igc_defines.h | 537 +++ kernel/drivers/net/drivers/igc/igc_dump.c | 294 ++ kernel/drivers/net/drivers/igc/igc_hw.h | 299 ++ kernel/drivers/net/drivers/igc/igc_i225.c | 645 +++ kernel/drivers/net/drivers/igc/igc_i225.h | 16 + kernel/drivers/net/drivers/igc/igc_mac.c | 881 ++++ kernel/drivers/net/drivers/igc/igc_mac.h | 39 + kernel/drivers/net/drivers/igc/igc_main.c | 4276 ++++++++++++++++++ kernel/drivers/net/drivers/igc/igc_nvm.c | 215 + kernel/drivers/net/drivers/igc/igc_nvm.h | 14 + kernel/drivers/net/drivers/igc/igc_phy.c | 793 ++++ kernel/drivers/net/drivers/igc/igc_phy.h | 21 + kernel/drivers/net/drivers/igc/igc_regs.h | 267 ++ 19 files changed, 9400 insertions(+) create mode 100644 kernel/drivers/net/drivers/igc/Makefile create mode 100644 kernel/drivers/net/drivers/igc/igc.h create mode 100644 kernel/drivers/net/drivers/igc/igc_base.c create mode 100644 kernel/drivers/net/drivers/igc/igc_base.h create mode 100644 kernel/drivers/net/drivers/igc/igc_defines.h create mode 100644 kernel/drivers/net/drivers/igc/igc_dump.c create mode 100644 kernel/drivers/net/drivers/igc/igc_hw.h create mode 100644 kernel/drivers/net/drivers/igc/igc_i225.c create mode 100644 kernel/drivers/net/drivers/igc/igc_i225.h create mode 100644 kernel/drivers/net/drivers/igc/igc_mac.c create mode 100644 kernel/drivers/net/drivers/igc/igc_mac.h create mode 100644 kernel/drivers/net/drivers/igc/igc_main.c create mode 100644 kernel/drivers/net/drivers/igc/igc_nvm.c create mode 100644 kernel/drivers/net/drivers/igc/igc_nvm.h create mode 100644 kernel/drivers/net/drivers/igc/igc_phy.c create mode 100644 kernel/drivers/net/drivers/igc/igc_phy.h create mode 100644 kernel/drivers/net/drivers/igc/igc_regs.h
kernel/drivers/net/drivers/Kconfig +3 -0
@@ -71,6 +71,9 @@ config XENO_DRIVERS_NET_DRV_IGB depends on XENO_DRIVERS_NET && PCI tristate "Intel(R) 82575 (Gigabit)" +config XENO_DRIVERS_NET_DRV_IGC + depends on XENO_DRIVERS_NET && PCI + tristate "Intel(R) Ethernet Controller I225-LM/I225-V support" config XENO_DRIVERS_NET_DRV_R8169 depends on XENO_DRIVERS_NET && PCI
kernel/drivers/net/drivers/Makefile +2 -0
@@ -12,6 +12,8 @@ obj-$(CONFIG_XENO_DRIVERS_NET_DRV_TULIP) += tulip/ obj-$(CONFIG_XENO_DRIVERS_NET_DRV_IGB) += igb/ +obj-$(CONFIG_XENO_DRIVERS_NET_DRV_IGC) += igc/ + obj-$(CONFIG_XENO_DRIVERS_NET_FEC) += freescale/ obj-$(CONFIG_XENO_DRIVERS_NET_DRV_8139) += rt_8139too.o
kernel/drivers/net/drivers/igc/Makefile new file +19 -0
@@ -0,0 +1,19 @@ +# SPDX-License-Identifier: GPL-2.0 +# Copyright (c) 2018 Intel Corporation + +# +# Intel(R) I225-LM/I225-V 2.5G Ethernet Controller +# + +ccflags-y += -I$(srctree)/drivers/xenomai/net/stack/include + +obj-$(CONFIG_XENO_DRIVERS_NET_DRV_IGC) += rt_igc.o + +rt_igc-y := \ + igc_i225.o \ + igc_mac.o \ + igc_base.o \ + igc_dump.o \ + igc_nvm.o \ + igc_phy.o \ + igc_main.o
kernel/drivers/net/drivers/igc/igc.h new file +557 -0
557 lines not on this page · raw message
kernel/drivers/net/drivers/igc/igc_base.c new file +432 -0
432 lines not on this page · raw message
kernel/drivers/net/drivers/igc/igc_base.h new file +90 -0
90 lines not on this page · raw message
kernel/drivers/net/drivers/igc/igc_defines.h new file +537 -0
537 lines not on this page · raw message
kernel/drivers/net/drivers/igc/igc_dump.c new file +294 -0
294 lines not on this page · raw message
kernel/drivers/net/drivers/igc/igc_hw.h new file +299 -0
299 lines not on this page · raw message
kernel/drivers/net/drivers/igc/igc_i225.c new file +645 -0
645 lines not on this page · raw message
kernel/drivers/net/drivers/igc/igc_i225.h new file +16 -0
@@ -0,0 +1,16 @@ +/* SPDX-License-Identifier: GPL-2.0 */ +/* Copyright (c) 2018 Intel Corporation */ + +#ifndef _IGC_I225_H_ +#define _IGC_I225_H_ + +s32 igc_acquire_swfw_sync_i225 (struct igc_hw *hw,u16 mask); +void igc_release_swfw_sync_i225 (struct igc_hw *hw,u16 mask); + +s32 igc_init_nvm_params_i225 (struct igc_hw *hw); +bool igc_get_flash_presence_i225 (struct igc_hw *hw); +s32 igc_set_eee_i225 (struct igc_hw *hw,bool adv2p5G,bool adv1G, +bool adv100M); +s32 igc_set_ltr_i225 (struct igc_hw *hw,bool link); + +#endif
kernel/drivers/net/drivers/igc/igc_mac.c new file +881 -0
94 lines not on this page · raw message
kernel/drivers/net/drivers/igc/igc_mac.h new file +39 -0
Lines of this file are not shown. View the raw message.
kernel/drivers/net/drivers/igc/igc_main.c new file +4276 -0
4,276 lines not on this page · raw message
kernel/drivers/net/drivers/igc/igc_nvm.c new file +215 -0
215 lines not on this page · raw message
kernel/drivers/net/drivers/igc/igc_nvm.h new file +14 -0
Lines of this file are not shown. View the raw message.
kernel/drivers/net/drivers/igc/igc_phy.c new file +793 -0
793 lines not on this page · raw message
kernel/drivers/net/drivers/igc/igc_phy.h new file +21 -0
Lines of this file are not shown. View the raw message.
kernel/drivers/net/drivers/igc/igc_regs.h new file +267 -0
267 lines not on this page · raw message
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.17.1
Part of the diff is not shown here. View the raw message.
Quoted 2 lines · Hongzhan Chen
ported basic network function not including TSN feature.
Please enable this driver in CI so that it is built regularly.
Jan
Signature · 2 lines
Siemens AG, Technology Competence Center Embedded Linux
Quoted 6 lines · Jan Kiszka
Quoted 2 lines · Hongzhan Chen
ported basic network function not including TSN feature.
Please enable this driver in CI so that it is built regularly.
... in the future. This time, I'll just add the following to your commit, crossing finger that nothing will explode:
.gitlab-ci.yml +1 -0
@@ -129,6 +129,7 @@ variables: - ./scripts/config -m XENO_DRIVERS_NET_DRV_NATSEMI - ./scripts/config -m XENO_DRIVERS_NET_DRV_VIA_RHINE - ./scripts/config -m XENO_DRIVERS_NET_DRV_IGB + - ./scripts/config -m XENO_DRIVERS_NET_DRV_IGC - ./scripts/config -m XENO_DRIVERS_NET_DRV_R8169 - ./scripts/config -e XENO_DRIVERS_NET_EXP_DRIVERS - ./scripts/config -m XENO_DRIVERS_NET_DRV_3C59X
Jan
Signature · 2 lines
Siemens AG, Technology Competence Center Embedded Linux
Quoted 24 lines · Jan Kiszka
Quoted 6 lines · Jan Kiszka
Quoted 2 lines · Hongzhan Chen
ported basic network function not including TSN feature.
Please enable this driver in CI so that it is built regularly.
... in the future. This time, I'll just add the following to your commit, crossing finger that nothing will explode:
.gitlab-ci.yml +1
-0@@ -129,6 +129,7 @@ variables: - ./scripts/config -m XENO_DRIVERS_NET_DRV_NATSEMI - ./scripts/config -m XENO_DRIVERS_NET_DRV_VIA_RHINE - ./scripts/config -m XENO_DRIVERS_NET_DRV_IGB + - ./scripts/config -m XENO_DRIVERS_NET_DRV_IGC - ./scripts/config -m XENO_DRIVERS_NET_DRV_R8169 - ./scripts/config -e XENO_DRIVERS_NET_EXP_DRIVERS - ./scripts/config -m XENO_DRIVERS_NET_DRV_3C59X
Quoted 2 lines
Jan
Too much red, unfortunately:
https://gitlab.com/Xenomai/xenomai-hacker-space/-/pipelines/631386274
Please address and add the above hunk in the next revision.
Jan
Signature · 2 lines
Siemens AG, Technology Competence Center Embedded Linux
Quoted 33 lines
-----Original Message-----
From: Jan Kiszka <[email protected]>
Sent: Monday, September 5, 2022 9:56 PM
To: Chen, Hongzhan <[email protected]>; [email protected]
Subject: Re: [PATCH 1/1] net/drivers: igc: introducert_igcdriverQuoted 24 lines · Jan Kiszka
Quoted 6 lines · Jan Kiszka
Quoted 2 lines · Hongzhan Chen
ported basic network function not including TSN feature.
Please enable this driver in CI so that it is built regularly.
... in the future. This time, I'll just add the following to your commit, crossing finger that nothing will explode:
.gitlab-ci.yml +1
-0@@ -129,6 +129,7 @@ variables: - ./scripts/config -m XENO_DRIVERS_NET_DRV_NATSEMI - ./scripts/config -m XENO_DRIVERS_NET_DRV_VIA_RHINE - ./scripts/config -m XENO_DRIVERS_NET_DRV_IGB + - ./scripts/config -m XENO_DRIVERS_NET_DRV_IGC - ./scripts/config -m XENO_DRIVERS_NET_DRV_R8169 - ./scripts/config -e XENO_DRIVERS_NET_EXP_DRIVERS - ./scripts/config -m XENO_DRIVERS_NET_DRV_3C59X
Quoted 8 lines
Quoted 2 lines
Jan
Too much red, unfortunately:
https://gitlab.com/Xenomai/xenomai-hacker-space/-/pipelines/631386274
Please address and add the above hunk in the next revision.
All the red is same one reason because of mmiowb which was dropped in next but I just worked on 3.2 stable branch. I will modify it and retested it based on next branch.
Regards
Hongzhan Chen
Quoted 6 lines
Jan
--
Siemens AG, Technology
Competence Center Embedded Linux
Quoted 6 lines · Hongzhan Chen
ported basic network functions not including TSN.
1. passed three network related smokey test: UDP, raw, dgram, But I do not know if these three test is enough to validate the driver, please let me know if there is other tests need to cover.
If those tests exchanged more than a hand-full of packets (to make sure we are not leaking buffers, thus will run out of resources after a while) and if you checked that the reported latency is comparable to rt_igb e.g., then we have a good indication that the driver works. The rest is field-testing.
Quoted 6 lines
2. In addtion, another thing I want to discuss here is TSN functions of i225 has the very similiar effect with TDMA not only from clock sync, master and slave arch, timing mangement but the difference for TSN is that most of fucntions is implemented by hardware. We are considering if it is feasible to implement TSN-enabled TDMA-TSN driver to make use of i225 hardware feature because TDMA itself is really heavy.
Yeah, time-triggered send is basically what RTmac/TDMA introduced via software almost two decades ago. I'm not sure, though, if we should map the configuration of TSN capabilities of modern hardware on interfaces (RTmac & Co.) that were designed that long ago. If it happens to work our easily, it's a nice experiment, but we would likely miss other things (Qbv transmission windows e.g.). And there is also the question how to set up an operate PTP aside RTnet.
Jan
Quoted 7 lines · Jan Kiszka
Quoted 6 lines · Hongzhan Chen
ported basic network functions not including TSN.
1. passed three network related smokey test: UDP, raw, dgram, But I do not know if these three test is enough to validate the driver, please let me know if there is other tests need to cover.
These tests are using the loopback device if no device is configured manually. You did that? You run the server part on one machine while the client was running on a different machine with proper cabling in between?
I just want to make sure that you were really using the HW and not a loopback (or any kind of local) "optimization".
Quoted 24 lines
If those tests exchanged more than a hand-full of packets (to make sure we are not leaking buffers, thus will run out of resources after a while) and if you checked that the reported latency is comparable to
rt_igbe.g., then we have a good indication that the driver works. The rest is field-testing.Quoted 6 lines
2. In addtion, another thing I want to discuss here is TSN functions of i225 has the very similiar effect with TDMA not only from clock sync, master and slave arch, timing mangement but the difference for TSN is that most of fucntions is implemented by hardware. We are considering if it is feasible to implement TSN-enabled TDMA-TSN driver to make use of i225 hardware feature because TDMA itself is really heavy.
Yeah, time-triggered send is basically what RTmac/TDMA introduced via software almost two decades ago. I'm not sure, though, if we should map the configuration of TSN capabilities of modern hardware on interfaces (RTmac & Co.) that were designed that long ago. If it happens to work our easily, it's a nice experiment, but we would likely miss other things (Qbv transmission windows e.g.). And there is also the question how to set up an operate PTP aside RTnet.
Jan
Quoted 18 lines
-----Original Message-----
From: Florian Bezdeka <[email protected]>
Sent: Saturday, August 27, 2022 2:36 PM
To: Jan Kiszka <[email protected]>; Chen, Hongzhan <[email protected]>; [email protected]
Subject: Re: [PATCH 0/1] net/drivers: igc: introducert_igcdriverQuoted 7 lines · Jan Kiszka
Quoted 6 lines · Hongzhan Chen
ported basic network functions not including TSN.
1. passed three network related smokey test: UDP, raw, dgram, But I do not know if these three test is enough to validate the driver, please let me know if there is other tests need to cover.
Quoted 6 lines
These tests are using the loopback device if no device is configured manually. You did that? You run the server part on one machine while the client was running on a different machine with proper cabling in between?
I just want to make sure that you were really using the HW and not a loopback (or any kind of local) "optimization"
Sorry , I just missed replying to this email. What you concern I already answered in another thread replied to Jan. Yes, I do not use lookback device but real hardwares including i225- i225 direct connection, I225 - I210 direct connection and server and client just run on different machines with proper cabling in between.
Regards
Hongzhan Chen
Quoted 25 lines
Quoted 25 lines
If those tests exchanged more than a hand-full of packets (to make sure we are not leaking buffers, thus will run out of resources after a while) and if you checked that the reported latency is comparable to
rt_igbe.g., then we have a good indication that the driver works. The rest is field-testing.Quoted 6 lines
2. In addtion, another thing I want to discuss here is TSN functions of i225 has the very similiar effect with TDMA not only from clock sync, master and slave arch, timing mangement but the difference for TSN is that most of fucntions is implemented by hardware. We are considering if it is feasible to implement TSN-enabled TDMA-TSN driver to make use of i225 hardware feature because TDMA itself is really heavy.
Yeah, time-triggered send is basically what RTmac/TDMA introduced via software almost two decades ago. I'm not sure, though, if we should map the configuration of TSN capabilities of modern hardware on interfaces (RTmac & Co.) that were designed that long ago. If it happens to work our easily, it's a nice experiment, but we would likely miss other things (Qbv transmission windows e.g.). And there is also the question how to set up an operate PTP aside RTnet.
Jan
Quoted 11 lines
-----Original Message-----
From: Jan Kiszka <[email protected]>
Sent: Saturday, August 27, 2022 12:27 AM
To: Chen, Hongzhan <[email protected]>; [email protected]
Subject: Re: [PATCH 0/1] net/drivers: igc: introducert_igcdriverQuoted 2 lines · Hongzhan Chen
ported basic network functions not including TSN.
Quoted 8 lines
Quoted 4 lines
1. passed three network related smokey test: UDP, raw, dgram, But I do not know if these three test is enough to validate the driver, please let me know if there is other tests need to cover.
If those tests exchanged more than a hand-full of packets (to make sure we are not leaking buffers, thus will run out of resources after a while) and if you checked that the reported latency is comparable to
I setup two environements to do rt_igc validation listed in [1]. I also setup [2] environment to compare performance with i210. All three smokey tests( UDP, DGRM, RAW)
had passed 72 hours long time test in [1].B. In environment [1].B, the latency is about 60us better than 120 us latency got in [2] in UDP smokey test.
[1]:
A: I225<--->switch <--> I210
B: I225<--->I225
[2]:
C: I210<--> I210
Quoted 10 lines
rt_igbe.g., then we have a good indication that the driver works. The rest is field-testing.Quoted 6 lines
2. In addtion, another thing I want to discuss here is TSN functions of i225 has the very similiar effect with TDMA not only from clock sync, master and slave arch, timing mangement but the difference for TSN is that most of fucntions is implemented by hardware. We are considering if it is feasible to implement TSN-enabled TDMA-TSN driver to make use of i225 hardware feature because TDMA itself is really heavy.
Quoted 7 lines
Yeah, time-triggered send is basically what RTmac/TDMA introduced via software almost two decades ago. I'm not sure, though, if we should map the configuration of TSN capabilities of modern hardware on interfaces (RTmac & Co.) that were designed that long ago. If it happens to work our easily, it's a nice experiment, but we would likely miss other things (Qbv transmission windows e.g.). And there is also the question how to set up an operate PTP aside RTnet.
Yes, PTP would be a hard topic.
In addition, the TSN reference application I refer to would use socket option for example
SO_TIMSSTAMPING but rtnet does not support. It also use vlan to differentiate priority
for different steams but rtnet does not support vlan.
TSN may make use of two more NIC queues to dispatch packets to guarantee deterministic for higher priority packet but rtnet do not have scheme to do related mapping or scheduler to two more queues...
Regards
Hongzhan Chen
Quoted 8 lines
Jan
Quoted 27 lines · Hongzhan
Quoted 11 lines
-----Original Message-----
From: Jan Kiszka <[email protected]>
Sent: Saturday, August 27, 2022 12:27 AM
To: Chen, Hongzhan <[email protected]>; [email protected]
Subject: Re: [PATCH 0/1] net/drivers: igc: introducert_igcdriverQuoted 2 lines · Hongzhan Chen
ported basic network functions not including TSN.
Quoted 8 lines
Quoted 4 lines
1. passed three network related smokey test: UDP, raw, dgram, But I do not know if these three test is enough to validate the driver, please let me know if there is other tests need to cover.
If those tests exchanged more than a hand-full of packets (to make sure we are not leaking buffers, thus will run out of resources after a while) and if you checked that the reported latency is comparable to
I setup two environements to do
rt_igcvalidation listed in [1]. I also setup [2] environment to compare performance with i210. All three smokeytests( UDP, DGRM, RAW)
had passed 72 hours long time test in [1].B. In environment [1].B, the latency is about 60us better than 120 us latency got in [2] in UDP smokey test.[1]:
Quoted 8 lines
A: I225<--->switch <--> I210
B: I225<--->I225
[2]:
C: I210<--> I210
OK, looks good.
One follow-up question: I've just spotted those hw semaphore functions. None of them is every called from RT task or even RT interrupt context, did you check that carefully?
Quoted 18 lines
Quoted 10 lines
rt_igbe.g., then we have a good indication that the driver works. The rest is field-testing.Quoted 6 lines
2. In addtion, another thing I want to discuss here is TSN functions of i225 has the very similiar effect with TDMA not only from clock sync, master and slave arch, timing mangement but the difference for TSN is that most of fucntions is implemented by hardware. We are considering if it is feasible to implement TSN-enabled TDMA-TSN driver to make use of i225 hardware feature because TDMA itself is really heavy.
Quoted 7 lines
Yeah, time-triggered send is basically what RTmac/TDMA introduced via software almost two decades ago. I'm not sure, though, if we should map the configuration of TSN capabilities of modern hardware on interfaces (RTmac & Co.) that were designed that long ago. If it happens to work our easily, it's a nice experiment, but we would likely miss other things (Qbv transmission windows e.g.). And there is also the question how to set up an operate PTP aside RTnet.
Quoted 7 lines
Yes, PTP would be a hard topic.
In addition, the TSN reference application I refer to would use socket option for example
SO_TIMSSTAMPINGbut rtnet does not support. It also use vlan to differentiate priority
for different steams but rtnet does not support vlan.
TSN may make use of two more NIC queues to dispatch packets to guarantee deterministic for higher priority packet but rtnet do not have scheme to do related mapping or scheduler to two more queues...
Yeah, there is quite a bit of fundamental work ahead if we want to enable that. Right now, RTnet is "all or nothing" of the card. Do we have SR-IOV here, and could that help? I'm thinking of handing out only a VF to an RTnet driver and configure everything that is needed to run that VF with deterministic traffic on the PF during setup.
Jan
Signature · 2 lines
Siemens AG, Technology Competence Center Embedded Linux
Quoted 46 lines
-----Original Message-----
From: Jan Kiszka <[email protected]>
Sent: Monday, September 5, 2022 8:00 PM
To: Chen, Hongzhan <[email protected]>; Jan Kiszka <[email protected]>; [email protected]
Subject: Re: [PATCH 0/1] net/drivers: igc: introducert_igcdriverQuoted 6 lines · Hongzhan
Quoted 6 lines
-----Original Message-----
From: Jan Kiszka <[email protected]>
Sent: Saturday, August 27, 2022 12:27 AM
To: Chen, Hongzhan <[email protected]>;Quoted 10 lines
Quoted 10 lines
Subject: Re: [PATCH 0/1] net/drivers: igc: introduce
rt_igcdriverQuoted 6 lines · Hongzhan Chen
ported basic network functions not including TSN.
1. passed three network related smokey test: UDP, raw, dgram, But I do not know if these three test is enough to validate the driver, please let me know if there is other tests need to cover.
Quoted 5 lines
Quoted 3 lines
If those tests exchanged more than a hand-full of packets (to make sure we are not leaking buffers, thus will run out of resources after a while) and if you checked that the reported latency is comparable to
I setup two environements to do
rt_igcvalidation listed in [1]. I also setup [2]environment
Quoted 1 line
to compare performance with i210. All three smokey tests( UDP, DGRM,
RAW)
Quoted 11 lines
had passed 72 hours long time test in [1].B. In environment [1].B, the latency is about 60us better than 120 us latency got in [2] in UDP smokey test.
[1]:
A: I225<--->switch <--> I210
B: I225<--->I225
[2]:
Quoted 8 lines
Quoted 2 lines
C: I210<--> I210
OK, looks good.
One follow-up question: I've just spotted those hw semaphore functions. None of them is every called from RT task or even RT interrupt context, did you check that carefully?
In IGC, the hw semaphore is just to protect accessing PHY or NVM related registers, will be encapsulated in phy or nvm related operations but not directly called or used by RT task or RT interrupt context.
Regards
Hongzhan Chen
Quoted 42 lines
Quoted 19 lines
Quoted 11 lines
rt_igbe.g., then we have a good indication that the driver works. The rest is field-testing.Quoted 6 lines
2. In addtion, another thing I want to discuss here is TSN functions of i225 has the very similiar effect with TDMA not only from clock sync, master and slave arch, timing mangement but the difference for TSN is that most of fucntions is implemented by hardware. We are considering if it is feasible to implement TSN-enabled TDMA-TSN driver to make use of i225 hardware feature because TDMA itself is really heavy.
Quoted 7 lines
Yeah, time-triggered send is basically what RTmac/TDMA introduced via software almost two decades ago. I'm not sure, though, if we should map the configuration of TSN capabilities of modern hardware on interfaces (RTmac & Co.) that were designed that long ago. If it happens to work our easily, it's a nice experiment, but we would likely miss other things (Qbv transmission windows e.g.). And there is also the question how to set up an operate PTP aside RTnet.
Quoted 2 lines
Yes, PTP would be a hard topic.
In addition, the TSN reference application I refer to would use socket optionfor example
Quoted 1 line
SO_TIMSSTAMPINGbut rtnet does not support. It also use vlan todifferentiate priority
Quoted 2 lines
for different steams but rtnet does not support vlan. TSN may make use of two more NIC queues to dispatch packets to
guarantee deterministic
Quoted 1 line
for higher priority packet but rtnet do not have scheme to do related
mapping or scheduler to
Quoted 1 line
two more queues...
Yeah, there is quite a bit of fundamental work ahead if we want to enable that. Right now, RTnet is "all or nothing" of the card. Do we have SR-IOV here, and could that help? I'm thinking of handing out only a VF to an RTnet driver and configure everything that is needed to run that VF with deterministic traffic on the PF during setup.
Jan
--
Siemens AG, Technology
Competence Center Embedded Linux