bpf.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* RE: [PATCH net-next v3 0/6] stmmac: Add XDP support
  2021-03-31 15:35 [PATCH net-next v3 0/6] stmmac: Add XDP support Ong Boon Leong
@ 2021-03-31 15:32 ` Ong, Boon Leong
  0 siblings, 0 replies; 3+ messages in thread
From: Ong, Boon Leong @ 2021-03-31 15:32 UTC (permalink / raw)
  To: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
	David S . Miller, Jakub Kicinski, Alexei Starovoitov,
	Daniel Borkmann, Jesper Dangaard Brouer, John Fastabend
  Cc: Maxime Coquelin, Andrii Nakryiko, Martin KaFai Lau, Song Liu,
	Yonghong Song, KP Singh, netdev, linux-stm32, linux-arm-kernel,
	linux-kernel, bpf

Pls ignore this. I will resend the real v3. Sorry for glitch on my part. 

>-----Original Message-----
>From: Ong, Boon Leong <boon.leong.ong@intel.com>
>Sent: Wednesday, March 31, 2021 11:36 PM
>To: Giuseppe Cavallaro <peppe.cavallaro@st.com>; Alexandre Torgue
><alexandre.torgue@st.com>; Jose Abreu <joabreu@synopsys.com>; David S .
>Miller <davem@davemloft.net>; Jakub Kicinski <kuba@kernel.org>; Alexei
>Starovoitov <ast@kernel.org>; Daniel Borkmann <daniel@iogearbox.net>;
>Jesper Dangaard Brouer <hawk@kernel.org>; John Fastabend
><john.fastabend@gmail.com>
>Cc: Maxime Coquelin <mcoquelin.stm32@gmail.com>; Andrii Nakryiko
><andrii@kernel.org>; Martin KaFai Lau <kafai@fb.com>; Song Liu
><songliubraving@fb.com>; Yonghong Song <yhs@fb.com>; KP Singh
><kpsingh@kernel.org>; netdev@vger.kernel.org; linux-stm32@st-md-
>mailman.stormreply.com; linux-arm-kernel@lists.infradead.org; linux-
>kernel@vger.kernel.org; bpf@vger.kernel.org; Ong, Boon Leong
><boon.leong.ong@intel.com>
>Subject: [PATCH net-next v3 0/6] stmmac: Add XDP support
>
>Hi,
>
>This is the v3 patch series for adding XDP support to stmmac driver.
>
>Summary of the changes in v3 (per feedback from Jakub Kicinski):-
>
>4/6: Factor in XDP buffer header and tail adjustment by XDP prog.
>
>5/6: Added 'nq->trans_start = jiffies' to avoid TX time-out for XDP_TX.
>
>6/6: Added 'nq->trans_start = jiffies' to avoid TX time-out for
>     ndo_xdp_xmit.
>
>I retested this patch series on all the test steps listed in v1 and the
>results look good as expected. I also used xdp_adjust_tail test app in
>samples/bpf for checking out XDP head and tail adjustment introduced in
>4/6 and the result below looks correct too.
>
>
>###########################################################
>#############
>
>DUT > root@intel-corei7-64:~ $ ./xdp_adjust_tail -i eth0 -P 400 -N
>==========================
>icmp "packet too big" sent:          0 pkts
>icmp "packet too big" sent:          0 pkts
>icmp "packet too big" sent:          0 pkts
>icmp "packet too big" sent:          0 pkts
>icmp "packet too big" sent:          1 pkts
>icmp "packet too big" sent:          1 pkts
>icmp "packet too big" sent:          1 pkts
>icmp "packet too big" sent:          2 pkts
>icmp "packet too big" sent:          4 pkts
>icmp "packet too big" sent:          6 pkts
>icmp "packet too big" sent:          8 pkts
>icmp "packet too big" sent:          9 pkts
>icmp "packet too big" sent:         10 pkts
>icmp "packet too big" sent:         10 pkts
>
>LP > root@intel-corei7-64:~# ping 169.254.1.11 -s 300
>PING 169.254.1.11 (169.254.1.11) 300(328) bytes of data.
>308 bytes from 169.254.1.11: icmp_seq=1 ttl=64 time=1.17 ms
>308 bytes from 169.254.1.11: icmp_seq=2 ttl=64 time=0.575 ms
>308 bytes from 169.254.1.11: icmp_seq=3 ttl=64 time=0.582 ms
>308 bytes from 169.254.1.11: icmp_seq=4 ttl=64 time=0.595 ms
>308 bytes from 169.254.1.11: icmp_seq=5 ttl=64 time=0.585 ms
>308 bytes from 169.254.1.11: icmp_seq=6 ttl=64 time=0.591 ms
>308 bytes from 169.254.1.11: icmp_seq=7 ttl=64 time=0.599 ms
>^C
>--- 169.254.1.11 ping statistics ---
>7 packets transmitted, 7 received, 0% packet loss, time 6103ms
>rtt min/avg/max/mdev = 0.575/0.670/1.166/0.202 ms
>
>LP >  root@intel-corei7-64:~# ping 169.254.1.11 -s 500
>PING 169.254.1.11 (169.254.1.11) 500(528) bytes of data.
>From 169.254.1.11 icmp_seq=1 Frag needed and DF set (mtu = 436)
>From 169.254.1.11 icmp_seq=2 Frag needed and DF set (mtu = 436)
>From 169.254.1.11 icmp_seq=3 Frag needed and DF set (mtu = 436)
>From 169.254.1.11 icmp_seq=4 Frag needed and DF set (mtu = 436)
>From 169.254.1.11 icmp_seq=5 Frag needed and DF set (mtu = 436)
>From 169.254.1.11 icmp_seq=6 Frag needed and DF set (mtu = 436)
>
>
>###########################################################
>#############
>
>History of the previous patch series:
>
>v2: https://patchwork.kernel.org/project/netdevbpf/list/?series=457757
>v1: https://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 MSI vectors
>  net: stmmac: make SPH enable/disable to be configurable
>  net: stmmac: arrange Tx tail pointer update to
>    stmmac_flush_tx_descriptors
>  net: stmmac: Add initial XDP support
>  net: stmmac: Add support for XDP_TX action
>  net: stmmac: Add support for XDP_REDIRECT action
>
> drivers/net/ethernet/stmicro/stmmac/Makefile  |   1 +
> drivers/net/ethernet/stmicro/stmmac/stmmac.h  |  35 +-
> .../net/ethernet/stmicro/stmmac/stmmac_main.c | 529 +++++++++++++++-
>--
> .../net/ethernet/stmicro/stmmac/stmmac_xdp.c  |  40 ++
> .../net/ethernet/stmicro/stmmac/stmmac_xdp.h  |  12 +
> 5 files changed, 537 insertions(+), 80 deletions(-)
> create mode 100644 drivers/net/ethernet/stmicro/stmmac/stmmac_xdp.c
> create mode 100644 drivers/net/ethernet/stmicro/stmmac/stmmac_xdp.h
>
>--
>2.25.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH net-next v3 0/6] stmmac: Add XDP support
@ 2021-03-31 15:35 Ong Boon Leong
  2021-03-31 15:32 ` Ong, Boon Leong
  0 siblings, 1 reply; 3+ messages in thread
