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:

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

2021-04-13 Thread Ong Boon Leong
nables 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/stmmac/stmmac_main.c | 317 -- .../net/ethernet/stmicro/

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

2021-04-13 Thread Ong Boon Leong
() 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-off-by: Ong Boon Leong --- drivers/net

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

2021-04-13 Thread Ong Boon Leong
for 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 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 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
ong History of patch series as follow:- v1: https://patchwork.kernel.org/project/netdevbpf/list/?series=465747=* ---- Ong Boon Leong (7): net: stmmac: rearrange RX buffer allocation and free functions

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 = >rx_queue[queue]; >+ if (rx_q->xsk_pool) { >+ synchronize_rcu(); > >Are you sure this is safe here, especially

[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 7/7] net: stmmac: Add TX via XDP zero-copy socket

2021-04-12 Thread Ong Boon Leong
nables 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/stmmac/stmmac_main.c | 317 -- .../net/ethernet/stmicro/

[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 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 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 6/7] net: stmmac: Enable RX via AF_XDP zero-copy

2021-04-12 Thread Ong Boon Leong
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 +- .../net/ethernet/stmicro/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 5/7] net: stmmac: Refactor __stmmac_xdp_run_prog for XDP ZC

2021-04-12 Thread Ong Boon Leong
for 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/ethernet/stmicr

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

2021-03-31 Thread Ong Boon Leong
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 deletions(-) diff --git

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

2021-03-31 Thread Ong Boon Leong
/nipa/457321/12170149/build_32bit/stderr Signed-off-by: Ong Boon Leong --- .../net/ethernet/stmicro/stmmac/stmmac_main.c | 56 +-- 1 file changed, 26 insertions(+), 30 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac

[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/stmicro/stmmac

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

2021-03-31 Thread Ong Boon Leong
is 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
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 tail pointer update

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
s 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 insertions(+)

[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/stmicro/stmmac

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

2021-03-31 Thread Ong Boon Leong
/nipa/457321/12170149/build_32bit/stderr Signed-off-by: Ong Boon Leong --- .../net/ethernet/stmicro/stmmac/stmmac_main.c | 56 +-- 1 file changed, 26 insertions(+), 30 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac

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

2021-03-31 Thread Ong Boon Leong
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/stmicro/stmmac/stmmac

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

2021-03-31 Thread Ong Boon Leong
is 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 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
g/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 MSI vectors net: stm

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
g/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 MSI vectors net: stm

[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

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

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

2021-03-29 Thread Ong Boon Leong
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/net/ethern

[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 2/6] net: stmmac: make SPH enable/disable to be configurable

2021-03-29 Thread Ong Boon Leong
is 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 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 Leong ---

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

2021-03-29 Thread Ong Boon Leong
/nipa/457321/12170149/build_32bit/stderr Signed-off-by: Ong Boon Leong --- .../net/ethernet/stmicro/stmmac/stmmac_main.c | 56 +-- 1 file changed, 26 insertions(+), 30 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/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 v2 0/6] stmmac: Add XDP support

2021-03-29 Thread Ong Boon Leong
are executed with preempt-rt build and it also requires a fix that was sent to ML here: https://patchwork.kernel.org/project/netdevbpf/list/?series=457139 It will be great if community help test out these v2 patch series on your platform and provide me feedback. Thank you very much, Boon Leong Ong Boon

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

2021-03-29 Thread Ong Boon Leong
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/net/ethern

[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 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 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 2/6] net: stmmac: make SPH enable/disable to be configurable

2021-03-29 Thread Ong Boon Leong
is 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-next 0/6] stmmac: Add XDP support

2021-03-29 Thread Ong Boon Leong
ve 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 1/1] xdp: fix xdp_return_frame() kernel BUG throw for page_pool memory model

2021-03-29 Thread Ong Boon Leong
by 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

[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 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 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 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 1/1] stmmac: intel: Add PSE and PCH PTP clock source selection

