From: Ong Boon Leong <boon.leong.ong@intel.com>
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: alexandre.torgue@foss.st.com,
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 v2 0/7] stmmac: add XDP ZC support
Date: Tue, 13 Apr 2021 17:36:19 +0800 [thread overview]
Message-ID: <20210413093626.3447-1-boon.leong.ong@intel.com> (raw)
Hi,
This is the v2 patch series to add XDP ZC support to stmmac driver.
Summary of v2 patch change:-
6/7: fix synchronize_rcu() is called stmmac_disable_all_queues() that is
used by ndo_setup_tc().
########################################################################
Continuous burst traffics are generated by pktgen script and in the midst
of each packet processing operation by xdpsock the following tc-loop.sh
script is looped continuously:-
#!/bin/bash
tc qdisc del dev eth0 parent root
tc qdisc add dev eth0 ingress
tc qdisc add dev eth0 root mqprio num_tc 4 map 0 1 2 3 0 0 0 0 0 0 0 0 0 0 0 0 queues 1@0 1@1 1@2 1@3 hw 0
tc filter add dev eth0 parent ffff: protocol 802.1Q flower vlan_prio 0 hw_tc 0
tc filter add dev eth0 parent ffff: protocol 802.1Q flower vlan_prio 1 hw_tc 1
tc filter add dev eth0 parent ffff: protocol 802.1Q flower vlan_prio 2 hw_tc 2
tc filter add dev eth0 parent ffff: protocol 802.1Q flower vlan_prio 3 hw_tc 3
tc qdisc list dev eth0
tc filter show dev eth0 ingress
On different ssh terminal
$ while true; do ./tc-loop.sh; sleep 1; done
The v2 patch series have been tested using the xdpsock app:
$ ./xdpsock -i eth0 -l -z
From xdpsock poller pps report and dmesg, we don't find any warning
related to rcu and the only difference when the script is executed is
the pps rate drops momentarily.
sock0@eth0:0 l2fwd xdp-drv
pps pkts 1.00
rx 436347 191361334
tx 436411 191361334
sock0@eth0:0 l2fwd xdp-drv
pps pkts 1.00
rx 254117 191615476
tx 254053 191615412
sock0@eth0:0 l2fwd xdp-drv
pps pkts 1.00
rx 466395 192081924
tx 466395 192081860
sock0@eth0:0 l2fwd xdp-drv
pps pkts 1.00
rx 287410 192369365
tx 287474 192369365
sock0@eth0:0 l2fwd xdp-drv
pps pkts 1.00
rx 395853 192765329
tx 395789 192765265
sock0@eth0:0 l2fwd xdp-drv
pps pkts 1.00
rx 466132 193231514
tx 466132 193231450
########################################################################
Based on the above result, the fix looks promising. Appreciate that if
community can help to review the patch series and provide me feedback
for improvement.
Thanks,
Boon 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 free functions
net: stmmac: introduce dma_recycle_rx_skbufs for
stmmac_reinit_rx_buffers
net: stmmac: refactor stmmac_init_rx_buffers for
stmmac_reinit_rx_buffers
net: stmmac: rearrange RX and TX desc init into per-queue basis
net: stmmac: Refactor __stmmac_xdp_run_prog for XDP ZC
net: stmmac: Enable RX via AF_XDP zero-copy
net: stmmac: Add TX via XDP zero-copy socket
drivers/net/ethernet/stmicro/stmmac/stmmac.h | 24 +-
.../net/ethernet/stmicro/stmmac/stmmac_main.c | 1718 +++++++++++++----
.../net/ethernet/stmicro/stmmac/stmmac_xdp.c | 95 +
.../net/ethernet/stmicro/stmmac/stmmac_xdp.h | 3 +
4 files changed, 1411 insertions(+), 429 deletions(-)
--
2.25.1
next reply other threads:[~2021-04-13 9:32 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-04-13 9:36 Ong Boon Leong [this message]
2021-04-13 9:36 ` [PATCH net-next v2 1/7] net: stmmac: rearrange RX buffer allocation and free functions Ong Boon Leong
2021-04-13 9:36 ` [PATCH net-next v2 2/7] net: stmmac: introduce dma_recycle_rx_skbufs for stmmac_reinit_rx_buffers Ong Boon Leong
2021-04-13 9:36 ` [PATCH net-next v2 3/7] net: stmmac: refactor stmmac_init_rx_buffers " Ong Boon Leong
2021-04-13 9:36 ` [PATCH net-next v2 4/7] net: stmmac: rearrange RX and TX desc init into per-queue basis Ong Boon Leong
2021-04-13 9:36 ` [PATCH net-next v2 5/7] net: stmmac: Refactor __stmmac_xdp_run_prog for XDP ZC Ong Boon Leong
2021-04-13 9:36 ` [PATCH net-next v2 6/7] net: stmmac: Enable RX via AF_XDP zero-copy Ong Boon Leong
2021-04-13 9:36 ` [PATCH net-next v2 7/7] net: stmmac: Add TX via XDP zero-copy socket Ong Boon Leong
2021-04-13 22:10 ` [PATCH net-next v2 0/7] stmmac: add XDP ZC support patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20210413093626.3447-1-boon.leong.ong@intel.com \
--to=boon.leong.ong@intel.com \
--cc=alexandre.torgue@foss.st.com \
--cc=alexandre.torgue@st.com \
--cc=andrii@kernel.org \
--cc=ast@kernel.org \
--cc=bpf@vger.kernel.org \
--cc=daniel@iogearbox.net \
--cc=davem@davemloft.net \
--cc=hawk@kernel.org \
--cc=joabreu@synopsys.com \
--cc=john.fastabend@gmail.com \
--cc=kafai@fb.com \
--cc=kpsingh@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=peppe.cavallaro@st.com \
--cc=songliubraving@fb.com \
--cc=yhs@fb.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).