From: Ong Boon Leong @ 2021-03-31 15:35 UTC (permalink / raw)
  To: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
	David S . Miller, Jakub Kicinski, Alexei Starovoitov,
	Daniel Borkmann, Jesper Dangaard Brouer, John Fastabend
  Cc: Maxime Coquelin, Andrii Nakryiko, Martin KaFai Lau, Song Liu,
	Yonghong Song, KP Singh, netdev, linux-stm32, linux-arm-kernel,
	linux-kernel, bpf, Ong Boon Leong

Hi,

This is the v3 patch series for adding XDP support to stmmac driver.

Summary of the changes in v3 (per feedback from Jakub Kicinski):-

4/6: Factor in XDP buffer header and tail adjustment by XDP prog.

5/6: Added 'nq->trans_start = jiffies' to avoid TX time-out for XDP_TX.

6/6: Added 'nq->trans_start = jiffies' to avoid TX time-out for
     ndo_xdp_xmit.

I retested this patch series on all the test steps listed in v1 and the
results look good as expected. I also used xdp_adjust_tail test app in
samples/bpf for checking out XDP head and tail adjustment introduced in
4/6 and the result below looks correct too.

 ########################################################################

DUT > root@intel-corei7-64:~ $ ./xdp_adjust_tail -i eth0 -P 400 -N
==========================
icmp "packet too big" sent:          0 pkts
icmp "packet too big" sent:          0 pkts
icmp "packet too big" sent:          0 pkts
icmp "packet too big" sent:          0 pkts
icmp "packet too big" sent:          1 pkts
icmp "packet too big" sent:          1 pkts
icmp "packet too big" sent:          1 pkts
icmp "packet too big" sent:          2 pkts
icmp "packet too big" sent:          4 pkts
icmp "packet too big" sent:          6 pkts
icmp "packet too big" sent:          8 pkts
icmp "packet too big" sent:          9 pkts
icmp "packet too big" sent:         10 pkts
icmp "packet too big" sent:         10 pkts

