>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
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
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-
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
:
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
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
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
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
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
>+ /* 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
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 +++
:
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
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
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:
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
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
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
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
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
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
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
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.
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
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
>> +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;
>> +
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
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
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
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
/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
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.
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
>
/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
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
>> 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
>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
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
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/
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
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.
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
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
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/
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
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
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
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.
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
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(+),
>+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
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
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
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:
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
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.
#
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
] [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
>> +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;
>> +}
>> +
] [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
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
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
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
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/
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
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
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
: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
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
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
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
70 matches
Mail list logo