RE: linux-next: manual merge of the net-next tree with the net tree

2021-04-15 Thread Ong, Boon Leong
>Hi all, > >Today's linux-next merge of the net-next tree got a conflict in: > > drivers/net/ethernet/stmicro/stmmac/stmmac_main.c > >between commit: > > 00423969d806 ("Revert "net: stmmac: re-init rx buffers when mac resume >back"") > >from the net tree and commits: > > bba2556efad6 ("net: stmm

[PATCH net-next v2 7/7] net: stmmac: Add TX via XDP zero-copy socket

2021-04-13 Thread Ong Boon Leong
erations, then during XSK RX and TX pool tear-down, the driver reenables the exisiting independent NAPI poll functions accordingly: stmmac_napi_poll_rx() and stmmac_napi_poll_tx(). Signed-off-by: Ong Boon Leong --- drivers/net/ethernet/stmicro/stmmac/stmmac.h | 6 + .../net/ethernet/stmicro/st

[PATCH net-next v2 6/7] net: stmmac: Enable RX via AF_XDP zero-copy

2021-04-13 Thread Ong Boon Leong
to use it. Move synchronize_rcu() into stmmac_disable_all_queues() that eventually calls __stmmac_disable_all_queues(). Then, make both stmmac_release() and stmmac_suspend() to use stmmac_disable_all_queues(). Thanks David Miller for spotting the synchronize_rcu() issue in v1 patch. Signed-

[PATCH net-next v2 1/7] net: stmmac: rearrange RX buffer allocation and free functions

2021-04-13 Thread Ong Boon Leong
method earlier. The replacement is needed to make the RX buffer alloc and free method scalable to XDP ZC xsk_pool alloc and free later. Signed-off-by: Ong Boon Leong --- .../net/ethernet/stmicro/stmmac/stmmac_main.c | 84 +++ 1 file changed, 47 insertions(+), 37 deletions(-) diff

[PATCH net-next v2 4/7] net: stmmac: rearrange RX and TX desc init into per-queue basis

2021-04-13 Thread Ong Boon Leong
: init_dma_rx_desc_rings(struct net_device *dev, gfp_t flags) init_dma_tx_desc_rings(struct net_device *dev) Signed-off-by: Ong Boon Leong --- .../net/ethernet/stmicro/stmmac/stmmac_main.c | 180 ++ 1 file changed, 100 insertions(+), 80 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac

[PATCH net-next v2 5/7] net: stmmac: Refactor __stmmac_xdp_run_prog for XDP ZC

2021-04-13 Thread Ong Boon Leong
regular XDP Rx path which requires bpf_prog to be verified. Signed-off-by: Ong Boon Leong --- .../net/ethernet/stmicro/stmmac/stmmac_main.c | 35 --- 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net

[PATCH net-next v2 3/7] net: stmmac: refactor stmmac_init_rx_buffers for stmmac_reinit_rx_buffers

2021-04-13 Thread Ong Boon Leong
The per-queue RX buffer allocation in stmmac_reinit_rx_buffers() can be made to use stmmac_alloc_rx_buffers() by merging the page_pool alloc checks for "buf->page" and "buf->sec_page" in stmmac_init_rx_buffers(). This is in preparation for XSK pool allocation later. Sig

[PATCH net-next v2 2/7] net: stmmac: introduce dma_recycle_rx_skbufs for stmmac_reinit_rx_buffers

2021-04-13 Thread Ong Boon Leong
Rearrange RX buffer page_pool recycling logics into dma_recycle_rx_skbufs, so that we prepare stmmac_reinit_rx_buffers() for XSK pool expansion. Signed-off-by: Ong Boon Leong --- .../net/ethernet/stmicro/stmmac/stmmac_main.c | 44 --- 1 file changed, 27 insertions(+), 17

[PATCH net-next v2 0/7] stmmac: add XDP ZC support

2021-04-13 Thread Ong Boon Leong
on Leong History of patch series as follow:- v1: https://patchwork.kernel.org/project/netdevbpf/list/?series=465747&state=* -------- Ong Boon Leong (7): net: stmmac: rearrange RX buffer allocation and fr