LP > root@intel-corei7-64:~# ping 169.254.1.11 -s 300
PING 169.254.1.11 (169.254.1.11) 300(328) bytes of data.
308 bytes from 169.254.1.11: icmp_seq=1 ttl=64 time=1.17 ms
308 bytes from 169.254.1.11: icmp_seq=2 ttl=64 time=0.575 ms
308 bytes from 169.254.1.11: icmp_seq=3 ttl=64 time=0.582 ms
308 bytes from 169.254.1.11: icmp_seq=4 ttl=64 time=0.595 ms
308 bytes from 169.254.1.11: icmp_seq=5 ttl=64 time=0.585 ms
308 bytes from 169.254.1.11: icmp_seq=6 ttl=64 time=0.591 ms
308 bytes from 169.254.1.11: icmp_seq=7 ttl=64 time=0.599 ms
^C
--- 169.254.1.11 ping statistics ---
7 packets transmitted, 7 received, 0% packet loss, time 6103ms
rtt min/avg/max/mdev = 0.575/0.670/1.166/0.202 ms

LP >  root@intel-corei7-64:~# ping 169.254.1.11 -s 500
PING 169.254.1.11 (169.254.1.11) 500(528) bytes of data.
From 169.254.1.11 icmp_seq=1 Frag needed and DF set (mtu = 436)
From 169.254.1.11 icmp_seq=2 Frag needed and DF set (mtu = 436)
From 169.254.1.11 icmp_seq=3 Frag needed and DF set (mtu = 436)
From 169.254.1.11 icmp_seq=4 Frag needed and DF set (mtu = 436)
From 169.254.1.11 icmp_seq=5 Frag needed and DF set (mtu = 436)
From 169.254.1.11 icmp_seq=6 Frag needed and DF set (mtu = 436)

 ########################################################################

History of the previous patch series:

v2: https://patchwork.kernel.org/project/netdevbpf/list/?series=457757
v1: https://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 MSI vectors
  net: stmmac: make SPH enable/disable to be configurable
  net: stmmac: arrange Tx tail pointer update to
    stmmac_flush_tx_descriptors
  net: stmmac: Add initial XDP support
  net: stmmac: Add support for XDP_TX action
  net: stmmac: Add support for XDP_REDIRECT action

 drivers/net/ethernet/stmicro/stmmac/Makefile  |   1 +
 drivers/net/ethernet/stmicro/stmmac/stmmac.h  |  35 +-
 .../net/ethernet/stmicro/stmmac/stmmac_main.c | 529 +++++++++++++++---
 .../net/ethernet/stmicro/stmmac/stmmac_xdp.c  |  40 ++
 .../net/ethernet/stmicro/stmmac/stmmac_xdp.h  |  12 +
 5 files changed, 537 insertions(+), 80 deletions(-)
 create mode 100644 drivers/net/ethernet/stmicro/stmmac/stmmac_xdp.c
 create mode 100644 drivers/net/ethernet/stmicro/stmmac/stmmac_xdp.h

-- 
2.25.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH net-next v3 0/6] stmmac: Add XDP support
@ 2021-03-31 15:41 Ong Boon Leong
  0 siblings, 0 replies; 3+ messages in thread
From: Ong Boon Leong @ 2021-03-31 15:41 UTC (permalink / raw)
  To: Giuseppe Cavallaro, Alexandre Torgue, Jose Abreu,
	David S . Miller, Jakub Kicinski, Alexei Starovoitov,
	Daniel Borkmann, Jesper Dangaard Brouer, John Fastabend
  Cc: Maxime Coquelin, Andrii Nakryiko, Martin KaFai Lau, Song Liu,
	Yonghong Song, KP Singh, netdev, linux-stm32, linux-arm-kernel,
	linux-kernel, bpf, Ong Boon Leong

Hi,

This is the v3 patch series for adding XDP support to stmmac driver.

Summary of the changes in v3 (per feedback from Jakub Kicinski):-

4/6: Factor in XDP buffer header and tail adjustment by XDP prog.

5/6: Added 'nq->trans_start = jiffies' to avoid TX time-out for XDP_TX.

