newer bpf-next, resolved conflicts in libbpf. Addressed
Björn's comments for coding style. Fixed a bug in error handling flow in
mlx5e_open_xsk.
Maxim Mikityanskiy (16):
xsk: Add API to check for available entries in FQ
xsk: Add getsockopt XDP_OPTIONS
libbpf: Support getsockopt XDP_OP
Add a function that checks whether the Fill Ring has the specified
amount of descriptors available. It will be useful for mlx5e that wants
to check in advance, whether it can allocate a bulk of RX descriptors,
to get the best performance.
Signed-off-by: Maxim Mikityanskiy
Reviewed-by: Tariq
Make it possible for the application to determine whether the AF_XDP
socket is running in zero-copy mode. To achieve this, add a new
getsockopt option XDP_OPTIONS that returns flags. The only flag
supported for now is the zero-copy mode indicator.
Signed-off-by: Maxim Mikityanskiy
Acked-by
Query XDP_OPTIONS in libbpf to determine if the zero-copy mode is active
or not.
Signed-off-by: Maxim Mikityanskiy
Acked-by: Saeed Mahameed
---
tools/lib/bpf/xsk.c | 11 +++
1 file changed, 11 insertions(+)
diff --git a/tools/lib/bpf/xsk.c b/tools/lib/bpf/xsk.c
index 38667b62f1fe
The PCI API for DMA is deprecated, and PCI_DMA_TODEVICE is just defined
to DMA_TO_DEVICE for backward compatibility. Just use DMA_TO_DEVICE.
Signed-off-by: Maxim Mikityanskiy
Reviewed-by: Tariq Toukan
Acked-by: Saeed Mahameed
---
drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c | 2 +-
1 file
previous
patches.
Signed-off-by: Maxim Mikityanskiy
Reviewed-by: Tariq Toukan
Acked-by: Saeed Mahameed
---
drivers/net/ethernet/mellanox/mlx5/core/en.h | 4 ++-
.../net/ethernet/mellanox/mlx5/core/en/xdp.c | 20 +++---
.../net/ethernet/mellanox/mlx5/core/en/xdp.h | 4 +--
.../net
Use the existing mlx5e_get_linear_rq_headroom function to calculate the
headroom for mlx5e_xdp_max_mtu. This function takes the XSK headroom
into consideration, which will be used in the following patches.
Signed-off-by: Maxim Mikityanskiy
Reviewed-by: Tariq Toukan
Acked-by: Saeed Mahameed
| Completion Ring.
On send, the same set of mlx5e_xdp_xmit_data fields is used in all
flows: DMA and virtual addresses and length.
Signed-off-by: Maxim Mikityanskiy
Reviewed-by: Tariq Toukan
Acked-by: Saeed Mahameed
---
drivers/net/ethernet/mellanox/mlx5/core/en.h | 46 +--
.../n
support
for XSK is introduced. Use this function in the implementation of
mlx5e_get_rq_headroom. Change headroom to u32 to match the headroom
field in struct xdp_umem.
Signed-off-by: Maxim Mikityanskiy
Reviewed-by: Tariq Toukan
Acked-by: Saeed Mahameed
---
.../ethernet/mellanox/mlx5/core/en
. Adapt the implementation of i40e and ixgbe to this change.
Signed-off-by: Maxim Mikityanskiy
Reviewed-by: Tariq Toukan
Acked-by: Saeed Mahameed
Cc: Björn Töpel
Cc: Magnus Karlsson
---
drivers/net/ethernet/intel/i40e/i40e_xsk.c | 12 +++-
drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c
Create new functions mlx5e_{open,close}_queues to encapsulate opening
and closing RQs and SQs, and call the new functions from
mlx5e_{open,close}_channel. It simplifies the existing functions a bit
and prepares them for the upcoming AF_XDP changes.
Signed-off-by: Maxim Mikityanskiy
Reviewed-by
in the end unmap it and call
xdp_return_frame.
Signed-off-by: Maxim Mikityanskiy
Reviewed-by: Tariq Toukan
Acked-by: Saeed Mahameed
---
.../net/ethernet/mellanox/mlx5/core/en/xdp.c | 50 ---
1 file changed, 42 insertions(+), 8 deletions(-)
diff --git a/drivers/net/ethernet
WQEs") is reverted.
Signed-off-by: Maxim Mikityanskiy
Reviewed-by: Tariq Toukan
Acked-by: Saeed Mahameed
---
drivers/net/ethernet/mellanox/mlx5/core/en.h | 9 +++
.../net/ethernet/mellanox/mlx5/core/en_rx.c | 27 +++
.../net/ethernet/mellanox/mlx5/core/en_txrx.c | 4 +
.
Signed-off-by: Maxim Mikityanskiy
Reviewed-by: Tariq Toukan
Acked-by: Saeed Mahameed
---
samples/bpf/xdpsock_user.c | 44 --
tools/lib/bpf/xsk.h| 2 +-
2 files changed, 29 insertions(+), 17 deletions(-)
diff --git a/samples/bpf/xdpsock_user.c b/samples
structs mlx5e_{rq,sq,cq,channel}_param are going to be used in the
upcoming XSK RX and TX patches. Move them to a header file to make
them accessible from other C files.
Signed-off-by: Maxim Mikityanskiy
Reviewed-by: Tariq Toukan
Acked-by: Saeed Mahameed
---
.../ethernet/mellanox/mlx5/core/en
gnore the flag in the XDP program (implemented in
the reference XDP program in libbpf). mlx5e will support this extension.
A single XDP program can run both with drivers supporting or not
supporting this extension. The xdpsock sample and libbpf are updated
accordingly.
Signed-off-by: Maxim Mikityanskiy
() instead.
Fixes: a038e9794541 ("net/mlx5e: Add XSK zero-copy support")
Signed-off-by: Arnd Bergmann
Signed-off-by: Maxim Mikityanskiy
---
v2 changes: use kvzalloc/kvfree and fix a memory leak.
.../mellanox/mlx5/core/en/xsk/setup.c | 27 ---
1 file changed,
On 2019-07-24 08:10, Kevin Laatz wrote:
> Currently, addresses are chunk size aligned. This means, we are very
> restricted in terms of where we can place chunk within the umem. For
> example, if we have a chunk size of 2k, then our chunks can only be placed
> at 0,2k,4k,6k,8k... and so on (ie. eve
On 2019-07-24 08:10, Kevin Laatz wrote:
> This patch adds support for the unaligned chunks mode. The addition of the
> unaligned chunks option will allow users to run the application with more
> relaxed chunk placement in the XDP umem.
>
> Unaligned chunks mode can be used with the '-u' or '--unal
On 2019-07-24 08:10, Kevin Laatz wrote:
> Currently, addresses are chunk size aligned. This means, we are very
> restricted in terms of where we can place chunk within the umem. For
> example, if we have a chunk size of 2k, then our chunks can only be placed
> at 0,2k,4k,6k,8k... and so on (ie. eve
On 2019-07-24 08:10, Kevin Laatz wrote:
> With the addition of the unaligned chunks option, we need to make sure we
> handle the offsets accordingly based on the mode we are currently running
> in. This patch modifies the driver to appropriately mask the address for
> each case.
>
> Signed-off-by:
On 2019-07-30 11:53, Kevin Laatz wrote:
> With the addition of the unaligned chunks option, we need to make sure we
> handle the offsets accordingly based on the mode we are currently running
> in. This patch modifies the driver to appropriately mask the address for
> each case.
>
> Signed-off-by:
d
TX queues, regardless of real_num_*_queues, still taking into
consideration num_*_queues to avoid overflows.
Fixes: 1c1efc2af158 ("xsk: Create and free buffer pool independently from umem")
Fixes: a41b4f3c58dd ("xsk: simplify xdp_clear_umem_at_qid implementation")
Signed-off-by: M
qdisc itself if it's the MQROOT.
Signed-off-by: Maxim Mikityanskiy
Reviewed-by: Tariq Toukan
---
include/net/sch_generic.h | 14 ++
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
index 639e465a108f..9448e8cf1ee6
In a following commit, sch_htb will start using extack in the delete
class operation to pass hardware errors in offload mode. This commit
prepares for that by adding the extack parameter to this callback and
converting usage of the existing qdiscs.
Signed-off-by: Maxim Mikityanskiy
Reviewed-by
explanations of how it works in the commit message. Remove %hu
from format strings. Add resiliency when leaf_del_last fails to create a
new leaf node.
Maxim Mikityanskiy (5):
net: sched: Add multi-queue support to sch_tree_lock
net: sched: Add extack to Qdisc_class_ops.delete
sch_htb: Hierarchical
t enabled by default, a new parameter is used to enable it:
# tc qdisc replace dev eth0 root handle 1: htb offload
Signed-off-by: Maxim Mikityanskiy
Reviewed-by: Tariq Toukan
---
include/linux/netdevice.h| 1 +
include/net/pkt_cls.h| 36 ++
include/ua
), and * is the counter name
(the counters are the same as for the normal SQs).
Signed-off-by: Maxim Mikityanskiy
Reviewed-by: Tariq Toukan
---
.../net/ethernet/mellanox/mlx5/core/Makefile | 6 +-
drivers/net/ethernet/mellanox/mlx5/core/en.h | 27 +-
.../ethernet/mellanox/mlx5/core/en/params.h
This commit adds support for statistics of offloaded HTB. Bytes and
packets counters for leaf and inner nodes are supported, the values are
taken from per-queue qdiscs, and the numbers that the user sees should
have the same behavior as the software (non-offloaded) HTB.
Signed-off-by: Maxim
On 2021-01-19 17:50, Björn Töpel wrote:
This series extends bind() for XDP sockets, so that the bound socket
is added to the netdev_rx_queue _rx array in the netdevice. We call
this to register the socket. To redirect packets to the registered
socket, a new BPF helper is used: bpf_redirect_xsk().
On 2020-12-10 10:28, Dan Carpenter wrote:
Hi Maxim,
url:
https://github.com/0day-ci/linux/commits/Maxim-Mikityanskiy/HTB-offload/20201210-000703
base: https://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next.git
afae3cc2da100ead3cd6ef4bb1fb8bc9d4b817c5
config: i386-randconfig-m021
On 2020-12-11 10:41, Dan Carpenter wrote:
On Thu, Dec 10, 2020 at 05:07:28PM +0200, Maxim Mikityanskiy wrote:
On 2020-12-10 10:28, Dan Carpenter wrote:
Hi Maxim,
url:
https://github.com/0day-ci/linux/commits/Maxim-Mikityanskiy/HTB-offload/20201210-000703
base:
https://git.kernel.org/pub
qdisc itself if it's the MQROOT.
Signed-off-by: Maxim Mikityanskiy
Reviewed-by: Tariq Toukan
---
include/net/sch_generic.h | 14 ++
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
index 162ed6249e8b..cfac2b0b5cc7
ted, the
granularity of rate and ceil parameters may be different, etc. - so, the
offload is not enabled by default, a new parameter is used to enable it:
# tc qdisc replace dev eth0 root handle 1: htb offload
Signed-off-by: Maxim Mikityanskiy
Reviewed-by: Tariq Toukan
---
inclu
This commit adds support for statistics of offloaded HTB. Bytes and
packets counters for leaf and inner nodes are supported, the values are
taken from per-queue qdiscs, and the numbers that the user sees should
have the same behavior as the software (non-offloaded) HTB.
Signed-off-by: Maxim
to 80 chars per
line.
Maxim Mikityanskiy (4):
net: sched: Add multi-queue support to sch_tree_lock
sch_htb: Hierarchical QoS hardware offload
sch_htb: Stats for offloaded HTB
net/mlx5e: Support HTB offload
.../net/ethernet/mellanox/mlx5/core/Makefile | 6 +-
drivers/net/ethernet
), and * is the counter name
(the counters are the same as for the normal SQs).
Signed-off-by: Maxim Mikityanskiy
Reviewed-by: Tariq Toukan
---
.../net/ethernet/mellanox/mlx5/core/Makefile | 6 +-
drivers/net/ethernet/mellanox/mlx5/core/en.h | 27 +-
.../ethernet/mellanox/mlx5/core/en/params.h
On 2020-12-11 21:16, Cong Wang wrote:
On Fri, Dec 11, 2020 at 7:26 AM Maxim Mikityanskiy wrote:
HTB doesn't scale well because of contention on a single lock, and it
also consumes CPU. This patch adds support for offloading HTB to
hardware that supports hierarchical rate limiting.
On 2020-12-14 21:35, Cong Wang wrote:
On Mon, Dec 14, 2020 at 7:13 AM Maxim Mikityanskiy wrote:
On 2020-12-11 21:16, Cong Wang wrote:
On Fri, Dec 11, 2020 at 7:26 AM Maxim Mikityanskiy wrote:
HTB doesn't scale well because of contention on a single lock, and it
also consumes CPU.
lasses are created as usual, but filters should be moved to clsact for
lock-free classification (filters attached to HTB itself are not
supported in the offload mode):
# tc filter add dev eth0 egress protocol ip flower dst_port 80
action skbedit priority 1:10
Signed-off-by: Maxim Mi
qdisc itself if it's the MQROOT.
Signed-off-by: Maxim Mikityanskiy
Reviewed-by: Tariq Toukan
---
include/net/sch_generic.h | 14 ++
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
index 162ed6249e8b..cfac2b0b5cc7
to 80 chars per
line.
v3 changes:
Fixed the CI failure on parisc with 16-bit xchg by replacing it with
WRITE_ONCE. Fixed the capability bits in mlx5_ifc.h and the value of
MLX5E_QOS_MAX_LEAF_NODES.
Maxim Mikityanskiy (4):
net: sched: Add multi-queue support to sch_tree_lock
sch_htb
This commit adds support for statistics of offloaded HTB. Bytes and
packets counters for leaf and inner nodes are supported, the values are
taken from per-queue qdiscs, and the numbers that the user sees should
have the same behavior as the software (non-offloaded) HTB.
Signed-off-by: Maxim
), and * is the counter name
(the counters are the same as for the normal SQs).
Signed-off-by: Maxim Mikityanskiy
Reviewed-by: Tariq Toukan
---
.../net/ethernet/mellanox/mlx5/core/Makefile | 6 +-
drivers/net/ethernet/mellanox/mlx5/core/en.h | 27 +-
.../ethernet/mellanox/mlx5/core/en/params.h
ted, the
granularity of rate and ceil parameters may be different, etc. - so, the
offload is not enabled by default, a new parameter is used to enable it:
# tc qdisc replace dev eth0 root handle 1: htb offload
Signed-off-by: Maxim Mikityanskiy
Reviewed-by: Tariq Toukan
---
inclu
On 2020-12-15 18:37, Jamal Hadi Salim wrote:
On 2020-12-14 3:30 p.m., Maxim Mikityanskiy wrote:
On 2020-12-14 21:35, Cong Wang wrote:
On Mon, Dec 14, 2020 at 7:13 AM Maxim Mikityanskiy
wrote:
On 2020-12-11 21:16, Cong Wang wrote:
On Fri, Dec 11, 2020 at 7:26 AM Maxim Mikityanskiy
wrote
On 2020-12-16 21:01, Cong Wang wrote:
On Mon, Dec 14, 2020 at 12:30 PM Maxim Mikityanskiy wrote:
On 2020-12-14 21:35, Cong Wang wrote:
On Mon, Dec 14, 2020 at 7:13 AM Maxim Mikityanskiy wrote:
On 2020-12-11 21:16, Cong Wang wrote:
On Fri, Dec 11, 2020 at 7:26 AM Maxim Mikityanskiy wrote
On 2020-12-17 17:09, Jamal Hadi Salim wrote:
On 2020-12-16 6:47 a.m., Maxim Mikityanskiy wrote:
On 2020-12-15 18:37, Jamal Hadi Salim wrote:
[..]
Same question above:
Is there a limit to the number of classes that can be created?
Yes, the commit message of the mlx5 patch lists the
program that drops the buffer.
This change simply puts the handling of MEM_TYPE_XSK_BUFF_POOL back
into xdp_return_buff().
Reported-by: Maxim Mikityanskiy
Fixes: 82c41671ca4f ("xdp: Simplify xdp_return_{frame, frame_rx_napi, buff}")
Signed-off-by: Björn Töpel
Thanks for addre
14.2 times in the UDP
multi-stream test, compared to software HTB implementation (more details
in the mlx5 patch).
[1]: https://www.spinics.net/lists/netdev/msg628422.html
[2]: https://www.spinics.net/lists/netdev/msg663548.html
Maxim Mikityanskiy (4):
net: sched: Add multi-queue support to
qdisc itself if it's the MQROOT.
Signed-off-by: Maxim Mikityanskiy
Reviewed-by: Tariq Toukan
---
include/net/sch_generic.h | 14 ++
1 file changed, 10 insertions(+), 4 deletions(-)
diff --git a/include/net/sch_generic.h b/include/net/sch_generic.h
index 162ed6249e8b..cfac2b0b5cc7
This commit adds support for statistics of offloaded HTB. Bytes and
packets counters for leaf and inner nodes are supported, the values are
taken from per-queue qdiscs, and the numbers that the user sees should
have the same behavior as the software (non-offloaded) HTB.
Signed-off-by: Maxim
), and * is the counter name
(the counters are the same as for the normal SQs).
Signed-off-by: Maxim Mikityanskiy
Reviewed-by: Tariq Toukan
---
.../net/ethernet/mellanox/mlx5/core/Makefile | 6 +-
drivers/net/ethernet/mellanox/mlx5/core/en.h | 27 +-
.../ethernet/mellanox/mlx5/core/en/params.h
ted, the
granularity of rate and ceil parameters may be different, etc. - so, the
offload is not enabled by default, a new parameter is used to enable it:
# tc qdisc replace dev eth0 root handle 1: htb offload
Signed-off-by: Maxim Mikityanskiy
Reviewed-by: Tariq Toukan
---
inclu
On 2020-12-22 03:17, Jakub Kicinski wrote:
On Tue, 15 Dec 2020 09:42:11 +0200 Maxim Mikityanskiy wrote:
+ q->offload = nla_get_flag(tb[TCA_HTB_OFFLOAD]);
+
+ if (q->offload) {
+ if (!tc_can_offload(dev) || !dev->netdev_ops->ndo_setup_tc)
+
On 2020-11-05 00:59, Jakub Kicinski wrote:
On Tue, 3 Nov 2020 11:18:25 -0800 Saeed Mahameed wrote:
From: Maxim Mikityanskiy
On resync, the driver calls inet_lookup_established
(__inet6_lookup_established) that increases sk_refcnt of the socket. To
decrease it, the driver set skb->destruc
lasses are created as usual, but filters should be moved to clsact for
lock-free classification (filters attached to HTB itself are not
supported in the offload mode):
# tc filter add dev eth0 egress protocol ip flower dst_port 80
action skbedit priority 1:10
Signed-off-by: Maxim Mikityanskiy
R
On 2021-01-29 18:05, David Ahern wrote:
On 12/15/20 12:42 AM, Maxim Mikityanskiy wrote:
This commit adds support for configuring HTB in offload mode. HTB
offload eliminates the single qdisc lock in the datapath and offloads
the algorithm to the NIC. The new 'offload' parameter i
: Maxim Mikityanskiy
Date: Tue Jan 19 12:08:13 2021 +
sch_htb: Hierarchical QoS hardware offload
bisection log: https://syzkaller.appspot.com/x/bisect.txt?x=13ab12ecd0
final oops: https://syzkaller.appspot.com/x/report.txt?x=106b12ecd0
console output: https
On 2021-03-10 19:03, Eric Dumazet wrote:
On 3/10/21 3:54 PM, Maxim Mikityanskiy wrote:
On 2021-03-09 17:20, Eric Dumazet wrote:
On 3/9/21 4:13 PM, syzbot wrote:
Hello,
syzbot found the following issue on:
HEAD commit: 38b5133a octeontx2-pf: Fix otx2_get_fecparam()
git tree: net
The HTB offload feature introduced a few bugs in HTB. One affects the
non-offload mode, preventing attaching qdiscs to HTB classes, and the
other affects the error flow, when the netdev doesn't support the
offload, but it was requested. This short series fixes them.
Maxim Mikityansk
Hierarchical QoS hardware offload")
Suggested-by: Eric Dumazet
Signed-off-by: Maxim Mikityanskiy
Reviewed-by: Tariq Toukan
---
net/sched/sch_htb.c | 15 +--
1 file changed, 9 insertions(+), 6 deletions(-)
diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c
index b23203159996
pspotmail.com
Fixes: d03b195b5aa0 ("sch_htb: Hierarchical QoS hardware offload")
Signed-off-by: Maxim Mikityanskiy
Reviewed-by: Tariq Toukan
---
net/sched/sch_htb.c | 4
1 file changed, 4 insertions(+)
diff --git a/net/sched/sch_htb.c b/net/sched/sch_htb.c
index dff3adf5a915..b23203
On 2021-03-15 10:38, Antoine Tenart wrote:
Quoting Saeed Mahameed (2021-03-12 21:54:18)
On Fri, 2021-03-12 at 16:04 +0100, Antoine Tenart wrote:
netif_set_xps_queue must be called with the rtnl lock taken, and this
is
now enforced using ASSERT_RTNL(). mlx5e_attach_netdev was taking the
lock con
uot;,"handle":"0:","parent":"1:","options":{"limit":1000}},{"kind":"pfifo","handle":"0:","parent":"1:","options":{"limit":1000}},{"kind":"pfifo&qu
t use
xmit_hash")
Signed-off-by: Maxim Mikityanskiy
Reviewed-by: Tariq Toukan
---
While this patch works around the issue, I would like to discuss better
options. Another straightforward approach is to extend lockdep API with
lockdep_is_not_held(), which will be basically !lockdep_is_held() wh
On 2021-03-22 16:21, Lv Yunlong wrote:
My static analyzer tool reported a potential uaf in
mlx5e_ktls_del_rx. In this function, if the condition
cancel_work_sync(&resync->work) is true, and then
priv_rx could be freed. But priv_rx is used later.
I'm unfamiliar with how this function works. Maybe
On 2021-03-22 16:09, Leon Romanovsky wrote:
On Mon, Mar 22, 2021 at 02:38:46PM +0200, Maxim Mikityanskiy wrote:
After lockdep gets triggered for the first time, it gets disabled, and
lockdep_enabled() will return false. It will affect lockdep_is_held(),
which will start returning true all the
On 2021-03-23 19:56, Jay Vosburgh wrote:
Maxim Mikityanskiy wrote:
On 2021-03-22 16:09, Leon Romanovsky wrote:
On Mon, Mar 22, 2021 at 02:38:46PM +0200, Maxim Mikityanskiy wrote:
After lockdep gets triggered for the first time, it gets disabled, and
lockdep_enabled() will return false. It
-tx-offload: on [fixed]
Fitler out dev->hw_features from req_wanted to fix it and to resemble
the legacy ethtool behavior.
Signed-off-by: Maxim Mikityanskiy
---
net/ethtool/features.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/net/ethtool/features.c b/net/e
userspace tool.
Maxim Mikityanskiy (3):
ethtool: Fix preserving of wanted feature bits in netlink interface
ethtool: Account for hw_features in netlink interface
ethtool: Don't omit the netlink reply if no features were changed
net/ethtool/features.c | 19 ++-
1 file change
is commit fixes it by changing the formula to:
(req_wanted & req_mask) | (old_wanted & ~req_mask),
where old_active was replaced by old_wanted to account for the wanted
bits.
The shortcut condition for the case where nothing was changed now
compares wanted bitmasks, instead of wanted to act
from active_mask to avoid
reacting on bit changes that we asked for. The new condition now
matches the ifs in the loop above that print "[requested on/off]" and
"[not requested]".
Signed-off-by: Maxim Mikityanskiy
---
netlink/features.c | 2 +-
1 file changed, 1 insertion
-netlink always return a reply when requested,
and it still avoids unnecessary calls to __netdev_update_features if the
wanted features haven't changed.
Signed-off-by: Maxim Mikityanskiy
---
net/ethtool/features.c | 11 ---
1 file changed, 4 insertions(+), 7 deletions(-)
diff --git a/net/
d all bits got to wanted.
Signed-off-by: Maxim Mikityanskiy
---
netlink/features.c | 25 ++---
1 file changed, 18 insertions(+), 7 deletions(-)
diff --git a/netlink/features.c b/netlink/features.c
index 133529d..4f63fa2 100644
--- a/netlink/features.c
+++ b/netlink/featu
This series contains fixes for ethtool-netlink to make the behavior
similar to the legacy ethtool and avoid regressions caused by
differences in behavior between the old and the new tool.
Please also see the sibling series for the kernel.
Maxim Mikityanskiy (2):
netlink: Fix the condition for
tive.
Fixes: 0980bfcd6954 ("ethtool: set netdev features with FEATURES_SET request")
Signed-off-by: Maxim Mikityanskiy
---
net/ethtool/features.c | 11 +++
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/net/ethtool/features.c b/net/ethtool/features.c
index 4e632dc
-tx-offload: on [fixed]
Fitler out dev->hw_features from req_wanted to fix it and to resemble
the legacy ethtool behavior.
Fixes: 0980bfcd6954 ("ethtool: set netdev features with FEATURES_SET request")
Signed-off-by: Maxim Mikityanskiy
---
net/ethtool/features.c | 3 ++-
1
userspace tool.
v2 changes: Added Fixes tags.
Maxim Mikityanskiy (3):
ethtool: Fix preserving of wanted feature bits in netlink interface
ethtool: Account for hw_features in netlink interface
ethtool: Don't omit the netlink reply if no features were changed
net/ethtool/features.c
-netlink always return a reply when requested,
and it still avoids unnecessary calls to __netdev_update_features if the
wanted features haven't changed.
Fixes: 0980bfcd6954 ("ethtool: set netdev features with FEATURES_SET request")
Signed-off-by: Maxim Mikityanskiy
---
net/ethtool/featu
Make it possible for the application to determine whether the AF_XDP
socket is running in zero-copy mode. To achieve this, add a new
getsockopt option XDP_OPTIONS that returns flags. The only flag
supported for now is the zero-copy mode indicator.
Signed-off-by: Maxim Mikityanskiy
Reviewed-by
Add a function that checks whether the Fill Ring has the specified
amount of descriptors available. It will be useful for mlx5e that wants
to check in advance, whether it can allocate a bulk of RX descriptors,
to get the best performance.
Signed-off-by: Maxim Mikityanskiy
Reviewed-by: Tariq
ed or disabled. However, it's performed in an unsafe way:
if the new channels fail to open, the old ones are already closed, and
the interface goes down. Use the safe way to switch channels instead.
The same way is already used for other configuration changes.
Signed-off-by: Maxim Mikityanskiy
R
Query XDP_OPTIONS in libbpf to determine if the zero-copy mode is active
or not.
Signed-off-by: Maxim Mikityanskiy
Reviewed-by: Tariq Toukan
Acked-by: Saeed Mahameed
---
tools/lib/bpf/xsk.c | 12
1 file changed, 12 insertions(+)
diff --git a/tools/lib/bpf/xsk.c b/tools/lib/bpf
The PCI API for DMA is deprecated, and PCI_DMA_TODEVICE is just defined
to DMA_TO_DEVICE for backward compatibility. Just use DMA_TO_DEVICE.
Signed-off-by: Maxim Mikityanskiy
Reviewed-by: Tariq Toukan
Acked-by: Saeed Mahameed
---
drivers/net/ethernet/mellanox/mlx5/core/en/xdp.c | 2 +-
1 file
.
Signed-off-by: Maxim Mikityanskiy
Reviewed-by: Tariq Toukan
Acked-by: Saeed Mahameed
---
samples/bpf/xdpsock_user.c | 44 --
tools/lib/bpf/xsk.h| 2 +-
2 files changed, 29 insertions(+), 17 deletions(-)
diff --git a/samples/bpf/xdpsock_user.c b/samples
previous
patches.
Signed-off-by: Maxim Mikityanskiy
Reviewed-by: Tariq Toukan
Acked-by: Saeed Mahameed
---
drivers/net/ethernet/mellanox/mlx5/core/en.h | 4 ++-
.../net/ethernet/mellanox/mlx5/core/en/xdp.c | 20 +++---
.../net/ethernet/mellanox/mlx5/core/en/xdp.h | 4 +--
.../net
WQEs") is reverted.
Signed-off-by: Maxim Mikityanskiy
Reviewed-by: Tariq Toukan
Acked-by: Saeed Mahameed
---
drivers/net/ethernet/mellanox/mlx5/core/en.h | 9 +++
.../net/ethernet/mellanox/mlx5/core/en_rx.c | 27 +++
.../net/ethernet/mellanox/mlx5/core/en_txrx.c | 4 +
).
libbpf shouldn't limit applications to a lower max queue number. Account
for non-combined RX and TX channels when calculating the max queue
number. Use the same formula that is used in ethtool.
Signed-off-by: Maxim Mikityanskiy
Reviewed-by: Tariq Toukan
Acked-by: Saeed Mahameed
---
tool
in the end unmap it and call
xdp_return_frame.
Signed-off-by: Maxim Mikityanskiy
Reviewed-by: Tariq Toukan
Acked-by: Saeed Mahameed
---
.../net/ethernet/mellanox/mlx5/core/en/xdp.c | 50 ---
1 file changed, 42 insertions(+), 8 deletions(-)
diff --git a/drivers/net/ethernet
| Completion Ring.
On send, the same set of mlx5e_xdp_xmit_data fields is used in all
flows: DMA and virtual addresses and length.
Signed-off-by: Maxim Mikityanskiy
Reviewed-by: Tariq Toukan
Acked-by: Saeed Mahameed
---
drivers/net/ethernet/mellanox/mlx5/core/en.h | 46 +--
.../n
Create new functions mlx5e_{open,close}_queues to encapsulate opening
and closing RQs and SQs, and call the new functions from
mlx5e_{open,close}_channel. It simplifies the existing functions a bit
and prepares them for the upcoming AF_XDP changes.
Signed-off-by: Maxim Mikityanskiy
Reviewed-by
Use the existing mlx5e_get_linear_rq_headroom function to calculate the
headroom for mlx5e_xdp_max_mtu. This function takes the XSK headroom
into consideration, which will be used in the following patches.
Signed-off-by: Maxim Mikityanskiy
Reviewed-by: Tariq Toukan
Acked-by: Saeed Mahameed
support
for XSK is introduced. Use this function in the implementation of
mlx5e_get_rq_headroom. Change headroom to u32 to match the headroom
field in struct xdp_umem.
Signed-off-by: Maxim Mikityanskiy
Reviewed-by: Tariq Toukan
Acked-by: Saeed Mahameed
---
.../ethernet/mellanox/mlx5/core/en
. Adapt the implementation of i40e and ixgbe to this change.
Signed-off-by: Maxim Mikityanskiy
Reviewed-by: Tariq Toukan
Acked-by: Saeed Mahameed
Cc: Björn Töpel
Cc: Magnus Karlsson
---
drivers/net/ethernet/intel/i40e/i40e_xsk.c | 12 +++-
drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c
structs mlx5e_{rq,sq,cq,channel}_param are going to be used in the
upcoming XSK RX and TX patches. Move them to a header file to make
them accessible from other C files.
Signed-off-by: Maxim Mikityanskiy
Reviewed-by: Tariq Toukan
Acked-by: Saeed Mahameed
---
.../ethernet/mellanox/mlx5/core/en
uff from this one.
Added "libbpf: Support drivers with non-combined channels", which aligns
the condition in libbpf with the condition in the kernel.
Rebased over the newer bpf-next.
Maxim Mikityanskiy (17):
net/mlx5e: Attach/detach XDP program safely
xsk: Add API to check for available
no XDP program attached.
The drivers typically perform some heavy operations on XDP_SETUP_PROG,
so they all have to handle this case internally to return early if it
happens. This patch puts this check into the kernel code, so that all
drivers will benefit from it.
Signed-off-by: Maxim Mikityan
On 2019-06-13 15:58, Björn Töpel wrote:
> On Wed, 12 Jun 2019 at 22:49, Jakub Kicinski
> wrote:
>>
>> On Wed, 12 Jun 2019 15:56:33 +, Maxim Mikityanskiy wrote:
>>> UAPI is not changed, XSK RX queues are exposed to the kernel. The lower
>>> half of the avail
On 2019-06-12 23:10, Jakub Kicinski wrote:
> On Wed, 12 Jun 2019 15:56:43 +0000, Maxim Mikityanskiy wrote:
>> The typical XDP memory scheme is one packet per page. Change the AF_XDP
>> frame size in libbpf to 4096, which is the page size on x86, to allow
>> libbpf to be used
1 - 100 of 242 matches
Mail list logo