2021-03-16 Thread Ong Boon Leong
equired 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 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 .../ether

[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-15 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-15 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 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 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 file

[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

[RFC net-next v2 5/5] net: stmmac: add dwxpcs boardinfo for mdio_device registration

2019-08-28 Thread Ong Boon Leong
GMII interface only. Also introduce callback for remove mdio_device for unloading driver. Signed-off-by: Ong Boon Leong --- drivers/net/ethernet/stmicro/stmmac/Kconfig | 1 + drivers/net/ethernet/stmicro/stmmac/stmmac.h | 2 + .../net/ethernet/stmicro/stmmac/stmmac_main.c | 25 +++ ...

[RFC net-next v2 3/5] net: phy: add private data to mdio_device

2019-08-28 Thread Ong Boon Leong
PHY converter device is represented as mdio_device and requires private data. So, we add pointer for private data to mdio_device struct. Signed-off-by: Ong Boon Leong --- include/linux/mdio.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/mdio.h b/include/linux/mdio.h index

[RFC net-next v2 4/5] net: phy: introducing support for DWC xPCS logics for EHL & TGL

2019-08-28 Thread Ong Boon Leong
Hock Leong Signed-off-by: Ong Boon Leong --- drivers/net/phy/Kconfig | 9 + drivers/net/phy/Makefile | 1 + drivers/net/phy/dwxpcs.c | 417 +++ include/linux/dwxpcs.h | 16 ++ 4 files changed, 443 insertions(+) create mode 100644 drivers/net/phy/dwxpcs

[RFC net-next v2 0/5] PHY converter driver for DW xPCS IP

2019-08-28 Thread Ong Boon Leong
e here. Thanks Boon Leong Ong Boon Leong (5): net: phy: make mdiobus_create_device() function callable from Eth driver net: phy: introduce mdiobus_get_mdio_device net: phy: add private data to mdio_device net: phy: introducing support for DWC xPCS logics for EHL & TGL net: stmmac: a

[RFC net-next v2 1/5] net: phy: make mdiobus_create_device() function callable from Eth driver

2019-08-28 Thread Ong Boon Leong
make mdiobus_create_ device() to be callable from Eth driver open(). Signed-off-by: Ong Boon Leong --- drivers/net/phy/mdio_bus.c | 5 +++-- include/linux/phy.h| 7 +++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy

[RFC net-next v2 2/5] net: phy: introduce mdiobus_get_mdio_device

2019-08-28 Thread Ong Boon Leong
Add the function to get mdio_device based on the mdio addr. Signed-off-by: Ong Boon Leong --- drivers/net/phy/mdio_bus.c | 6 ++ include/linux/mdio.h | 1 + 2 files changed, 7 insertions(+) diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c index 06658d9197a1

[RFC net-next v1 5/5] net: stmmac: add dwxpcs boardinfo for mdio_device registration

2019-08-28 Thread Ong Boon Leong
GMII interface only. Also introduce callback for remove mdio_device for unloading driver. Signed-off-by: Ong Boon Leong --- drivers/net/ethernet/stmicro/stmmac/Kconfig | 1 + drivers/net/ethernet/stmicro/stmmac/stmmac.h | 2 + .../net/ethernet/stmicro/stmmac/stmmac_main.c | 25 +++ ...

[RFC net-next v1 4/5] net: phy: introducing support for DWC xPCS logics for EHL & TGL

2019-08-28 Thread Ong Boon Leong
Hock Leong Signed-off-by: Ong Boon Leong --- drivers/net/phy/Kconfig | 9 + drivers/net/phy/Makefile | 1 + drivers/net/phy/dwxpcs.c | 417 +++ include/linux/dwxpcs.h | 16 ++ 4 files changed, 443 insertions(+) create mode 100644 drivers/net/phy/dwxpcs

[RFC net-next v1 3/5] net: phy: add private data to mdio_device

2019-08-28 Thread Ong Boon Leong
PHY converter device is represented as mdio_device and requires private data. So, we add pointer for private data to mdio_device struct. Signed-off-by: Ong Boon Leong --- include/linux/mdio.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/include/linux/mdio.h b/include/linux/mdio.h index

[RFC net-next v1 2/5] net: phy: introduce mdiobus_get_mdio_device

2019-08-28 Thread Ong Boon Leong
Add the function to get mdio_device based on the mdio addr. Signed-off-by: Ong Boon Leong --- drivers/net/phy/mdio_bus.c | 6 ++ include/linux/mdio.h | 1 + 2 files changed, 7 insertions(+) diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy/mdio_bus.c index 06658d9197a1

[RFC net-next v1 1/5] net: phy: make mdiobus_create_device() function callable from Eth driver

2019-08-28 Thread Ong Boon Leong
make mdiobus_create_ device() to be callable from Eth driver open(). Signed-off-by: Ong Boon Leong --- drivers/net/phy/mdio_bus.c | 5 +++-- include/linux/phy.h| 7 +++ 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/net/phy/mdio_bus.c b/drivers/net/phy

[RFC net-next v1 0/5] PHY converter driver for DW xPCS IP

2019-08-28 Thread Ong Boon Leong
e PHY converter driver and mdio device through DT definition. Please kindly review this RFC and provide any feedback/concern that the community may have. Appreciate your time here. Thanks Boon Leong Ong Boon Leong (5): net: phy: make mdiobus_create_device() function callable from Eth dr

RE: [PATCH v1 net-next] net: phy: mdio_bus: make mdiobus_scan also cover PHY that only talks C45

2019-08-28 Thread Ong, Boon Leong
>On Tue, Aug 27, 2019 at 03:23:34PM +, Voon, Weifeng wrote: >> > > > Make mdiobus_scan() to try harder to look for any PHY that only >> > talks C45. >> > > If you are not using Device Tree or ACPI, and you are letting the MDIO >> > > bus be scanned, it sounds like there should be a way for you

RE: [RFC net-next 1/5] net: stmmac: introduce IEEE 802.1Qbv configuration functionalities

2019-06-27 Thread Ong, Boon Leong
>-Original Message- >From: Jose Abreu [mailto:jose.ab...@synopsys.com] >>From: Voon Weifeng >> diff --git a/drivers/net/ethernet/stmicro/stmmac/dw_tsn_lib.c >b/drivers/net/ethernet/stmicro/stmmac/dw_tsn_lib.c >> new file mode 100644 >> index ..cba27c604cb1 >> --- /dev/null >>

RE: [PATCH net-next v6 2/5] net: stmmac: introducing support for DWC xPCS logics

2019-06-19 Thread Ong, Boon Leong
>>From: Jose Abreu [mailto:jose.ab...@synopsys.com] >>From: Florian Fainelli >> >>> +Russell, >>> >>> On 6/4/2019 11:58 AM, Voon Weifeng wrote: >>> > From: Ong Boon Leong >>> > >>> > xPCS is DWC Ethernet Physical

RE: [RFC net-next 1/5] net: stmmac: introduce IEEE 802.1Qbv configuration functionalities

2019-06-19 Thread Ong, Boon Leong
>-Original Message- >From: Gomes, Vinicius >> +++ b/drivers/net/ethernet/stmicro/stmmac/dw_tsn_lib.c >> @@ -0,0 +1,790 @@ >> + >> +static struct tsn_hw_cap dw_tsn_hwcap; >> +static bool dw_tsn_feat_en[TSN_FEAT_ID_MAX]; >> +static unsigned int dw_tsn_hwtunable[TSN_HWTUNA_MAX]; >> +static

RE: [RFC net-next 1/5] net: stmmac: introduce IEEE 802.1Qbv configuration functionalities

2019-06-19 Thread Ong, Boon Leong
>> > It looks like most o the TSN_WARN should actually be netdev_dbg(). >> > >> >Andrew >> >> Hi Andrew, >> This file is targeted for dual licensing which is GPL-2.0 OR BSD-3-Clause. >> This is the reason why we are using wrappers around the functions so that >> all the function call is

RE: [PATCH net-next v6 2/5] net: stmmac: introducing support for DWC xPCS logics

2019-06-06 Thread Ong, Boon Leong
eppe >Cavallaro ; Andrew Lunn ; >Alexandre Torgue ; biao huang >; Ong, Boon Leong >; Kweh, Hock Leong > >Subject: RE: [PATCH net-next v6 2/5] net: stmmac: introducing support for >DWC xPCS logics > >From: Florian Fainelli > >> +Russell, >> >

RE: [PATCH 2/2] net-next: stmmac: add mdio clause 45 access from mac device for dwmac4

2019-04-29 Thread Ong, Boon Leong
>Subject: [PATCH 2/2] net-next: stmmac: add mdio clause 45 access from mac >device for dwmac4 > >add clause 45 mdio read and write from mac device for dwmac4. > >Signed-off-by: Biao Huang Hi, I would like to point out that there is another C45 implementation proposed here "net: stmmac: enable

RE: [PATCH 4/7] net: stmmac: introducing support for DWC xPCS logics

2019-04-25 Thread Ong, Boon Leong
>-Original Message- >From: Andrew Lunn [mailto:and...@lunn.ch] >Sent: Thursday, April 25, 2019 11:21 AM >To: Ong, Boon Leong >Cc: David S. Miller ; net...@vger.kernel.org; linux- >ker...@vger.kernel.org; Kweh, Hock Leong ; >Voon, Weifeng >Subject: Re: [PATCH 4/7]

RE: [PATCH v2 1/1] x86/platform/iosf_mbi: Remove duplicate definitions

2015-12-03 Thread Ong, Boon Leong
>-Original Message- >From: linux-kernel-ow...@vger.kernel.org [mailto:linux-kernel- >ow...@vger.kernel.org] On Behalf Of Andy Shevchenko >Sent: Wednesday, November 25, 2015 10:33 PM >To: Thomas Gleixner >Cc: linux-kernel@vger.kernel.org; linux-...@vger.kernel.org; linux-

RE: [PATCH v2 1/1] x86/platform/iosf_mbi: Remove duplicate definitions

2015-12-03 Thread Ong, Boon Leong
>-Original Message- >From: linux-kernel-ow...@vger.kernel.org [mailto:linux-kernel- >ow...@vger.kernel.org] On Behalf Of Andy Shevchenko >Sent: Wednesday, November 25, 2015 10:33 PM >To: Thomas Gleixner >Cc: linux-kernel@vger.kernel.org; linux-...@vger.kernel.org;

RE: [PATCH v5 2/2] efi: a misc char interface for user to update efi firmware

2015-09-09 Thread Ong, Boon Leong
>OK, that's interesting. Which cat tool is included with the Quark BSP? > Quark is using busybox 1.22.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at

RE: [PATCH v5 2/2] efi: a misc char interface for user to update efi firmware

2015-09-09 Thread Ong, Boon Leong
>OK, that's interesting. Which cat tool is included with the Quark BSP? > Quark is using busybox 1.22.1 -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at

[PATCHv6 0/1] Intel Quark X1000 DTS thermal driver

2015-04-14 Thread Ong Boon Leong
dly review the patch at your convenient time and provide me feedback for improvement. Appreciate your time and effort. Thank You Ong Boon Leong Intel Corp. --- Changes in v6: * Revised to use the recommended dual license style per feedback from Rui. Thanks! Changes in v5: * Added BSD License a

[PATCHv6 1/1] thermal: intel Quark SoC X1000 DTS thermal driver

2015-04-14 Thread Ong Boon Leong
hope that it will be useful, but + * WITHOUT ANY WARRANTY; without even the implied warranty of + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU + * General Public License for more details. + * + * Contact Information: + * Ong Boon Leong + * Intel Malaysia, Penang + *

  1   2   >