6/6: Added 'nq->trans_start = jiffies' to avoid TX time-out for
     ndo_xdp_xmit.

I retested this patch series on all the test steps listed in v1 and the
results look good as expected. I also used xdp_adjust_tail test app in
samples/bpf for checking out XDP head and tail adjustment introduced in
4/6 and the result below looks correct too.

 ########################################################################

DUT > root@intel-corei7-64:~ $ ./xdp_adjust_tail -i eth0 -P 400 -N
==========================
icmp "packet too big" sent:          0 pkts
icmp "packet too big" sent:          0 pkts
icmp "packet too big" sent:          0 pkts
icmp "packet too big" sent:          0 pkts
icmp "packet too big" sent:          1 pkts
icmp "packet too big" sent:          1 pkts
icmp "packet too big" sent:          1 pkts
icmp "packet too big" sent:          2 pkts
icmp "packet too big" sent:          4 pkts
icmp "packet too big" sent:          6 pkts
icmp "packet too big" sent:          8 pkts
icmp "packet too big" sent:          9 pkts
icmp "packet too big" sent:         10 pkts
icmp "packet too big" sent:         10 pkts

LP > root@intel-corei7-64:~# ping 169.254.1.11 -s 300
PING 169.254.1.11 (169.254.1.11) 300(328) bytes of data.
308 bytes from 169.254.1.11: icmp_seq=1 ttl=64 time=1.17 ms
308 bytes from 169.254.1.11: icmp_seq=2 ttl=64 time=0.575 ms
308 bytes from 169.254.1.11: icmp_seq=3 ttl=64 time=0.582 ms
308 bytes from 169.254.1.11: icmp_seq=4 ttl=64 time=0.595 ms
308 bytes from 169.254.1.11: icmp_seq=5 ttl=64 time=0.585 ms
308 bytes from 169.254.1.11: icmp_seq=6 ttl=64 time=0.591 ms
308 bytes from 169.254.1.11: icmp_seq=7 ttl=64 time=0.599 ms

--- 169.254.1.11 ping statistics ---
7 packets transmitted, 7 received, 0% packet loss, time 6103ms
rtt min/avg/max/mdev = 0.575/0.670/1.166/0.202 ms

LP >  root@intel-corei7-64:~# ping 169.254.1.11 -s 500
PING 169.254.1.11 (169.254.1.11) 500(528) bytes of data.
From 169.254.1.11 icmp_seq=1 Frag needed and DF set (mtu = 436)
From 169.254.1.11 icmp_seq=2 Frag needed and DF set (mtu = 436)
From 169.254.1.11 icmp_seq=3 Frag needed and DF set (mtu = 436)
From 169.254.1.11 icmp_seq=4 Frag needed and DF set (mtu = 436)
From 169.254.1.11 icmp_seq=5 Frag needed and DF set (mtu = 436)
From 169.254.1.11 icmp_seq=6 Frag needed and DF set (mtu = 436)

 ########################################################################

History of the previous patch series:

v2: https://patchwork.kernel.org/project/netdevbpf/list/?series=457757
v1: https://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 MSI vectors
  net: stmmac: make SPH enable/disable to be configurable
  net: stmmac: arrange Tx tail pointer update to
    stmmac_flush_tx_descriptors
  net: stmmac: Add initial XDP support
  net: stmmac: Add support for XDP_TX action
  net: stmmac: Add support for XDP_REDIRECT action

 drivers/net/ethernet/stmicro/stmmac/Makefile  |   1 +
 drivers/net/ethernet/stmicro/stmmac/stmmac.h  |  35 +-
 .../net/ethernet/stmicro/stmmac/stmmac_main.c | 529 +++++++++++++++---
 .../net/ethernet/stmicro/stmmac/stmmac_xdp.c  |  40 ++
 .../net/ethernet/stmicro/stmmac/stmmac_xdp.h  |  12 +
 5 files changed, 537 insertions(+), 80 deletions(-)
 create mode 100644 drivers/net/ethernet/stmicro/stmmac/stmmac_xdp.c
 create mode 100644 drivers/net/ethernet/stmicro/stmmac/stmmac_xdp.h

-- 
2.25.1


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2021-03-31 15:38 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-03-31 15:35 [PATCH net-next v3 0/6] stmmac: Add XDP support Ong Boon Leong
2021-03-31 15:32 ` Ong, Boon Leong
2021-03-31 15:41 Ong Boon Leong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).