net: stmmac: Support DWMAC5 and TSN
Subsystems (5)
cover net: stmmac: Support DWMAC5 and TSN
Hi,
This adds support for a new IP version (5) of dwmac and for TSN features as defined by IEEE802.1Qbv-2015 and IEEE802.1Qbu.
Please review.
Best regards,
Jose Miguel Abreu
Jose Abreu (2):
net: stmmac: Add support for DWMAC5 with TSN features
bindings: net: stmmac: Add documentation for TSN parameters
Documentation/devicetree/bindings/net/stmmac.txt | 20 +++++ drivers/net/ethernet/stmicro/stmmac/Makefile | 2 +- drivers/net/ethernet/stmicro/stmmac/common.h | 4 + drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | 37 +++++++- drivers/net/ethernet/stmicro/stmmac/dwmac5_tsn.c | 99 ++++++++++++++++++++++ drivers/net/ethernet/stmicro/stmmac/dwmac5_tsn.h | 57 +++++++++++++ drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 + .../net/ethernet/stmicro/stmmac/stmmac_platform.c | 57 ++++++++++++- include/linux/stmmac.h | 11 +++ 9 files changed, 288 insertions(+), 3 deletions(-) create mode 100644 drivers/net/ethernet/stmicro/stmmac/dwmac5_tsn.c create mode 100644 drivers/net/ethernet/stmicro/stmmac/dwmac5_tsn.h
Signature · 1 line
1.9.1
PATCH 1/2 net: stmmac: Add support for DWMAC5 with TSN features
This adds support for IP version 5 of DWMAC. The new introduced features are the Enhancements to Scheduled Traffic (EST) as defined by IEEE802.1Qbv-2015 and Frame Preemption (FPE) as defined by IEEE802.1Qbu.
In order to not break previous setups all the necessary configuration is only performed when GMAC5 is detected and only when all the necessary parameters are available in the Device Tree.
EST:
The IEEE802.1Qbv-2015 defines the schedule for each of the queues which makes the IP aware of traffic arrival time. This information can be used to block the lower priority traffic from transmission in this time window/slot.
FPE:
The IEEE802.1Qbu defines a mechanism which breaks interfering frames into smaller fragments shuch that we have a more efficient use of network bandwidth. This needs EST enabled.
--- drivers/net/ethernet/stmicro/stmmac/Makefile | 2 +- drivers/net/ethernet/stmicro/stmmac/common.h | 4 + drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | 37 +++++++- drivers/net/ethernet/stmicro/stmmac/dwmac5_tsn.c | 99 ++++++++++++++++++++++ drivers/net/ethernet/stmicro/stmmac/dwmac5_tsn.h | 57 +++++++++++++ drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 + .../net/ethernet/stmicro/stmmac/stmmac_platform.c | 57 ++++++++++++- include/linux/stmmac.h | 11 +++ 8 files changed, 268 insertions(+), 3 deletions(-) create mode 100644 drivers/net/ethernet/stmicro/stmmac/dwmac5_tsn.c create mode 100644 drivers/net/ethernet/stmicro/stmmac/dwmac5_tsn.h
drivers/net/ethernet/stmicro/stmmac/Makefile +1 -1
@@ -3,7 +3,7 @@ stmmac-objs:= stmmac_main.o stmmac_ethtool.o stmmac_mdio.o ring_mode.o \ chain_mode.o dwmac_lib.o dwmac1000_core.o dwmac1000_dma.o \ dwmac100_core.o dwmac100_dma.o enh_desc.o norm_desc.o \ mmc_core.o stmmac_hwtstamp.o stmmac_ptp.o dwmac4_descs.o \ - dwmac4_dma.o dwmac4_lib.o dwmac4_core.o $(stmmac-y) + dwmac4_dma.o dwmac4_lib.o dwmac4_core.o dwmac5_tsn.o $(stmmac-y) # Ordering matters. Generic driver must be last. obj-$(CONFIG_STMMAC_PLATFORM) += stmmac-platform.o
drivers/net/ethernet/stmicro/stmmac/common.h +4 -0
@@ -38,6 +38,7 @@#define DWMAC_CORE_3_40 0x34#define DWMAC_CORE_3_50 0x35#define DWMAC_CORE_4_00 0x40 +#define DWMAC_CORE_5_00 0x50#define STMMAC_CHAN0 0/* Always supported and default for all chips */ /* These need to be power of two, and >= 4 */
@@ -501,6 +502,9 @@ struct stmmac_ops {void (*config_cbs)(struct mac_device_info *hw,u32 send_slope,u32 idle_slope,u32 high_credit,u32 low_credit,u32 queue); +/* Configure TSN features */ +void (*config_tsn)(struct mac_device_info *hw, +struct plat_stmmacenet_data *plat);/* Dump MAC registers */ void (*dump_regs)(struct mac_device_info *hw,u32 *reg_space);/* Handle extra events on specific interrupts hw dependent */
drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c +36 -1
@@ -19,6 +19,7 @@#include <linux/io.h> #include "stmmac_pcs.h" #include "dwmac4.h" +#include "dwmac5_tsn.h" static void dwmac4_core_init (struct mac_device_info *hw,int mtu) {
@@ -738,6 +739,38 @@ static void dwmac4_debug(void __iomem *ioaddr, struct stmmac_extra_stats *x, .set_filter = dwmac4_set_filter, }; +static const struct stmmac_ops dwmac5_ops = { + .core_init = dwmac4_core_init, + .set_mac = stmmac_dwmac4_set_mac, + .rx_ipc = dwmac4_rx_ipc_enable, + .rx_queue_enable = dwmac4_rx_queue_enable, + .rx_queue_prio = dwmac4_rx_queue_priority, + .tx_queue_prio = dwmac4_tx_queue_priority, + .rx_queue_routing = dwmac4_tx_queue_routing, + .prog_mtl_rx_algorithms = dwmac4_prog_mtl_rx_algorithms, + .prog_mtl_tx_algorithms = dwmac4_prog_mtl_tx_algorithms, + .set_mtl_tx_queue_weight = dwmac4_set_mtl_tx_queue_weight, + .map_mtl_to_dma = dwmac4_map_mtl_dma, + .config_cbs = dwmac4_config_cbs, + .config_tsn = dwmac5_config_tsn, + .dump_regs = dwmac4_dump_regs, + .host_irq_status = dwmac4_irq_status, + .host_mtl_irq_status = dwmac4_irq_mtl_status, + .flow_ctrl = dwmac4_flow_ctrl, + .pmt = dwmac4_pmt, + .set_umac_addr = dwmac4_set_umac_addr, + .get_umac_addr = dwmac4_get_umac_addr, + .set_eee_mode = dwmac4_set_eee_mode, + .reset_eee_mode = dwmac4_reset_eee_mode, + .set_eee_timer = dwmac4_set_eee_timer, + .set_eee_pls = dwmac4_set_eee_pls, + .pcs_ctrl_ane = dwmac4_ctrl_ane, + .pcs_rane = dwmac4_rane, + .pcs_get_adv_lp = dwmac4_get_adv_lp, + .debug = dwmac4_debug, + .set_filter = dwmac4_set_filter, +}; +struct mac_device_info *dwmac4_setup (void __iomem *ioaddr,int mcbins,int perfect_uc_entries,int *synopsys_id) {
@@ -778,7 +811,9 @@ struct mac_device_info *dwmac4_setup(void __iomem *ioaddr, int mcbins,else mac->dma = &dwmac4_dma_ops; -if (*synopsys_id >=DWMAC_CORE_4_00 ) +if (*synopsys_id >=DWMAC_CORE_5_00 ) + mac->mac = &dwmac5_ops; +else if (*synopsys_id >=DWMAC_CORE_4_00 ) mac->mac = &dwmac410_ops;else mac->mac = &dwmac4_ops;
drivers/net/ethernet/stmicro/stmmac/dwmac5_tsn.c new file +99 -0
99 lines not on this page · raw message
drivers/net/ethernet/stmicro/stmmac/dwmac5_tsn.h new file +57 -0
57 lines not on this page · raw message
drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +4 -0
@@ -2418,6 +2418,10 @@ static void stmmac_mtl_configuration(struct stmmac_priv *priv)if (tx_queues_count >1 && priv->hw->mac->config_cbs)stmmac_configure_cbs (priv); +/* Configure TSN features */ +if (tx_queues_count >1 && priv->hw->mac->config_tsn) + priv->hw->mac->config_tsn (priv->hw, priv->plat); +/* Map RX MTL to DMA channels */ if (priv->hw->mac->map_mtl_to_dma)stmmac_rx_queue_dma_chan_map (priv);
drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c +56 -1
75 lines not on this page · raw message
include/linux/stmmac.h +11 -0
@@ -144,6 +144,14 @@ struct stmmac_txq_cfg {u32 prio; }; +struct stmmac_est_cfg { +u32 btr[2 ]; +u32 ctr[2 ]; +u32 ter; +u32 llr; +u32 *gcl; +}; +struct plat_stmmacenet_data {int bus_id;int phy_addr;
@@ -190,5 +198,8 @@ struct plat_stmmacenet_data {bool tso_en;int mac_port_sel_speed;bool en_tx_lpi_clockgating; +bool est_en; +struct stmmac_est_cfg est_cfg; + bool fp_en; };#endif
Signature · 7 lines
1.9.1 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH 2/2 bindings: net: stmmac: Add documentation for TSN parameters
In reply to Jose AbreuThis adds the documentation for TSN feature EST and FP.
--- Documentation/devicetree/bindings/net/stmmac.txt | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)
Documentation/devicetree/bindings/net/stmmac.txt +20 -0
@@ -114,6 +114,16 @@ Optional properties: - snps,high_credit: max write outstanding req. limit - snps,low_credit: max read outstanding req. limit - snps,priority: TX queue priority (Range: 0x0 to 0xF) +- TSN parameters: below the list of all the parameters to configure TSN + features (only applicable for IP version >= 5.00) + - snps,est: Enable EST algorithm + - If EST enabled provide these parameters: + - snps,btr: Array size of 2 with BTR value for EST algorithm + - snps,ctr: Array size of 2 with CTR value for EST algorithm + - snps,ter: TER value for EST algorithm + - snps,gcl: Variable size array with GCL table entries. + - snps,fp: Enable FP feature. This needs EST enabled. + Examples: stmmac_axi_setup: stmmac-axi-config {
@@ -151,6 +161,15 @@ Examples: }; }; + tsn_setup: tsn-config { + snps,est; + snps,btr = <0x00000000 0x00000001>; + snps,ctr = <0x00000000 0x10000000>; + snps,ter = <0x00000000>; + snps,gcl = <0x00000001 0x00000002 0x00000003>; + snps,fp; + }; + gmac0: ethernet@e0800000 { compatible = "st,spear600-gmac"; reg = <0xe0800000 0x8000>;
@@ -176,4 +195,5 @@ Examples: }; snps,mtl-rx-config = <&mtl_rx_setup>; snps,mtl-tx-config = <&mtl_tx_setup>; + snps,tsn-config = <&tsn_setup>; };
Signature · 1 line
1.9.1
Re: [PATCH net-next 2/2] bindings: net: stmmac: Add documentation for TSN parameters
Quoted 19 lines · Jose Abreu
This adds the documentation for TSN feature EST and FP.
Cc David S. Miller <davem-fT/PcQaiUtIeIZ0/[email protected]>Cc Joao Pinto <jpinto-HKixBCOQz3hWk0Htik3J/[email protected]>Cc Giuseppe Cavallaro <[email protected]>Cc Alexandre Torgue <[email protected]>Cc Rob Herring <[email protected]>--- Documentation/devicetree/bindings/net/stmmac.txt | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)Documentation/devicetree/bindings/net/stmmac.txt +0
-0@@ -114,6 +114,16 @@ Optional properties: - snps,high_credit: max write outstanding req. limit - snps,low_credit: max read outstanding req. limit
Documentation/devicetree/bindings/net/stmmac.txt Optional properties: · line 125
Quoted 10 lines
Documentation/devicetree/bindings/net/stmmac.txt +9
-0- snps,priority: TX queue priority (Range: 0x0 to 0xF) +- TSN parameters: below the list of all the parameters to configure TSN + features (only applicable for IP version >= 5.00) + - snps,est: Enable EST algorithm + - If EST enabled provide these parameters: + - snps,btr: Array size of 2 with BTR value for EST algorithm + - snps,ctr: Array size of 2 with CTR value for EST algorithm + - snps,ter: TER value for EST algorithm + - snps,gcl: Variable size array with GCL table entries. + - snps,fp: Enable FP feature. This needs EST enabled.
You are using Device Tree as a configuration interface, that does not sound right at all.
Quoted 21 lines
Documentation/devicetree/bindings/net/stmmac.txt +10
-0+ Examples: stmmac_axi_setup: stmmac-axi-config {@@ -151,6 +161,15 @@ Examples: }; }; + tsn_setup: tsn-config { + snps,est; + snps,btr = <0x00000000 0x00000001>; + snps,ctr = <0x00000000 0x10000000>; + snps,ter = <0x00000000>; + snps,gcl = <0x00000001 0x00000002 0x00000003>; + snps,fp; + }; + gmac0: ethernet@e0800000 { compatible = "st,spear600-gmac"; reg = <0xe0800000 0x8000>;
Documentation/devicetree/bindings/net/stmmac.txt Examples: · line 198
Quoted 4 lines
Documentation/devicetree/bindings/net/stmmac.txt +1
-0@@ -176,4 +195,5 @@ Examples: }; snps,mtl-rx-config = <&mtl_rx_setup>; snps,mtl-tx-config = <&mtl_tx_setup>; + snps,tsn-config = <&tsn_setup>;
Yes, this is definitively using Device Tree as a configuration interface, don't do that please.
Signature · 5 lines
Florian -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH net-next 2/2] bindings: net: stmmac: Add documentation for TSN parameters
Hi Florian,
Quoted 52 lines · Florian Fainelli
Quoted 19 lines · Jose Abreu
This adds the documentation for TSN feature EST and FP.
Cc David S. Miller <davem-fT/PcQaiUtIeIZ0/[email protected]>Cc Joao Pinto <jpinto-HKixBCOQz3hWk0Htik3J/[email protected]>Cc Giuseppe Cavallaro <[email protected]>Cc Alexandre Torgue <[email protected]>Cc Rob Herring <[email protected]>--- Documentation/devicetree/bindings/net/stmmac.txt | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+)Documentation/devicetree/bindings/net/stmmac.txt +0
-0@@ -114,6 +114,16 @@ Optional properties: - snps,high_credit: max write outstanding req. limit - snps,low_credit: max read outstanding req. limitDocumentation/devicetree/bindings/net/stmmac.txt Optional properties: · line 125
Quoted 10 lines
Documentation/devicetree/bindings/net/stmmac.txt +9
-0- snps,priority: TX queue priority (Range: 0x0 to 0xF) +- TSN parameters: below the list of all the parameters to configure TSN + features (only applicable for IP version >= 5.00) + - snps,est: Enable EST algorithm + - If EST enabled provide these parameters: + - snps,btr: Array size of 2 with BTR value for EST algorithm + - snps,ctr: Array size of 2 with CTR value for EST algorithm + - snps,ter: TER value for EST algorithm + - snps,gcl: Variable size array with GCL table entries. + - snps,fp: Enable FP feature. This needs EST enabled.You are using Device Tree as a configuration interface, that does not sound right at all.
Quoted 19 lines
Documentation/devicetree/bindings/net/stmmac.txt +10
-0+ Examples: stmmac_axi_setup: stmmac-axi-config {@@ -151,6 +161,15 @@ Examples: }; }; + tsn_setup: tsn-config { + snps,est; + snps,btr = <0x00000000 0x00000001>; + snps,ctr = <0x00000000 0x10000000>; + snps,ter = <0x00000000>; + snps,gcl = <0x00000001 0x00000002 0x00000003>; + snps,fp; + }; + gmac0: ethernet@e0800000 { compatible = "st,spear600-gmac";
Quoted 8 lines
Documentation/devicetree/bindings/net/stmmac.txt Examples: · line 198
Quoted 6 lines
Documentation/devicetree/bindings/net/stmmac.txt +1
-0reg = <0xe0800000 0x8000>;@@ -176,4 +195,5 @@ Examples: }; snps,mtl-rx-config = <&mtl_rx_setup>; snps,mtl-tx-config = <&mtl_tx_setup>; + snps,tsn-config = <&tsn_setup>;Yes, this is definitively using Device Tree as a configuration interface, don't do that please.
I understand your concern here and I know DT bindings should only describe the HW but note that this is already done in mtl-rx-config and mtl-tx-config.
These parameters may also need to change in runtime depending on the scheduled traffic. Unfortunately, net subsystem does not yet support TSN so this will have to wait and for now we will use fixed parameters.
Anyway, what do you suggest here instead? Platform data?
Best regards,
Jose Miguel Abreu
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH net-next 2/2] bindings: net: stmmac: Add documentation for TSN parameters
Quoted 4 lines
These parameters may also need to change in runtime depending on the scheduled traffic. Unfortunately, net subsystem does not yet support TSN so this will have to wait and for now we will use fixed parameters.
Hi Jose
what you should do is help Linux get support for TSN. Please take part in this discussion:
https://patchwork.ozlabs.org/cover/808504/
Test the RFC, make sure the concepts will work for your hardware. Make you hardware work with these RFC patches. Help drive TSN forward. Once the core TSN code lands, then you can post patches for your driver.
Andrew
Re: [PATCH net-next 2/2] bindings: net: stmmac: Add documentation for TSN parameters
Hi Andrew,
Quoted 10 lines · Andrew Lunn
Quoted 4 lines
These parameters may also need to change in runtime depending on the scheduled traffic. Unfortunately, net subsystem does not yet support TSN so this will have to wait and for now we will use fixed parameters.
Hi Jose
what you should do is help Linux get support for TSN. Please take part in this discussion:
Seems like I don't have this thread saved here. Can you please add me in the thread?
Thanks and best regards,
Jose Miguel Abreu
Quoted 6 lines
Test the RFC, make sure the concepts will work for your hardware. Make you hardware work with these RFC patches. Help drive TSN forward. Once the core TSN code lands, then you can post patches for your driver.
Andrew
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH net-next 2/2] bindings: net: stmmac: Add documentation for TSN parameters
In reply to Andrew LunnHi Andrew,
Quoted 6 lines · Andrew Lunn
Quoted 4 lines
These parameters may also need to change in runtime depending on the scheduled traffic. Unfortunately, net subsystem does not yet support TSN so this will have to wait and for now we will use fixed parameters.
Hi Jose
Quoted 8 lines
what you should do is help Linux get support for TSN. Please take part in this discussion:
Test the RFC, make sure the concepts will work for your hardware. Make you hardware work with these RFC patches. Help drive TSN forward. Once the core TSN code lands, then you can post patches for your driver.
After reading more carefully the RFC I noticed that for now it only supports CBS. CBS is already supported by stmmac since:
"net: stmmac: configuration of CBS in case of a TX AVB queue" [1]. My main objective now is to add support for EST and FP features in stmmac.
As I am a recent contributor to net subsytem I am afraid my expertise won't be of much value for now as far as the RFC goes.
About my patches, what I think would be better now would be to drop the configuration by DT and integrate the remaining configuration, letting the EST parameters be populated by SoC specific wrappers. I will then integrate this with the RFC patches once they get in and I also intend to contribute with the discussion once a new version is sent.
I need also to say that this was fully tested and its working as expected so, there is no real setback in integrating this now and it will save us time in the future because then we will only need to implement the callbacks.
Best regards,
Jose Miguel Abreu
Quoted 2 lines
Andrew
Re: [PATCH net-next 2/2] bindings: net: stmmac: Add documentation for TSN parameters
Hi Jose,
Quoted 18 lines · Jose Abreu
Hi Andrew,
Quoted 6 lines · Andrew Lunn
Quoted 4 lines
These parameters may also need to change in runtime depending on the scheduled traffic. Unfortunately, net subsystem does not yet support TSN so this will have to wait and for now we will use fixed parameters.
Hi Jose
Quoted 8 lines
what you should do is help Linux get support for TSN. Please take part in this discussion:
Test the RFC, make sure the concepts will work for your hardware. Make you hardware work with these RFC patches. Help drive TSN forward. Once the core TSN code lands, then you can post patches for your driver.
Quoted 9 lines
After reading more carefully the RFC I noticed that for now it only supports CBS. CBS is already supported by stmmac since:
"net: stmmac: configuration of CBS in case of a TX AVB queue" [1]. My main objective now is to add support for EST and FP features in stmmac.As I am a recent contributor to net subsystem I am afraid my expertise won't be of much value for now as far as the RFC goes.
Please note that our RFC covered more than CBS. We've only provided patches for the cbs qdisc so far, but we've shared ideas of another qdisc we've designed and prototyped for EST and FP: taprio. It was a quite extensive thread, so I recommend reading it all so you can have a better picture of how the ideas were received back then [1].
In addition to our RFC, there is also the related discussion about SO_TXTIME proposed by Richard Cochran [2], which I believe might also be of interest to you.
Quoted 7 lines
About my patches, what I think would be better now would be to drop the configuration by DT and integrate the remaining configuration, letting the EST parameters be populated by SoC specific wrappers. I will then integrate this with the RFC patches once they get in and I also intend to contribute with the discussion once a new version is sent.
The CBS qdisc patchset is ready to be merged, and based on previous feedback should go in anytime now.
Quoted 5 lines
I need also to say that this was fully tested and its working as expected so, there is no real setback in integrating this now and it will save us time in the future because then we will only need to implement the callbacks.
Which is great, sure. I believe the point others are making here is just that there have been some discussions recently that you should take part of. The goal is getting the *standard* interfaces into the kernel so we can then provide device driver implementations through them.
Thanks,
Jesus
[1] https://www.mail-archive.com/[email protected]/msg186431.html
[2] https://www.mail-archive.com/[email protected]/msg188385.html
Quoted 10 lines
Best regards,
Jose Miguel AbreuQuoted 2 lines
Andrew
Re: [PATCH net-next 2/2] bindings: net: stmmac: Add documentation for TSN parameters
Hi Jesus,
Quoted 37 lines · Jesus Sanchez-Palencia
Hi Jose,
Quoted 17 lines · Jose Abreu
Hi Andrew,
Quoted 6 lines · Andrew Lunn
Quoted 4 lines
These parameters may also need to change in runtime depending on the scheduled traffic. Unfortunately, net subsystem does not yet support TSN so this will have to wait and for now we will use fixed parameters.
Hi Jose
Quoted 8 lines
what you should do is help Linux get support for TSN. Please take part in this discussion:
Test the RFC, make sure the concepts will work for your hardware. Make you hardware work with these RFC patches. Help drive TSN forward. Once the core TSN code lands, then you can post patches for your driver.
Quoted 9 lines
After reading more carefully the RFC I noticed that for now it only supports CBS. CBS is already supported by stmmac since:
"net: stmmac: configuration of CBS in case of a TX AVB queue" [1]. My main objective now is to add support for EST and FP features in stmmac.As I am a recent contributor to net subsystem I am afraid my expertise won't be of much value for now as far as the RFC goes.
Please note that our RFC covered more than CBS. We've only provided patches for the cbs qdisc so far, but we've shared ideas of another qdisc we've designed and prototyped for EST and FP: taprio. It was a quite extensive thread, so I recommend reading it all so you can have a better picture of how the ideas were received back then [1].
Quoted 3 lines
In addition to our RFC, there is also the related discussion about
SO_TXTIMEproposed by Richard Cochran [2], which I believe might also be of interest to you.
Thanks for this info! I guess I have a lot to read this weekend :)
Quoted 11 lines
Quoted 8 lines
About my patches, what I think would be better now would be to drop the configuration by DT and integrate the remaining configuration, letting the EST parameters be populated by SoC specific wrappers. I will then integrate this with the RFC patches once they get in and I also intend to contribute with the discussion once a new version is sent.
The CBS qdisc patchset is ready to be merged, and based on previous feedback should go in anytime now.
Nice! I will start studying the integration of this in stmmac.
Quoted 7 lines
Quoted 6 lines
I need also to say that this was fully tested and its working as expected so, there is no real setback in integrating this now and it will save us time in the future because then we will only need to implement the callbacks.
Quoted 5 lines
Which is great, sure. I believe the point others are making here is just that there have been some discussions recently that you should take part of. The goal is getting the *standard* interfaces into the kernel so we can then provide device driver implementations through them.
And we are all in favor about making this a standard interface. I was just mentioning that my expertise in the net subsystem is very low but I will review the threads. If you could add me in cc for the relevant threads it would be nice because I don't have them saved here.
Thanks and Best Regards,
Jose Miguel Abreu
Quoted 15 lines
Thanks,
Jesus[1] https://urldefense.proofpoint.com/v2/url?u=https-3A__www.mail-2Darchive.com_netdev-40vger.kernel.org_msg186431.html&d=DwIC-g&c=DPL6_X_6JkXFx7AXWqB0tg&r=WHDsc6kcWAl4i96Vm5hJ_19IJiuxx_p_Rzo2g-uHDKw&m=9feTUzfFG49lrNpaBinz8J4S1cKj1qEZur1JlzfQdWU&s=zjR6UPefwbqwHVbaTrepj_ZQnxBMGKDlTq4obkLlfkk&e=
[2] https://urldefense.proofpoint.com/v2/url?u=https-3A__www.mail-2Darchive.com_netdev-40vger.kernel.org_msg188385.html&d=DwIC-g&c=DPL6_X_6JkXFx7AXWqB0tg&r=WHDsc6kcWAl4i96Vm5hJ_19IJiuxx_p_Rzo2g-uHDKw&m=9feTUzfFG49lrNpaBinz8J4S1cKj1qEZur1JlzfQdWU&s=6aZXBf8OndxVnh1cl3UvvfDqWp1Xa6ql_cCVB3xAQa8&e=Quoted 7 lines
Best regards,
Jose Miguel AbreuQuoted 1 line
Andrew
Re: [PATCH net-next 2/2] bindings: net: stmmac: Add documentation for TSN parameters
In reply to Jose AbreuQuoted 4 lines
About my patches, what I think would be better now would be to drop the configuration by DT and integrate the remaining configuration, letting the EST parameters be populated by SoC specific wrappers.
Hi Jose
The problem with SoC specific wrappers is that you are going to have to remove them once the real interface is defined. Anybody who uses your SoC specific wrappers is going to have to re-write their code, when it all gets ripped out.
You generally don't add device SoC specific wrappers. Imagine if everybody did that. Lots of different ways of doing the same thing. My suggesting is to keep your patches out for the moment, waiting for generic support to be added.
Andrew
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH net-next 2/2] bindings: net: stmmac: Add documentation for TSN parameters
Hi Andrew,
Quoted 10 lines · Andrew Lunn
Quoted 4 lines
About my patches, what I think would be better now would be to drop the configuration by DT and integrate the remaining configuration, letting the EST parameters be populated by SoC specific wrappers.
Hi Jose
The problem with SoC specific wrappers is that you are going to have to remove them once the real interface is defined. Anybody who uses your SoC specific wrappers is going to have to re-write their code, when it all gets ripped out.
Yeah, I agree. But what about just merge the implementation and then construct the interface? I mean just creating the internal parameters in stmmac and then the configuration functions.
Quoted 5 lines
You generally don't add device SoC specific wrappers. Imagine if everybody did that. Lots of different ways of doing the same thing. My suggesting is to keep your patches out for the moment, waiting for generic support to be added.
I think we should take advantage of the fact that this is working and ready to be merged. Its just HW configuration but maybe it can serve as momentum for other drivers to also integrate this?
Best Regards,
Jose Miguel Abreu
Quoted 2 lines
Andrew
Re: [PATCH net-next 2/2] bindings: net: stmmac: Add documentation for TSN parameters
Hello
Quoted 3 lines · Jose Abreu
I think we should take advantage of the fact that this is working and ready to be merged. Its just HW configuration but maybe it can serve as momentum for other drivers to also integrate this?
Let me propose to have it now in the next-next.
This support is for dwmac 5.x so no disturb for the common driver APIs and there is no risk to have regressions, IMO.
IIUC, you already tested it on a real environment that sounds to be very good progress.
Regards
Peppe
Quoted 2 lines
Best Regards,
Jose Miguel Abreu
Re: [PATCH net-next 2/2] bindings: net: stmmac: Add documentation for TSN parameters
Hi Peppe,
Quoted 7 lines · Giuseppe CAVALLARO
Hello
Quoted 3 lines · Jose Abreu
I think we should take advantage of the fact that this is working and ready to be merged. Its just HW configuration but maybe it can serve as momentum for other drivers to also integrate this?
Quoted 7 lines
Let me propose to have it now in the next-next.
This support is for dwmac 5.x so no disturb for the common driver APIs and there is no risk to have regressions, IMO.
IIUC, you already tested it on a real environment that sounds to be very good progress.
Ok, I will drop this documentation patch and the DT parsing and send a new version.
Best Regards,
Jose Miguel Abreu
Quoted 8 lines
Regards
PeppeQuoted 2 lines
Best Regards,
Jose Miguel Abreu
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH net-next 2/2] bindings: net: stmmac: Add documentation for TSN parameters
Quoted 2 lines · Jose Abreu
Ok, I will drop this documentation patch and the DT parsing and send a new version.
Please put me and the other interested parties (see the TSN threads on LKML) onto CC.
Thanks,
Richard
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Jose,
Quoted 4 lines · Jose Abreu
Hi,
This adds support for a new IP version (5) of dwmac and for TSN features as defined by IEEE802.1Qbv-2015 and IEEE802.1Qbu.
Just out of curiosity, are you aware of any NICs that are publicly available which use this IP version?
Thanks,
Jesus
Quoted 23 lines
Please review.
Best regards,
Jose Miguel AbreuJose Abreu (2):
net: stmmac: Add support for DWMAC5 with TSN features
bindings: net: stmmac: Add documentation for TSN parametersDocumentation/devicetree/bindings/net/stmmac.txt | 20 +++++ drivers/net/ethernet/stmicro/stmmac/Makefile | 2 +- drivers/net/ethernet/stmicro/stmmac/common.h | 4 + drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | 37 +++++++- drivers/net/ethernet/stmicro/stmmac/dwmac5_tsn.c | 99 ++++++++++++++++++++++ drivers/net/ethernet/stmicro/stmmac/dwmac5_tsn.h | 57 +++++++++++++ drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 + .../net/ethernet/stmicro/stmmac/stmmac_platform.c | 57 ++++++++++++- include/linux/stmmac.h | 11 +++ 9 files changed, 288 insertions(+), 3 deletions(-) create mode 100644 drivers/net/ethernet/stmicro/stmmac/dwmac5_tsn.c create mode 100644 drivers/net/ethernet/stmicro/stmmac/dwmac5_tsn.h
Hi Jesus,
Quoted 11 lines · Jesus Sanchez-Palencia
Hi Jose,
Quoted 4 lines · Jose Abreu
Hi,
This adds support for a new IP version (5) of dwmac and for TSN features as defined by IEEE802.1Qbv-2015 and IEEE802.1Qbu.
Just out of curiosity, are you aware of any NICs that are publicly available which use this IP version?
The IP was just released and these are fresh new features, you can find more info here [1]. We expect manufacturers to start adopting this IP release soon.
Best Regards,
Jose Miguel Abreu
[1] https://www.synopsys.com/dw/ipdir.php?ds=dwc_ether_qos
Quoted 27 lines
Thanks,
JesusQuoted 22 lines
Please review.
Best regards,
Jose Miguel AbreuJose Abreu (2):
net: stmmac: Add support for DWMAC5 with TSN features
bindings: net: stmmac: Add documentation for TSN parametersDocumentation/devicetree/bindings/net/stmmac.txt | 20 +++++ drivers/net/ethernet/stmicro/stmmac/Makefile | 2 +- drivers/net/ethernet/stmicro/stmmac/common.h | 4 + drivers/net/ethernet/stmicro/stmmac/dwmac4_core.c | 37 +++++++- drivers/net/ethernet/stmicro/stmmac/dwmac5_tsn.c | 99 ++++++++++++++++++++++ drivers/net/ethernet/stmicro/stmmac/dwmac5_tsn.h | 57 +++++++++++++ drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 + .../net/ethernet/stmicro/stmmac/stmmac_platform.c | 57 ++++++++++++- include/linux/stmmac.h | 11 +++ 9 files changed, 288 insertions(+), 3 deletions(-) create mode 100644 drivers/net/ethernet/stmicro/stmmac/dwmac5_tsn.c create mode 100644 drivers/net/ethernet/stmicro/stmmac/dwmac5_tsn.h