On Tue, 28 Apr 2020 at 15:02, Cong Wang wrote:
>
Hi Cong,
Thank you for this work!
> After commit b3e80d44f5b1
> ("bonding: fix lockdep warning in bond_get_stats()") the dynamic
> key is no longer necessary, as we compute nest level at run-time.
> So, we can just remove it to save some lockdep k
On 4/29/20 10:12 PM, Song Liu wrote:
On Apr 29, 2020, at 7:23 PM, Andrii Nakryiko wrote:
On Tue, Apr 28, 2020 at 11:47 PM Song Liu wrote:
Add test for BPF_ENABLE_STATS, which should enable run_time_ns stats.
~/selftests/bpf# ./test_progs -t enable_stats -v
test_enable_stats:PASS:skel
> On Apr 30, 2020, at 12:02 AM, Yonghong Song wrote:
>
>
>
> On 4/29/20 10:12 PM, Song Liu wrote:
>>> On Apr 29, 2020, at 7:23 PM, Andrii Nakryiko
>>> wrote:
>>>
>>> On Tue, Apr 28, 2020 at 11:47 PM Song Liu wrote:
Add test for BPF_ENABLE_STATS, which should enable run_time_ns
Add test for BPF_ENABLE_STATS, which should enable run_time_ns stats.
~/selftests/bpf# ./test_progs -t enable_stats -v
test_enable_stats:PASS:skel_open_and_load 0 nsec
test_enable_stats:PASS:get_stats_fd 0 nsec
test_enable_stats:PASS:attach_raw_tp 0 nsec
test_enable_stats:PASS:get_prog_info 0 nse
run_time_ns is a useful stats for BPF programs. However, it is gated by
sysctl kernel.bpf_stats_enabled. When multiple user space tools are
toggling kernl.bpf_stats_enabled at the same time, they may confuse each
other.
Solve this problem with a new BPF command BPF_ENABLE_STATS.
Changes v8 => v9:
bpf_enable_stats() is added to enable given stats.
Signed-off-by: Song Liu
---
tools/lib/bpf/bpf.c | 10 ++
tools/lib/bpf/bpf.h | 1 +
tools/lib/bpf/libbpf.map | 1 +
3 files changed, 12 insertions(+)
diff --git a/tools/lib/bpf/bpf.c b/tools/lib/bpf/bpf.c
index 8f2f0958d446.
Currently, sysctl kernel.bpf_stats_enabled controls BPF runtime stats.
Typical userspace tools use kernel.bpf_stats_enabled as follows:
1. Enable kernel.bpf_stats_enabled;
2. Check program run_time_ns;
3. Sleep for the monitoring period;
4. Check program run_time_ns again, calculate the di
> -Original Message-
> From: Arnd Bergmann
> Sent: Wednesday, April 29, 2020 12:51 AM
> To: Belgazal, Netanel ; Kiyanovski, Arthur
> ; David S. Miller ; Alexei
> Starovoitov ; Daniel Borkmann ;
> Jakub Kicinski ; Jesper Dangaard Brouer
> ; John Fastabend ; Jubran,
> Samih
> Cc: Arnd Ber
On Tue, 28 Apr 2020 at 15:02, Cong Wang wrote:
>
Hi Cong,
Thank you so much for this work!
> This patch reverts the folowing commits:
>
> commit 064ff66e2bef84f1153087612032b5b9eab005bd
> "bonding: add missing netdev_update_lockdep_key()"
>
> commit 53d374979ef147ab51f5d632dfe20b14aebeccd0
> "ne
Hi Vlad,
> -Original Message-
> From: Vlad Buslov
> Sent: 2020年4月30日 1:41
> To: Po Liu
> Cc: da...@davemloft.net; linux-ker...@vger.kernel.org;
> netdev@vger.kernel.org; vinicius.go...@intel.com; Claudiu Manoil
> ; Vladimir Oltean ;
> Alexandru Marginean ;
> michael.c...@broadcom.com;
On 27.04.2020 13:51, Andy Shevchenko wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the
> content is safe
>
> The commit e6a41c23df0d, while trying to fix an issue,
>
> ("net: macb: ensure interface is not suspended on at91rm9200")
>
> introduced a refcoun
This patchset adds support for the new generation of Atlantic NICs.
Chip generations are mostly compatible register-wise, but there are still
some differences. Therefore we've made some of first generation (A1) code
non-static to re-use it where possible.
Some pieces are A2 specific, in which cas
From: Mark Starovoytov
This patch fixes potential crash in case if hw_get_regs is NULL.
Signed-off-by: Mark Starovoytov
---
drivers/net/ethernet/aquantia/atlantic/aq_nic.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_nic.c
b/drivers/net/e
From: Nikita Danilov
hw_get_fw_version() never fails, so this patch simplifies its
usage by utilizing return value instead of output argument.
Signed-off-by: Nikita Danilov
Signed-off-by: Mark Starovoytov
---
drivers/net/ethernet/aquantia/atlantic/aq_hw.h| 2 +-
drivers/net/ethern
From: Mark Starovoytov
IS_CHIP feature will be used to differentiate between A1 and A2,
where necessary. Thus, move it to aq_hw.h, rename it and make
it accept the 'hw' pointer.
Signed-off-by: Mark Starovoytov
---
.../net/ethernet/aquantia/atlantic/aq_hw.h| 13 +++
.../aquantia/atlanti
Aquantia is now part of Marvell. Thus, update the driver description.
Signed-off-by: Igor Russkikh
Signed-off-by: Mark Starovoytov
---
drivers/net/ethernet/aquantia/atlantic/aq_cfg.h| 4 ++--
drivers/net/ethernet/aquantia/atlantic/aq_common.h | 2 +-
2 files changed, 3 insertions(+), 3 dele
Adding device ids for the new generation of atlantic nic.
Signed-off-by: Igor Russkikh
Signed-off-by: Mark Starovoytov
---
drivers/net/ethernet/aquantia/atlantic/aq_common.h | 7 +++
1 file changed, 7 insertions(+)
diff --git a/drivers/net/ethernet/aquantia/atlantic/aq_common.h
b/drivers/
From: Mark Starovoytov
A2 will have a different implementation of these 2 APIs, so
this patch moves them to hw_ops in preparation for A2.
Signed-off-by: Mark Starovoytov
Co-developed-by: Dmitry Bezrukov
Signed-off-by: Dmitry Bezrukov
---
drivers/net/ethernet/aquantia/atlantic/aq_hw.h | 5
This patch adds defines for 10M and EEE 100M link modes, which are
supported by A2.
10M support is added in this patch series.
EEE is out of scope, but will be added in a follow-up series.
Signed-off-by: Igor Russkikh
Signed-off-by: Mark Starovoytov
---
.../ethernet/aquantia/atlantic/aq_common
This patch adds RPF-related hw_ops, which are needed for basic
functionality.
Signed-off-by: Igor Russkikh
Co-developed-by: Dmitry Bogdanov
Signed-off-by: Dmitry Bogdanov
Signed-off-by: Mark Starovoytov
---
.../aquantia/atlantic/hw_atl/hw_atl_utils.h | 2 +
.../aquantia/atlantic/hw_atl2/h
From: Dmitry Bogdanov
This patch adds the bare minimum of A2 HW bindings required to
get fw_ops working.
Signed-off-by: Dmitry Bogdanov
Signed-off-by: Mark Starovoytov
---
.../net/ethernet/aquantia/atlantic/Makefile | 1 +
.../net/ethernet/aquantia/atlantic/aq_hw.h| 1 +
.../aquantia/
RPF is one of the modules which has been significantly
changed/extended on A2.
This patch adds the necessary A2 register definitions
for RPF, which are used in follow-up patches.
Signed-off-by: Igor Russkikh
Co-developed-by: Dmitry Bogdanov
Signed-off-by: Dmitry Bogdanov
Signed-off-by: Mark St
From: Dmitry Bogdanov
This patch adds the driver<->firmware interface for A2
Signed-off-by: Dmitry Bogdanov
Signed-off-by: Mark Starovoytov
---
.../aquantia/atlantic/hw_atl2/hw_atl2_utils.h | 593 ++
1 file changed, 593 insertions(+)
create mode 100644
drivers/net/ethernet/a
From: Dmitry Bogdanov
This patch adds A2 register definitions for basic A2 HW
initialization / deinitialization.
Signed-off-by: Dmitry Bogdanov
Co-developed-by: Egor Pomozov
Signed-off-by: Egor Pomozov
Co-developed-by: Igor Russkikh
Signed-off-by: Igor Russkikh
Co-developed-by: Nikita Danil
This patch adds basic hw_ops layout for A2.
Actual implementation will be added in the follow-up patches.
Signed-off-by: Igor Russkikh
Signed-off-by: Mark Starovoytov
---
.../net/ethernet/aquantia/atlantic/Makefile | 1 +
.../net/ethernet/aquantia/atlantic/aq_hw.h| 1 +
.../ethernet/
From: Dmitry Bogdanov
This patch adds the minimum set of FW ops for A2.
Signed-off-by: Dmitry Bogdanov
Co-developed-by: Igor Russkikh
Signed-off-by: Igor Russkikh
Signed-off-by: Mark Starovoytov
---
.../net/ethernet/aquantia/atlantic/Makefile | 1 +
.../atlantic/hw_atl2/hw_atl2_internal
This patch adds basic A2 HW initialization / deinitialization.
Signed-off-by: Igor Russkikh
Co-developed-by: Dmitry Bogdanov
Signed-off-by: Dmitry Bogdanov
Signed-off-by: Mark Starovoytov
---
.../net/ethernet/aquantia/atlantic/aq_nic.c | 3 +-
.../aquantia/atlantic/hw_atl/hw_atl_b0.c
Chip generations are mostly compatible register-wise, but there are still
some differences. Therefore we've made some of first generation (A1) code
non-static to re-use it where possible.
Some pieces are A2 specific, in which case we redefine/extend such APIs.
Signed-off-by: Igor Russkikh
Signed
From: Dmitry Bogdanov
This patch adds common functions (mostly FW-related), which are
needed for basic A2 HW initialization / deinitialization.
Signed-off-by: Dmitry Bogdanov
Co-developed-by: Igor Russkikh
Signed-off-by: Igor Russkikh
Signed-off-by: Mark Starovoytov
---
.../net/ethernet/aqu
On Thu, Apr 30, 2020 at 04:14 AM CEST, Andrii Nakryiko wrote:
> Some versions of GCC falsely detect that vi might not be initialized. That's
> not true, but let's silence it with NULL initialization.
>
> Signed-off-by: Andrii Nakryiko
> ---
> tools/lib/bpf/libbpf.c | 2 +-
> 1 file changed, 1 ins
Fix to return negative error code -EFAULT from the copy_to_user() error
handling case instead of 0, as done elsewhere in this function.
Fixes: bd513cd08f10 ("bpf: add MAP_LOOKUP_AND_DELETE_ELEM syscall")
Signed-off-by: Wei Yongjun
---
kernel/bpf/syscall.c | 4 +++-
1 file changed, 3 insertions(+
On Thu, Apr 30, 2020 at 07:00:58AM +0200, Oleksij Rempel wrote:
> > > diff --git a/include/uapi/linux/ethtool.h b/include/uapi/linux/ethtool.h
> > > index 92f737f101178..eb680e3d6bda5 100644
> > > --- a/include/uapi/linux/ethtool.h
> > > +++ b/include/uapi/linux/ethtool.h
> > > @@ -1666,6 +1666,31
Hi,
This series adds phylink 10G support for the 88E6390 series switches,
as suggested by Andrew Lunn.
The first patch cleans up the code to use generic definitions for the
registers in a similar way to what was done with the initial conversion
of 1G serdes support.
The second patch adds the nec
Add support for reading and reporting the 10G link status on the
88e6390 in addition to the 1000BASE-X/2500BASE-X/SGMII status.
Signed-off-by: Russell King
---
drivers/net/dsa/mv88e6xxx/serdes.c | 43 --
drivers/net/dsa/mv88e6xxx/serdes.h | 1 +
2 files changed, 42 i
The private MV88E6390_PCS_CONTROL_1 definitions in serdes.h reflects
the IEEE 802.3 standard PCS control register 1 definitions, only
offset by 0x1000 in the PHYXS register space. Rather than inventing
our own, use those that already exist, and name the register
MV88E6390_10G_CTRL1.
Signed-off-by
On 4/30/2020 3:12 AM, Jakub Kicinski wrote:
On Wed, 29 Apr 2020 15:54:49 -0700 Saeed Mahameed wrote:
From: Tariq Toukan
SKBs of TLS records might have empty zero-sized frags.
Why? Let's fix that instead of adding checks to drivers.
Hi Jakub,
The HW spec requires the DUMP size to be no
Hi Jia,
thanks for the patch, some comments below:
On Thu, Apr 30, 2020 at 10:13:14AM +0800, Jia He wrote:
> Ning Bo reported an abnormal 2-second gap when booting Kata container [1].
> The unconditional timeout is caused by VSOCK_DEFAULT_CONNECT_TIMEOUT of
> connect at client side. The vhost vsoc
hi,
On Wed, 2020-04-29 at 11:56 -0700, David Miller wrote:
> From: Paolo Abeni
> Date: Wed, 29 Apr 2020 12:50:37 +0200
>
> > Fixes: 20882e2cb904 ("mptcp: avoid flipping mp_capable field in
> > syn_recv_sock()")
>
> [davem@localhost net]$ git describe 20882e2cb904
> fatal: Not a valid object na
On Wed, 2020-04-29 at 11:54 -0700, Mat Martineau wrote:
> On Wed, 29 Apr 2020, Paolo Abeni wrote:
[...]
> > Fixes: 648ef4b88673 ("mptcp: Implement MPTCP receive path")
> > Signed-off-by: Paolo Abeni
> > ---
>
> Hi Paolo -
>
> This doesn't apply cleanly to the net tree.
I'm sorry, I had local u
Thank you Andrew,
I will do that. Sorry for the trouble.
Best regards,
Laurent
>
-
Eaton Industries Manufacturing GmbH ~ Registered place of business: Route de la
Longeraie 7, 1110, Morges, Switzerland
-
-Original Message-
> F
This patch adds the driver for the MDIO interface
inside of Qualcomm IPQ40xx series SoC-s.
Signed-off-by: Christian Lamparter
Signed-off-by: Robert Marko
Reviewed-by: Andrew Lunn
Reviewed-by: Florian Fainelli
Cc: Luka Perkov
---
Changes from v3 to v4:
* Change compatible and references to
This patch series provides support for the IPQ40xx built-in MDIO interface.
Included are driver, devicetree bindings for it and devicetree node.
Robert Marko (3):
net: phy: mdio: add IPQ4019 MDIO driver
dt-bindings: add Qualcomm IPQ4019 MDIO bindings
ARM: dts: qcom: ipq4019: add MDIO node
This patch adds the binding document for the IPQ40xx MDIO driver.
Signed-off-by: Robert Marko
Reviewed-by: Andrew Lunn
Reviewed-by: Florian Fainelli
Cc: Luka Perkov
---
Changes from v3 to v4:
* Change compatible to IPQ4019
Changes from v2 to v3:
* Remove status from example
.../bindings/net
This patch adds the necessary MDIO interface node
to the Qualcomm IPQ4019 DTSI.
Built-in QCA8337N switch is managed using it,
and since we have a driver for it lets add it.
Signed-off-by: Christian Lamparter
Signed-off-by: Robert Marko
Reviewed-by: Andrew Lunn
Reviewed-by: Florian Fainelli
Cc
On 2020-04-24 09:47:33 [+0100], Colin King wrote:
> From: Colin Ian King
>
> There are spelling mistakes in two rtw_err error messages. Fix them.
>
> Signed-off-by: Colin Ian King
Acked-by: Sebastian Andrzej Siewior
Sebastian
>
-
Eaton Industries Manufacturing GmbH ~ Registered place of business: Route de la
Longeraie 7, 1110, Morges, Switzerland
-
-Original Message-
> From: Heiner Kallweit
> Sent: Wednesday, April 29, 2020 7:06 PM
> To: Badel, Laur
On Wed, Apr 29, 2020 at 09:33:04PM -0400, Rylan Dmello wrote:
> As suggested by Joe Perches, this patch removes the 'exit' label
> from the ql_set_mac_addr_reg function and replaces the goto
> statements with break statements.
>
> Signed-off-by: Rylan Dmello
> ---
> drivers/staging/qlge/qlge_mai
Hello,
syzbot found the following crash on:
HEAD commit:449e14bf bpf: Fix unused variable warning
git tree: bpf-next
console output: https://syzkaller.appspot.com/x/log.txt?x=109eb5f810
kernel config: https://syzkaller.appspot.com/x/.config?x=16d87c420507d444
dashboard link: https:
On Mon, 27 Apr 2020 13:50:15 +0800
Jason Wang wrote:
> On 2020/4/23 上午12:09, Jesper Dangaard Brouer wrote:
> > In vhost_net_build_xdp() the 'buf' that gets queued via an xdp_buff
> > have embedded a struct tun_xdp_hdr (located at xdp->data_hard_start)
> > which contains the buffer length 'buflen'
On Thu, 2020-04-30 at 12:38 +0300, Dan Carpenter wrote:
> On Wed, Apr 29, 2020 at 09:33:04PM -0400, Rylan Dmello wrote:
> > As suggested by Joe Perches, this patch removes the 'exit' label
> > from the ql_set_mac_addr_reg function and replaces the goto
> > statements with break statements.
[]
> > d
On Mon, 20 Apr 2020, Joe Perches wrote:
> On Mon, 2020-04-20 at 16:29 +0100, Alan Maguire wrote:
> > On Sat, 18 Apr 2020, Alexei Starovoitov wrote:
> >
> > > On Fri, Apr 17, 2020 at 11:42:34AM +0100, Alan Maguire wrote:
> > > > The printk family of functions support printing specific pointer type
Hi Stefano
> -Original Message-
> From: Stefano Garzarella
> Sent: Thursday, April 30, 2020 4:26 PM
> To: Justin He
> Cc: Stefan Hajnoczi ; Michael S. Tsirkin
> ; Jason Wang ;
> k...@vger.kernel.org; virtualizat...@lists.linux-foundation.org;
> netdev@vger.kernel.org; linux-ker...@vger.k
On Thu, Apr 30, 2020 at 03:03:07AM -0700, Joe Perches wrote:
> On Thu, 2020-04-30 at 12:38 +0300, Dan Carpenter wrote:
> > On Wed, Apr 29, 2020 at 09:33:04PM -0400, Rylan Dmello wrote:
> > > As suggested by Joe Perches, this patch removes the 'exit' label
> > > from the ql_set_mac_addr_reg function
On Tue, 28 Apr 2020 17:50:11 +0800
Jason Wang wrote:
> We tried to reserve space for vnet header before
> xdp.data_hard_start. But this is useless since the packet could be
> modified by XDP which may invalidate the information stored in the
> header and there's no way for XDP to know the existen
From: Yunjian Wang
The method ndo_start_xmit() returns a value of type netdev_tx_t. Fix
the ndo function to use the correct type.
Signed-off-by: Yunjian Wang
---
net/caif/chnl_net.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/net/caif/chnl_net.c b/net/caif/chnl_net.c
When the probe code was failing for any reason ENOTSUP was returned, even
if this was due to no having enough lock space. This patch fixes this by
returning EPERM to the user application, so it can respond and increase
the RLIMIT_MEMLOCK size.
Signed-off-by: Eelco Chaudron
---
tools/lib/bpf/libb
On Thu, Apr 30, 2020 at 07:59:41AM +, claudiu.bez...@microchip.com wrote:
>
>
> On 27.04.2020 13:51, Andy Shevchenko wrote:
> > EXTERNAL EMAIL: Do not click links or open attachments unless you know the
> > content is safe
> >
> > The commit e6a41c23df0d, while trying to fix an issue,
> >
On Tue, Apr 28, 2020 at 07:14:52AM +0100, Jianyong Wu wrote:
> On 2020/4/24 6:39 PM, Mark Rutland wrote:
> > On Fri, Apr 24, 2020 at 03:50:22AM +0100, Jianyong Wu wrote:
> >> On 2020/4/21 5:57 PM, Mark Rutland wrote:
> >>> On Tue, Apr 21, 2020 at 11:23:00AM +0800, Jianyong Wu wrote:
> diff --g
gcc-10 warns about functions that return a pointer to a stack
variable. In chcr_write_cpl_set_tcb_ulp(), this does not actually
happen, but it's too hard to see for the compiler:
drivers/crypto/chelsio/chcr_ktls.c: In function
'chcr_write_cpl_set_tcb_ulp.constprop':
drivers/crypto/chelsio/chcr_kt
Check that verifier allows passing a map of type:
BPF_MAP_TYPE_REUSEPORT_SOCKARRARY, or
BPF_MAP_TYPE_SOCKMAP, or
BPF_MAP_TYPE_SOCKHASH
... to bpf_sk_select_reuseport helper.
Suggested-by: John Fastabend
Signed-off-by: Jakub Sitnicki
---
tools/testing/selftests/bpf/test_verifier.c | 12
Eelco Chaudron writes:
> When the probe code was failing for any reason ENOTSUP was returned, even
> if this was due to no having enough lock space. This patch fixes this by
> returning EPERM to the user application, so it can respond and increase
> the RLIMIT_MEMLOCK size.
>
> Signed-off-by: Eel
On Wed, Apr 29, 2020 at 09:23 PM CEST, John Fastabend wrote:
> Jakub Sitnicki wrote:
>> Now that bpf_map_lookup_elem() is white-listed for SOCKMAP/SOCKHASH,
>> replace the tests which check that verifier prevents lookup on these map
>> types with ones that ensure that lookup operation is permitted,
On Wed, Apr 29, 2020 at 10:52:35PM +0200, Stefan Priebe - Profihost AG wrote:
> Hello,
>
> while running a stable vanilla kernel 4.19.115 i'm reproducably get this
> one:
>
> watchdog: BUG: soft lockup - CPU#38 stuck for 22s! [bridge:3570653]
>
> ...
>
> Call
> Trace:nbp_vlan_delete+0x59/0xa0br
On 2020-04-28 8:24 AM, xiangxia.m@gmail.com wrote:
> From: Tonghao Zhang
>
> Introduce the mlx5e_eswitch_rep_uplink_priv helper
> to make the codes readable.
>
> Signed-off-by: Tonghao Zhang
> ---
> drivers/net/ethernet/mellanox/mlx5/core/en/tc_ct.c | 4 +--
> drivers/net/ethernet/mell
On 2020-04-28 8:24 AM, xiangxia.m@gmail.com wrote:
> From: Tonghao Zhang
>
> Signed-off-by: Tonghao Zhang
> ---
> drivers/net/ethernet/mellanox/mlx5/core/en_rep.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en_rep.c
>
This driver uses full PAGE_SIZE pages when XDP is enabled.
In case of XDP uses driver uses __bnxt_alloc_rx_page which does full
page DMA-map. Thus, xdp_adjust_tail grow is DMA compliant for XDP_TX
action that does DMA-sync.
Cc: Michael Chan
Cc: Andy Gospodarek
Signed-off-by: Jesper Dangaard Bro
Knowing the memory size backing the packet/xdp_frame data area, and
knowing it already have reserved room for skb_shared_info, simplifies
using build_skb significantly.
With this change we no-longer lie about the SKB truesize, but more
importantly a significant larger skb_tailroom is now provided,
This driver uses RX page-split when possible. It was recently fixed
in commit 86e85bf6981c ("sfc: fix XDP-redirect in this driver") to
add needed tailroom for XDP-redirect.
After the fix efx->rx_page_buf_step is the frame size, with enough
head and tail-room for XDP-redirect.
Signed-off-by: Jespe
XDP have evolved to support several frame sizes, but xdp_buff was not
updated with this information. The frame size (frame_sz) member of
xdp_buff is introduced to know the real size of the memory the frame is
delivered in.
When introducing this also make it clear that some tailroom is
reserved/req
This marvell driver mvneta uses PAGE_SIZE frames, which makes it
really easy to convert. Driver updates rxq and now frame_sz
once per NAPI call.
This driver takes advantage of page_pool PP_FLAG_DMA_SYNC_DEV that
can help reduce the number of cache-lines that need to be flushed
when doing DMA sync
Use hole in struct xdp_frame, when adding member frame_sz, which keeps
same sizeof struct (32 bytes)
Drivers ixgbe and sfc had bug cases where the necessary/expected
tailroom was not reserved. This can lead to some hard to catch memory
corruption issues. Having the drivers frame_sz this can be det
The SKB "head" pointer points to the data area that contains
skb_shared_info, that can be found via skb_end_pointer(). Given
xdp->data_hard_start have been established (basically pointing to
skb->head), frame size is between skb_end_pointer() and data_hard_start,
plus the size reserved to skb_share
When native XDP redirect into a veth device, the frame arrives in the
xdp_frame structure. It is then processed in veth_xdp_rcv_one(),
which can run a new XDP bpf_prog on the packet. Doing so requires
converting xdp_frame to xdp_buff, but the tricky part is that
xdp_frame memory area is located in
On 30/04/2020 13:55, Ido Schimmel wrote:
> On Wed, Apr 29, 2020 at 10:52:35PM +0200, Stefan Priebe - Profihost AG wrote:
>> Hello,
>>
>> while running a stable vanilla kernel 4.19.115 i'm reproducably get this
>> one:
>>
>> watchdog: BUG: soft lockup - CPU#38 stuck for 22s! [bridge:3570653]
>>
>> .
From: Ilias Apalodimas
This driver takes advantage of page_pool PP_FLAG_DMA_SYNC_DEV that
can help reduce the number of cache-lines that need to be flushed
when doing DMA sync for_device. Due to xdp_adjust_tail can grow the
area accessible to the by the CPU (can possibly write into), then max
syn
The tun driver have two code paths for running XDP (bpf_prog_run_xdp).
In both cases 'buflen' contains enough tailroom for skb_shared_info.
Cc: Jason Wang
Signed-off-by: Jesper Dangaard Brouer
Acked-by: Jason Wang
---
drivers/net/tun.c |2 ++
1 file changed, 2 insertions(+)
diff --git a/d
The driver qede uses a full page, when XDP is enabled. The drivers value
in rx_buf_seg_size (struct qede_rx_queue) will be PAGE_SIZE when an
XDP bpf_prog is attached.
Cc: Ariel Elior
Cc: gr-everest-linux...@marvell.com
Signed-off-by: Jesper Dangaard Brouer
---
drivers/net/ethernet/qlogic/qede/q
The netronome nfp driver use PAGE_SIZE when xdp_prog is set, but
xdp.data_hard_start begins at offset NFP_NET_RX_BUF_HEADROOM.
Thus, adjust for this when setting xdp.frame_sz, as it counts
from data_hard_start.
When doing XDP_TX this driver is smart and instead of a full DMA-map
does a DMA-sync on
The mlx4 drivers size of memory backing the RX packet is stored in
frag_stride. For XDP mode this will be PAGE_SIZE (normally 4096).
For normal mode frag_stride is 2048.
Also adjust MLX4_EN_MAX_XDP_MTU to take tailroom into account.
Cc: Tariq Toukan
Cc: Saeed Mahameed
Signed-off-by: Jesper Dang
The hyperv NIC drivers XDP implementation is rather disappointing as it
will be a slowdown to enable XDP on this driver, given it will allocate a
new page for each packet and copy over the payload, before invoking the
XDP BPF-prog.
The positive thing it that its easy to determine the xdp.frame_sz.
The veth driver can run XDP in "native" mode in it's own NAPI
handler, and since commit 9fc8d518d9d5 ("veth: Handle xdp_frames in
xdp napi ring") packets can come in two forms either xdp_frame or
skb, calling respectively veth_xdp_rcv_one() or veth_xdp_rcv_skb().
For packets to arrive in xdp_frame
Frame size ENA_PAGE_SIZE is limited to 16K on systems with larger
PAGE_SIZE than 16K. Change ENA_XDP_MAX_MTU to also take into account
the reserved tailroom.
Cc: Arthur Kiyanovski
Acked-by: Sameeh Jubran
Signed-off-by: Jesper Dangaard Brouer
---
drivers/net/ethernet/amazon/ena/ena_netdev.c |
To help reviewers these are the defines related to RCV_FRAG_LEN
#define DMA_BUFFER_LEN 1536 /* In multiples of 128bytes */
#define RCV_FRAG_LEN (SKB_DATA_ALIGN(DMA_BUFFER_LEN + NET_SKB_PAD) + \
SKB_DATA_ALIGN(sizeof(struct skb_shared_info)))
Cc: Sunil Goutham
Cc: Rob
The dpaa2-eth driver reserve some headroom used for hardware and
software annotation area in RX/TX buffers. Thus, xdp.data_hard_start
doesn't start at page boundary.
When XDP is configured the area reserved via dpaa2_fd_get_offset(fd) is
448 bytes of which XDP have reserved 256 bytes. As frame_sz
In vhost_net_build_xdp() the 'buf' that gets queued via an xdp_buff
have embedded a struct tun_xdp_hdr (located at xdp->data_hard_start)
which contains the buffer length 'buflen' (with tailroom for
skb_shared_info). Also storing this buflen in xdp->frame_sz, does not
obsolete struct tun_xdp_hdr, as
The driver code cpsw.c and cpsw_new.c both use page_pool
with default order-0 pages or their RX-pages.
Cc: Grygorii Strashko
Cc: Ilias Apalodimas
Signed-off-by: Jesper Dangaard Brouer
Reviewed-by: Grygorii Strashko
---
drivers/net/ethernet/ti/cpsw.c |1 +
drivers/net/ethernet/ti/cpsw_
The virtio_net driver is running inside the guest-OS. There are two
XDP receive code-paths in virtio_net, namely receive_small() and
receive_mergeable(). The receive_big() function does not support XDP.
In receive_small() the frame size is available in buflen. The buffer
backing these frames are a
This patch mirrors the changes to ixgbe in previous patch.
This VF driver doesn't support XDP_REDIRECT, but correct tailroom is
still necessary for BPF-helper xdp_adjust_tail. In legacy-mode +
larger PAGE_SIZE, due to lacking tailroom, we accept that
xdp_adjust_tail shrink doesn't work.
Cc: inte
The ixgbe driver have another memory model when compiled on archs with
PAGE_SIZE above 4096 bytes. In this mode it doesn't split the page in
two halves, but instead increment rx_buffer->page_offset by truesize of
packet (which include headroom and tailroom for skb_shared_info).
This is done correc
Update the memory requirements, when adding xdp.frame_sz in BPF test_run
function bpf_prog_test_run_xdp() which e.g. is used by XDP selftests.
Specifically add the expected reserved tailroom, but also allocated a
larger memory area to reflect that XDP frames usually comes in this
format. Limit the
Extend BPF selftest xdp_adjust_tail with grow tail tests, which is added
as subtest's. The first grow test stays in same form as original shrink
test. The second grow test use the newer bpf_prog_test_run_xattr() calls,
and does extra checking of data contents.
Signed-off-by: Jesper Dangaard Brouer
Finally, after all drivers have a frame size, allow BPF-helper
bpf_xdp_adjust_tail() to grow or extend packet size at frame tail.
Remember that helper/macro xdp_data_hard_end have reserved some
tailroom. Thus, this helper makes sure that the BPF-prog don't have
access to this tailroom area.
V2:
Clearing memory of tail when grow happens, because it is too easy
to write a XDP_PASS program that extend the tail, which expose
this memory to users that can run tcpdump.
Signed-off-by: Jesper Dangaard Brouer
Acked-by: Toke Høiland-Jørgensen
---
net/core/filter.c |4
1 file changed, 4
The mlx5 driver have multiple memory models, which are also changed
according to whether a XDP bpf_prog is attached.
The 'rx_striding_rq' setting is adjusted via ethtool priv-flags e.g.:
# ethtool --set-priv-flags mlx5p2 rx_striding_rq off
On the general case with 4K page_size and regular MTU pa
Intel drivers implement native AF_XDP zerocopy in separate C-files,
that have its own invocation of bpf_prog_run_xdp(). The setup of
xdp_buff is also handled in separately from normal code path.
This patch update XDP frame_sz for AF_XDP zerocopy drivers i40e, ice
and ixgbe, as the code changes nee
This driver uses different memory models depending on PAGE_SIZE at
compile time. For PAGE_SIZE 4K it uses page splitting, meaning for
normal MTU frame size is 2048 bytes (and headroom 192 bytes). For
larger MTUs the driver still use page splitting, by allocating
order-1 pages (8192 bytes) for RX fr
This driver uses different memory models depending on PAGE_SIZE at
compile time. For PAGE_SIZE 4K it uses page splitting, meaning for
normal MTU frame size is 2048 bytes (and headroom 192 bytes). For
larger MTUs the driver still use page splitting, by allocating
order-1 pages (8192 bytes) for RX fr
Current selftest for BPF-helper xdp_adjust_tail only shrink tail.
Make it more clear that this is a shrink test case.
Signed-off-by: Jesper Dangaard Brouer
---
.../selftests/bpf/prog_tests/xdp_adjust_tail.c |9 +-
.../testing/selftests/bpf/progs/test_adjust_tail.c | 30
This driver uses different memory models depending on PAGE_SIZE at
compile time. For PAGE_SIZE 4K it uses page splitting, meaning for
normal MTU frame size is 2048 bytes (and headroom 192 bytes). For
larger MTUs the driver still use page splitting, by allocating
order-1 pages (8192 bytes) for RX fr
From: Yunjian Wang
The method ndo_start_xmit() returns a value of type netdev_tx_t. Fix
the ndo function to use the correct type.
Signed-off-by: Yunjian Wang
---
drivers/net/rionet.c | 3 ++-
1 file changed, 2 insertions(+), 1 deletion(-)
diff --git a/drivers/net/rionet.c b/drivers/net/rionet
1 - 100 of 570 matches
Mail list logo