RE: [PATCH net-next 6/7] net: stmmac: Enable RX via AF_XDP zero-copy

2021-04-13 Thread Ong, Boon Leong
>+ /* synchronize_rcu() needed for pending XDP buffers to drain */ >+ for (queue = 0; queue < rx_queues_cnt; queue++) { >+ rx_q = &priv->rx_queue[queue]; >+ if (rx_q->xsk_pool) { >+ synchronize_rcu(); > >Are you sure this is safe here, especi

[PATCH net-next 6/7] net: stmmac: Enable RX via AF_XDP zero-copy

2021-04-12 Thread Ong Boon Leong
t_skb_zc() and sent to Linux network GRO inside stmmac_dispatch_skb_zc(). Free RX buffers are then replenished using stmmac_rx_refill_zc() Signed-off-by: Ong Boon Leong --- drivers/net/ethernet/stmicro/stmmac/stmmac.h | 18 +- .../net/ethernet/stmicro/stmmac/stmmac_main.c | 580 +++

[PATCH net-next 4/7] net: stmmac: rearrange RX and TX desc init into per-queue basis

2021-04-12 Thread Ong Boon Leong
: init_dma_rx_desc_rings(struct net_device *dev, gfp_t flags) init_dma_tx_desc_rings(struct net_device *dev) Signed-off-by: Ong Boon Leong --- .../net/ethernet/stmicro/stmmac/stmmac_main.c | 180 ++ 1 file changed, 100 insertions(+), 80 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac

[PATCH net-next 7/7] net: stmmac: Add TX via XDP zero-copy socket

2021-04-12 Thread Ong Boon Leong
erations, then during XSK RX and TX pool tear-down, the driver reenables the exisiting independent NAPI poll functions accordingly: stmmac_napi_poll_rx() and stmmac_napi_poll_tx(). Signed-off-by: Ong Boon Leong --- drivers/net/ethernet/stmicro/stmmac/stmmac.h | 6 + .../net/ethernet/stmicro/st

[PATCH net-next 0/7] stmmac: add XDP ZC support

2021-04-12 Thread Ong Boon Leong
ve patch series on your respective platform and provide me feedback for any improvement. Thank you very much, Boon Leong Ong Boon Leong (7): net: stmmac: rearrange RX buffer allocation and free functions net: stmmac: introduce dma_recycle_rx_skbufs for stmmac_reinit_rx_buffers net: stmmac:

[PATCH net-next 1/7] net: stmmac: rearrange RX buffer allocation and free functions

2021-04-12 Thread Ong Boon Leong
method earlier. The replacement is needed to make the RX buffer alloc and free method scalable to XDP ZC xsk_pool alloc and free later. Signed-off-by: Ong Boon Leong --- .../net/ethernet/stmicro/stmmac/stmmac_main.c | 84 +++ 1 file changed, 47 insertions(+), 37 deletions(-) diff

[PATCH net-next 2/7] net: stmmac: introduce dma_recycle_rx_skbufs for stmmac_reinit_rx_buffers

2021-04-12 Thread Ong Boon Leong
Rearrange RX buffer page_pool recycling logics into dma_recycle_rx_skbufs, so that we prepare stmmac_reinit_rx_buffers() for XSK pool expansion. Signed-off-by: Ong Boon Leong --- .../net/ethernet/stmicro/stmmac/stmmac_main.c | 44 --- 1 file changed, 27 insertions(+), 17

[PATCH net-next 3/7] net: stmmac: refactor stmmac_init_rx_buffers for stmmac_reinit_rx_buffers

2021-04-12 Thread Ong Boon Leong
The per-queue RX buffer allocation in stmmac_reinit_rx_buffers() can be made to use stmmac_alloc_rx_buffers() by merging the page_pool alloc checks for "buf->page" and "buf->sec_page" in stmmac_init_rx_buffers(). This is in preparation for XSK pool allocation later. Sig

[PATCH net-next 5/7] net: stmmac: Refactor __stmmac_xdp_run_prog for XDP ZC

2021-04-12 Thread Ong Boon Leong
regular XDP Rx path which requires bpf_prog to be verified. Signed-off-by: Ong Boon Leong --- .../net/ethernet/stmicro/stmmac/stmmac_main.c | 35 --- 1 file changed, 23 insertions(+), 12 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net

[PATCH net-next v4 6/6] net: stmmac: Add support for XDP_REDIRECT action

2021-03-31 Thread Ong Boon Leong
x() and combined the XDP verdict of XDP TX and REDIRECT together. v3: Added 'nq->trans_start = jiffies' to avoid TX time-out as we are sharing TX queue between slow path and XDP. Thanks to Jakub Kicinski for point out. Signed-off-by: Ong Boon Leong --- drivers/net/ether

[PATCH net-next v4 5/6] net: stmmac: Add support for XDP_TX action

2021-03-31 Thread Ong Boon Leong
are sharing TX queue between slow path and XDP. Thanks to Jakub Kicinski for pointing out. Signed-off-by: Ong Boon Leong --- drivers/net/ethernet/stmicro/stmmac/stmmac.h | 12 +- .../net/ethernet/stmicro/stmmac/stmmac_main.c | 238 -- 2 files changed, 232 insertions(+), 18

[PATCH net-next v4 4/6] net: stmmac: Add initial XDP support

2021-03-31 Thread Ong Boon Leong
r "warning: variable 'len' set but not used" reported by lkp. Reported-by: kernel test robot Signed-off-by: Ong Boon Leong --- drivers/net/ethernet/stmicro/stmmac/Makefile | 1 + drivers/net/ethernet/stmicro/stmmac/stmmac.h | 21 ++- .../net/ethernet/stmi

[PATCH net-next v4 2/6] net: stmmac: make SPH enable/disable to be configurable

2021-03-31 Thread Ong Boon Leong
stored in "priv->sph_cap" and the enabling/disabling of SPH is decided by "priv->sph". This is to prepare initial XDP enabling for stmmac to disable the use of SPH whenever XDP is enabled. Signed-off-by: Ong Boon Leong --- drivers/net/ethernet/stmicro/stmmac/stmmac.

[PATCH net-next v4 1/6] net: stmmac: set IRQ affinity hint for multi MSI vectors

2021-03-31 Thread Ong Boon Leong
is released. Thanks to issue reported by Song, Yoong Siang. Reported-by: Song, Yoong Siang Signed-off-by: Ong Boon Leong --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/stmicro

[PATCH net-next v4 0/6] stmmac: Add XDP support

2021-03-31 Thread Ong Boon Leong
ommunity can help to test or review the v4 series and provide me any input if any. Thank you very much, Boon Leong Ong Boon Leong (6): net: stmmac: set IRQ affinity hint for multi MSI vectors net: stmmac: make SPH enable/disable to be configurable net: stmmac: arrange Tx ta

RE: [PATCH net-next v3 5/6] net: stmmac: Add support for XDP_TX action

2021-03-31 Thread Ong, Boon Leong
>> +static int stmmac_xdp_xmit_back(struct stmmac_priv *priv, >> +struct xdp_buff *xdp) >> +{ >> +struct xdp_frame *xdpf = xdp_convert_buff_to_frame(xdp); >> +int cpu = smp_processor_id(); >> +struct netdev_queue *nq; >> +int queue; >> +int res; >> +

[PATCH net-next v3 6/6] net: stmmac: Add support for XDP_REDIRECT action

2021-03-31 Thread Ong Boon Leong
time-out as we are sharing TX queue between slow path and XDP. Thanks to Jakub Kicinski for point out. Signed-off-by: Ong Boon Leong --- drivers/net/ethernet/stmicro/stmmac/stmmac.h | 1 + .../net/ethernet/stmicro/stmmac/stmmac_main.c | 98 +-- 2 files changed, 89 ins

[PATCH net-next v3 5/6] net: stmmac: Add support for XDP_TX action

2021-03-31 Thread Ong Boon Leong
sh'. v3: Added 'nq->trans_start = jiffies' to avoid TX time-out as we are sharing TX queue between slow path and XDP. Thanks to Jakub Kicinski for pointing out. Signed-off-by: Ong Boon Leong --- drivers/net/ethernet/stmicro/stmmac/stmmac.h | 12 +- .../net/ethernet/s

[PATCH net-next v3 4/6] net: stmmac: Add initial XDP support

2021-03-31 Thread Ong Boon Leong
r "warning: variable 'len' set but not used" reported by lkp. Reported-by: kernel test robot Signed-off-by: Ong Boon Leong --- drivers/net/ethernet/stmicro/stmmac/Makefile | 1 + drivers/net/ethernet/stmicro/stmmac/stmmac.h | 21 ++- .../net/ethernet/stmi

[PATCH net-next v3 1/6] net: stmmac: set IRQ affinity hint for multi MSI vectors

2021-03-31 Thread Ong Boon Leong
is released. Thanks to issue reported by Song, Yoong Siang. Reported-by: Song, Yoong Siang Signed-off-by: Ong Boon Leong --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/stmicro

[PATCH net-next v3 0/6] stmmac: Add XDP support

2021-03-31 Thread Ong Boon Leong
/patchwork.kernel.org/project/netdevbpf/list/?series=457139 It will be great if community can help to test or review the v3 patch series on your platform and provide me any new feedback if any. Thank you very much. Boon Leong Ong Boon Leong (6): net: stmmac: set IRQ affinity hint for multi MS

[PATCH net-next v3 2/6] net: stmmac: make SPH enable/disable to be configurable

2021-03-31 Thread Ong Boon Leong
stored in "priv->sph_cap" and the enabling/disabling of SPH is decided by "priv->sph". This is to prepare initial XDP enabling for stmmac to disable the use of SPH whenever XDP is enabled. Signed-off-by: Ong Boon Leong --- drivers/net/ethernet/stmicro/stmmac/stmmac.

RE: [PATCH net-next v3 0/6] stmmac: Add XDP support

2021-03-31 Thread Ong, Boon Leong
Pls ignore this. I will resend the real v3. Sorry for glitch on my part. >-Original Message- >From: Ong, Boon Leong >Sent: Wednesday, March 31, 2021 11:36 PM >To: Giuseppe Cavallaro ; Alexandre Torgue >; Jose Abreu ; David S . >Miller ; Jakub Kicinski ; Alexei >

[PATCH net-next v3 0/6] stmmac: Add XDP support

2021-03-31 Thread Ong Boon Leong
/patchwork.kernel.org/project/netdevbpf/list/?series=457139 It will be great if community can help to test or review the v3 patch series on your platform and provide me any new feedback if any. Thank you very much. Boon Leong Ong Boon Leong (6): net: stmmac: set IRQ affinity hint for multi MS

[PATCH net v2 1/1] xdp: fix xdp_return_frame() kernel BUG throw for page_pool memory model

2021-03-31 Thread Ong Boon Leong
the issue by making xdp_return_frame_no_direct() is only called if napi_direct = true, as recommended for better by Jesper Dangaard Brouer. Thanks! Fixes: 2539650fadbf ("xdp: Helpers for disabling napi_direct of xdp_return_frame") Signed-off-by: Ong Boon Leong --- net/core/xdp.c

RE: [PATCH net 1/1] xdp: fix xdp_return_frame() kernel BUG throw for page_pool memory model

2021-03-31 Thread Ong, Boon Leong
>> diff --git a/net/core/xdp.c b/net/core/xdp.c >> index 05354976c1fc..4eaa28972af2 100644 >> --- a/net/core/xdp.c >> +++ b/net/core/xdp.c >> @@ -350,7 +350,8 @@ static void __xdp_return(void *data, struct >xdp_mem_info *mem, bool napi_direct, >> /* mem->id is valid, checked in >xdp_rx

RE: [PATCH net-next v2 0/6] stmmac: Add XDP support

2021-03-30 Thread Ong, Boon Leong
>Are there any (developer) boards available that can be bought online? >(that have HW for this Ethernet driver stmmac) At this point of time, I am not aware of any commercially available platform yet as the EHL product is newly launched but we expect some of board vendors will be start shipping th

[PATCH net-next v2 6/6] net: stmmac: Add support for XDP_REDIRECT action

2021-03-29 Thread Ong Boon Leong
P_REDIRECT + drop testing. It also been tested with "xdp_redirect" sample app which can be used to exercise ndo_xdp_xmit ops. The burst traffics are generated using pktgen_sample03_burst_single_flow.sh in samples/pktgen directory. Signed-off-by: Ong Boon Leong --- drivers/net/ethernet/stm

[PATCH net-next v2 5/6] net: stmmac: Add support for XDP_TX action

2021-03-29 Thread Ong Boon Leong
h'. Signed-off-by: Ong Boon Leong --- drivers/net/ethernet/stmicro/stmmac/stmmac.h | 12 +- .../net/ethernet/stmicro/stmmac/stmmac_main.c | 220 -- 2 files changed, 214 insertions(+), 18 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac.h b/drivers/

[PATCH net-next v2 4/6] net: stmmac: Add initial XDP support

2021-03-29 Thread Ong Boon Leong
r both SKB and Native (XDP) mode. The burst traffic generated using pktgen_sample03_burst_single_flow.sh in samples/pktgen directory. Changes in v2: - fix for "warning: variable 'len' set but not used" reported by lkp. Reported-by: kernel test robot Signed-off-by: Ong Boon Le

[PATCH net-next v2 2/6] net: stmmac: make SPH enable/disable to be configurable

2021-03-29 Thread Ong Boon Leong
stored in "priv->sph_cap" and the enabling/disabling of SPH is decided by "priv->sph". This is to prepare initial XDP enabling for stmmac to disable the use of SPH whenever XDP is enabled. Signed-off-by: Ong Boon Leong --- drivers/net/ethernet/stmicro/stmmac/stmmac.

[PATCH net-next v2 1/6] net: stmmac: set IRQ affinity hint for multi MSI vectors

2021-03-29 Thread Ong Boon Leong
is released. Thanks to issue reported by Song, Yoong Siang. Reported-by: Song, Yoong Siang Signed-off-by: Ong Boon Leong --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 15 +-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/stmicro

[PATCH net-next 6/6] net: stmmac: Add support for XDP_REDIRECT action

2021-03-29 Thread Ong Boon Leong
P_REDIRECT + drop testing. It also been tested with "xdp_redirect" sample app which can be used to exercise ndo_xdp_xmit ops. The burst traffics are generated using pktgen_sample03_burst_single_flow.sh in samples/pktgen directory. Signed-off-by: Ong Boon Leong --- drivers/net/ethernet/stm

[PATCH net-next 5/6] net: stmmac: Add support for XDP_TX action

2021-03-29 Thread Ong Boon Leong
h'. Signed-off-by: Ong Boon Leong --- drivers/net/ethernet/stmicro/stmmac/stmmac.h | 12 +- .../net/ethernet/stmicro/stmmac/stmmac_main.c | 220 -- 2 files changed, 214 insertions(+), 18 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac.h b/drivers/

[PATCH net-next 3/6] net: stmmac: arrange Tx tail pointer update to stmmac_flush_tx_descriptors

2021-03-29 Thread Ong Boon Leong
This patch organizes TX tail pointer update into a new function called stmmac_flush_tx_descriptors() so that we can reuse it in stmmac_xmit(), stmmac_tso_xmit() and up-coming XDP implementation. Signed-off-by: Ong Boon Leong --- .../net/ethernet/stmicro/stmmac/stmmac_main.c | 52

[PATCH net-next 4/6] net: stmmac: Add initial XDP support

2021-03-29 Thread Ong Boon Leong
r both SKB and Native (XDP) mode. The burst traffic generated using pktgen_sample03_burst_single_flow.sh in samples/pktgen directory. Signed-off-by: Ong Boon Leong --- drivers/net/ethernet/stmicro/stmmac/Makefile | 1 + drivers/net/ethernet/stmicro/stmmac/stmmac.h | 21 ++- .../net/ethern

[PATCH net-next 0/6] stmmac: Add XDP support

2021-03-29 Thread Ong Boon Leong
apps is terminated to make sure there is no stalled pool warning prints on the terminal, and I found none which looks good on Intel mGbE platform. It will be great if community help tes out these patch series on your platform and provide me feedback. Thank you very much, Boon Leong Ong Boon L

[PATCH net-next 2/6] net: stmmac: make SPH enable/disable to be configurable

2021-03-29 Thread Ong Boon Leong
stored in "priv->sph_cap" and the enabling/disabling of SPH is decided by "priv->sph". This is to prepare initial XDP enabling for stmmac to disable the use of SPH whenever XDP is enabled. Signed-off-by: Ong Boon Leong --- drivers/net/ethernet/stmicro/stmmac/stmmac.

[PATCH net-next 1/6] stmmac: intel: set IRQ affinity hint for multi MSI vectors

2021-03-29 Thread Ong Boon Leong
Intel mGBE has independent hardware IRQ resources for TX and RX DMA operation. In preparation to support XDP TX, we add IRQ affinity hint to group both RX and TX queue of the same queue ID to the same CPU. Signed-off-by: Ong Boon Leong --- drivers/net/ethernet/stmicro/stmmac/dwmac-intel.c | 7

[PATCH net 1/1] xdp: fix xdp_return_frame() kernel BUG throw for page_pool memory model

2021-03-29 Thread Ong Boon Leong
adding "if (napi_direct)" condition to skip calling xdp_return_frame_no_direct() if napi_direct = false. Fixes: 2539650fadbf ("xdp: Helpers for disabling napi_direct of xdp_return_frame") Signed-off-by: Ong Boon Leong --- net/core/xdp.c | 3 ++- 1 file changed, 2 insertions(+),

RE: [PATCH v2 net-next 4/5] stmmac: intel: add support for multi-vector msi and msi-x

2021-03-26 Thread Ong, Boon Leong
>+static int stmmac_config_multi_msi(struct pci_dev *pdev, >+ struct plat_stmmacenet_data *plat, >+ struct stmmac_resources *res) >+{ For optimum RX & TX queue processing on the same IRQ, we should use irq_set_affinity_hint() to set th

[PATCH net-next 1/2] net: stmmac: restructure tc implementation for RX VLAN Priority steering

2021-03-18 Thread Ong Boon Leong
Q_CTRL2 & MAC_RXQ_CTRL3 registers and all VLAN priority level can be configured independent from L3 & L4 filters. Signed-off-by: Ong Boon Leong --- .../net/ethernet/stmicro/stmmac/stmmac_tc.c | 24 +-- 1 file changed, 22 insertions(+), 2 deletions(-) diff --git a/drive

[PATCH net-next 2/2] net: stmmac: add RX frame steering based on VLAN priority in tc flower

2021-03-18 Thread Ong Boon Leong
delete all tc flower configurations: $ tc qdisc delete dev ingress Signed-off-by: Ong Boon Leong --- .../net/ethernet/stmicro/stmmac/stmmac_tc.c | 65 ++- 1 file changed, 63 insertions(+), 2 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_tc.c b/drivers

[PATCH net-next 0/2] stmmac: add VLAN priority based RX steering

2021-03-18 Thread Ong Boon Leong
91-edge eth0:tx-3 139: 0 0 0 0 IR-PCI-MSI 477192-edge eth0:rx-4 140: 0 0 0 0 IR-PCI-MSI 477193-edge eth0:tx-4 141: 0 0 0 0 IR-PCI-MSI 477194-edge eth0:rx-5 142:

[PATCH net-next 1/1] stmmac: intel: Add PSE and PCH PTP clock source selection

2021-03-16 Thread Ong Boon Leong
red to configure the frequency of clock source, in this case Intel mGBE does, the platform-specific configuration of the PTP clock setting is done when stmmac_ptp_register() is called. Signed-off-by: Wong, Vee Khee Signed-off-by: Voon Weifeng Co-developed-by: Ong Boon Leong Signed-off-by: Ong Boon

[PATCH net-next 0/1] stmmac: add PCH and PSE PTP clock setting

2021-03-16 Thread Ong Boon Leong
Hi, Intel mGBE controllers that are integrated into EHL, TGL SoC have different clock source selection. This patch adds the required setting for running linuxptp time-sync. The patch has been tested on both PSE (/dev/ptp0) and PCH TSN(/dev/ptp2) and the results for the time sync looks correct. #

[PATCH net-next v2 0/1] net: stmmac: add per-q coalesce support

2021-03-16 Thread Ong Boon Leong
params to return '0'. * remove unrequired coalesce params check in __stmmac_set_coalesce as supported coalesce params are already listed in supported_coalesce_params. Thanks Boon Leong Ong Boon Leong (1): net: stmmac: add per-queue TX & RX coalesce ethtool support

[PATCH net-next v2 1/1] net: stmmac: add per-queue TX & RX coalesce ethtool support

2021-03-16 Thread Ong Boon Leong
] [rx-frames M] [tx-usecs P] [tx-frames Q] Signed-off-by: Ong Boon Leong --- .../ethernet/stmicro/stmmac/dwmac1000_dma.c | 2 +- .../net/ethernet/stmicro/stmmac/dwmac4_dma.c | 7 +- .../ethernet/stmicro/stmmac/dwxgmac2_dma.c| 7 +- drivers/net/ethernet/stmicro/stmmac/hwif.h| 2

RE: [PATCH net-next 1/1] net: stmmac: add per-queue TX & RX coalesce ethtool support

2021-03-15 Thread Ong, Boon Leong
>> +if (queue < tx_cnt) { >> +ec->tx_coalesce_usecs = priv->tx_coal_timer[queue]; >> +ec->tx_max_coalesced_frames = priv->tx_coal_frames[queue]; >> +} else { >> +ec->tx_coalesce_usecs = -1; >> +ec->tx_max_coalesced_frames = -1; >> +} >> +

[PATCH net-next 1/1] net: stmmac: add per-queue TX & RX coalesce ethtool support

2021-03-14 Thread Ong Boon Leong
] [rx-frames M] [tx-usecs P] [tx-frames Q] Signed-off-by: Ong Boon Leong --- .../ethernet/stmicro/stmmac/dwmac1000_dma.c | 2 +- .../net/ethernet/stmicro/stmmac/dwmac4_dma.c | 7 +- .../ethernet/stmicro/stmmac/dwxgmac2_dma.c| 7 +- drivers/net/ethernet/stmicro/stmmac/hwif.h| 2

[PATCH net-next 0/1] net: stmmac: add per-q coalesce support

2021-03-14 Thread Ong Boon Leong
s-high: 0 tx-usecs-high: 0 tx-frames-high: 0 ######## Thanks, Boon Leong Ong Boon Leong (1): net: stmmac: add per-queue TX & RX coalesce ethtool support .../ethernet/stmicro/stmmac/dwmac1000_dma.c | 2 +- .../net/ethernet/stmicro/stmmac/dwm

[PATCH net-next 6/6] stmmac: intel: add pcs-xpcs for Intel mGbE controller

2021-03-14 Thread Ong Boon Leong
Intel mGbE controller such as those in EHL & TGL uses pcs-xpcs driver for SGMII interface. To ensure mdio bus scanning does not assign phy_device to MDIO-addressable entities like intel serdes and pcs-xpcs, we set up to phy_mask to skip them. Signed-off-by: Ong Boon Leong --- drivers

[PATCH net-next 5/6] net: stmmac: ensure phydev is attached to phylink for C37 AN

2021-03-14 Thread Ong Boon Leong
As the support for MAC-side SGMII C37 AN is added to pcs-xpcs, phydev should be attached to phylink during driver's open(). So, we change the condition to "Not C73 AN" instead. Signed-off-by: Ong Boon Leong --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 +- 1

[PATCH net-next 4/6] net: stmmac: make in-band AN mode parsing is supported for non-DT

2021-03-14 Thread Ong Boon Leong
Not all platform uses DT, so phylink_parse_mode() will skip in-band setup of pl->supported and pl->link_config.advertising entirely. So, we add the setting of ovr_an_inband flag to make it works for non-DT platform. Signed-off-by: Ong Boon Leong --- drivers/net/ethernet/stmicro/

[PATCH net-next 3/6] net: phylink: make phylink_parse_mode() support non-DT platform

2021-03-14 Thread Ong Boon Leong
Certain platform does not support DT, so we make phylink_parse_mode() to allow non-DT platform to use it to setup in-band AN advertising. Signed-off-by: Ong Boon Leong --- drivers/net/phy/phylink.c | 5 +++-- include/linux/phylink.h | 2 ++ 2 files changed, 5 insertions(+), 2 deletions

[PATCH net-next 2/6] net: pcs: add C37 SGMII AN support for intel mGbE controller

2021-03-14 Thread Ong Boon Leong
XPCS IP supports C37 SGMII AN process and it is used in intel multi-GbE controller as MAC-side SGMII. Signed-off-by: Ong Boon Leong --- drivers/net/pcs/pcs-xpcs.c | 167 ++- include/linux/pcs/pcs-xpcs.h | 1 + 2 files changed, 167 insertions(+), 1 deletion

[PATCH net-next 1/6] net: pcs: rearrange C73 functions to prepare for C37 support later

2021-03-14 Thread Ong Boon Leong
The current implementation for XPCS is validated for C73, so we rename them to have _c73 suffix and introduce a set of functions to use an_mode flag to switch between C73 and C37 AN later. Signed-off-by: Ong Boon Leong --- drivers/net/pcs/pcs-xpcs.c | 94

[PATCH net-next 0/6] net: pcs, stmmac: add C37 AN SGMII support

2021-03-14 Thread Ong Boon Leong
:00:1e.4 eth2: Link is Down [63464.322366] intel-eth-pci :00:1e.4 eth2: Link is Up - 1Gbps/Full - flow control off Thanks Boon Leong Ong Boon Leong (6): net: pcs: rearrange C73 functions to prepare for C37 support later net: pcs: add C37 SGMII AN support for intel mGbE controller net

[PATCH net 1/1] net: phylink: Fix phylink_err() function name error in phylink_major_config

2021-03-14 Thread Ong Boon Leong
if pl->mac_ops->mac_finish() failed, phylink_err should use "mac_finish" instead of "mac_prepare". Fixes: b7ad14c2fe2d4 ("net: phylink: re-implement interface configuration with PCS") Signed-off-by: Ong Boon Leong --- drivers/net/phy/phylink.c | 2 +- 1 file

[PATCH net 1/1] stmmac: intel: Fixes clock registration error seen for multiple interfaces

2021-03-04 Thread Ong Boon Leong
d.2 /sys/kernel/debug/clk/stmmac-:00:1e.4 Fixes: 58da0cfa6cf1 ("net: stmmac: create dwmac-intel.c to contain all Intel platform") Signed-off-by: Wong Vee Khee Signed-off-by: Voon Weifeng Co-developed-by: Ong Boon Leong Signed-off-by: Ong Boon Leong --- drivers/net/ethernet/s

[PATCH net 1/1] net: stmmac: Fix VLAN filter delete timeout issue in Intel mGBE SGMII

2021-03-04 Thread Ong Boon Leong
the serdes power-down to be after unregister_netdev() which triggers the VLAN filter delete. Fixes: b9663b7ca6ff ("net: stmmac: Enable SERDES power up/down sequence") Signed-off-by: Ong Boon Leong --- drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 9 ++--- 1 file changed, 6