From: Madhuparna Bhowmik
This patch fixes the following warning:
=
WARNING: suspicious RCU usage
5.7.0-rc4-next-20200507-syzkaller #0 Not tainted
-
net/ipv6/ip6mr.c:124 RCU-list traversed in non-reader section!!
ipmr_new_table() returns an
On Wed, May 13, 2020 at 12:00:10PM -0700, David Miller wrote:
> From: madhuparnabhowmi...@gmail.com
> Date: Wed, 13 May 2020 11:46:10 +0530
>
> > From: Madhuparna Bhowmik
> >
> > This patch fixes the following warning:
> >
> > =
> > WARNING: suspicious RCU usage
> >
On Tue, May 12, 2020 at 10:22:01AM +0200, Oleksij Rempel wrote:
> So I think we should pass raw SQI value to user space, at least in the
> first implementation.
> What do you think about this?
Hi Oleksij,
I had a check about the background of this SQI thing. The table you reference
with concre
On 5/13/20 12:24 PM, John Fastabend wrote:
Often it is useful when applying policy to know something about the
task. If the administrator has CAP_SYS_ADMIN rights then they can
use kprobe + sk_msg and link the two programs together to accomplish
this. However, this is a bit clunky and also mea
On 5/13/20 12:24 PM, John Fastabend wrote:
Add helpers to use local socket storage.
Signed-off-by: John Fastabend
---
include/uapi/linux/bpf.h |2 ++
net/core/filter.c| 15 +++
2 files changed, 17 insertions(+)
diff --git a/include/uapi/linux/bpf.h b/include/ua
Patch 1: Fixes the warnings seen when compiling using sparse tool.
Patch 2: Fixes a cocci check error introduced after commit
567be3a5d227 ("crypto: chelsio - Use multiple txq/rxq per
tfm to process the requests").
Ayush Sawal (2):
Crypto/chcr: Fixes compilations warnings
Crypto/chcr: Fixes
This patch fixes the compilation warnings displayed by sparse tool for
chcr driver.
Signed-off-by: Ayush Sawal
---
drivers/crypto/chelsio/chcr_algo.c | 8
drivers/crypto/chelsio/chcr_ipsec.c | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/drivers/crypto/chelsio/c
This fixes an error observed after running coccinile
check.
drivers/crypto/chelsio/chcr_algo.c:1462:5-8: Unneeded variable:
"err". Return "0" on line 1480
This line is missed in the commit 567be3a5d227 ("crypto:
chelsio - Use multiple txq/rxq per tfm to process the requests").
Fixes: 567be3a5d227
On Tue, Apr 28, 2020 at 02:32:45PM +0800, Jason Yan wrote:
> Fix the following coccicheck warning:
>
> arch/mips/kvm/tlb.c:472:2-3: Unneeded semicolon
> arch/mips/kvm/tlb.c:489:2-3: Unneeded semicolon
>
> Signed-off-by: Jason Yan
> ---
> arch/mips/kvm/tlb.c | 4 ++--
> 1 file changed, 2 inserti
From: Bartosz Golaszewski
This adds the driver for the MediaTek Ethernet MAC used on the MT8* SoC
family. For now we only support full-duplex.
Signed-off-by: Bartosz Golaszewski
---
drivers/net/ethernet/mediatek/Kconfig |6 +
drivers/net/ethernet/mediatek/Makefile |1 +
driv
From: Bartosz Golaszewski
This adds support for the PERICFG register range as a syscon. This will
soon be used by the MediaTek Ethernet MAC driver for NIC configuration.
Signed-off-by: Bartosz Golaszewski
---
arch/arm64/boot/dts/mediatek/mt8516.dtsi | 5 +
1 file changed, 5 insertions(+)
From: Bartosz Golaszewski
Add remaining properties to the ethernet node and enable it.
Signed-off-by: Bartosz Golaszewski
---
.../boot/dts/mediatek/pumpkin-common.dtsi | 18 ++
1 file changed, 18 insertions(+)
diff --git a/arch/arm64/boot/dts/mediatek/pumpkin-common.dtsi
From: Bartosz Golaszewski
There's currently only a single devres helper in net/ - devm variant
of alloc_etherdev. Let's move it to net/devres.c with the intention of
assing a second one: devm_register_netdev(). This new routine will need
to know the address of the release function of devm_alloc_e
From: Bartosz Golaszewski
Provide devm_register_netdev() - a device resource managed variant
of register_netdev(). This new helper will only work for net_device
structs that are also already managed by devres.
Signed-off-by: Bartosz Golaszewski
---
.../driver-api/driver-model/devres.rst
From: Bartosz Golaszewski
Add the ethernet0 alias for ethernet so that u-boot can find this node
and fill in the MAC address.
Signed-off-by: Bartosz Golaszewski
---
arch/arm64/boot/dts/mediatek/pumpkin-common.dtsi | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm64/boot/dts/mediatek
From: Bartosz Golaszewski
Add the Ethernet MAC node to mt8516.dtsi. This defines parameters common
to all the boards based on this SoC.
Signed-off-by: Bartosz Golaszewski
---
arch/arm64/boot/dts/mediatek/mt8516.dtsi | 12
1 file changed, 12 insertions(+)
diff --git a/arch/arm64/b
From: Bartosz Golaszewski
Add a new section for networking devres helpers to devres.rst and list
the two existing devm functions.
Signed-off-by: Bartosz Golaszewski
---
Documentation/driver-api/driver-model/devres.rst | 4
1 file changed, 4 insertions(+)
diff --git a/Documentation/driver
From: Bartosz Golaszewski
Not using a proxy structure to store struct net_device doesn't save
anything in terms of compiled code size or memory usage but significantly
decreases the readability of the code with all the pointer casting.
Define struct net_device_devres and use it in devm_alloc_eth
From: Bartosz Golaszewski
The Makefile formatting in the kernel tree usually doesn't use tabs,
so remove them before we add a second driver.
Signed-off-by: Bartosz Golaszewski
---
drivers/net/ethernet/mediatek/Makefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers
From: Bartosz Golaszewski
We'll soon by adding a second MediaTek Ethernet driver so modify the
Kconfig prompt.
Signed-off-by: Bartosz Golaszewski
---
drivers/net/ethernet/mediatek/Kconfig | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/ethernet/mediatek/Kconfig
From: Bartosz Golaszewski
Setup the pin control for the Ethernet MAC.
Signed-off-by: Bartosz Golaszewski
---
arch/arm64/boot/dts/mediatek/pumpkin-common.dtsi | 15 +++
1 file changed, 15 insertions(+)
diff --git a/arch/arm64/boot/dts/mediatek/pumpkin-common.dtsi
b/arch/arm64/boot
From: Bartosz Golaszewski
This adds yaml DT bindings for the MediaTek Ethernet MAC present on the
mt8* family of SoCs.
Signed-off-by: Bartosz Golaszewski
---
.../bindings/net/mediatek,eth-mac.yaml| 89 +++
1 file changed, 89 insertions(+)
create mode 100644 Documentati
From: Bartosz Golaszewski
This adds support for the Ethernet Controller present on MediaTeK SoCs from
the MT8* family.
First we convert the existing DT bindings for the PERICFG controller to YAML
and add a new compatible string for mt8516 variant of it. Then we add the DT
bindings for the MAC.
From: Bartosz Golaszewski
The PERICFG controller is present on the MT8516 SoC. Add an appropriate
compatible variant.
Signed-off-by: Bartosz Golaszewski
---
.../devicetree/bindings/arm/mediatek/mediatek,pericfg.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git
a/Documentation/devic
From: Bartosz Golaszewski
Convert the DT binding .txt file for MediaTek's peripheral configuration
controller to YAML. There's one special case where the compatible has
three positions. Otherwise, it's a pretty normal syscon.
Signed-off-by: Bartosz Golaszewski
---
.../arm/mediatek/mediatek,per
On 5/13/20 9:24 PM, John Fastabend wrote:
Often it is useful when applying policy to know something about the
task. If the administrator has CAP_SYS_ADMIN rights then they can
use kprobe + sk_msg and link the two programs together to accomplish
this. However, this is a bit clunky and also means w
On Wed, May 13, 2020 at 11:29:40AM -0700, Alexei Starovoitov wrote:
SNIP
> > diff --git a/scripts/link-vmlinux.sh b/scripts/link-vmlinux.sh
> > index d09ab4afbda4..dee91c6bf450 100755
> > --- a/scripts/link-vmlinux.sh
> > +++ b/scripts/link-vmlinux.sh
> > @@ -130,16 +130,26 @@ gen_btf()
> > i
From: Marcelo Ricardo Leitner
> Sent: 13 May 2020 19:01
> On Wed, May 13, 2020 at 08:26:42AM +0200, Christoph Hellwig wrote:
> > And call it directly from dlm instead of going through kernel_setsockopt.
>
> The advantage on using kernel_setsockopt here is that sctp module will
> only be loaded if
Hi Christian,
On Thu, May 14, 2020 at 07:13:30AM +, Christian Herber wrote:
> On Tue, May 12, 2020 at 10:22:01AM +0200, Oleksij Rempel wrote:
>
> > So I think we should pass raw SQI value to user space, at least in the
> > first implementation.
>
> > What do you think about this?
>
> Hi Ole
From: Joe Perches
> Sent: 13 May 2020 18:39
> On Wed, 2020-05-13 at 08:26 +0200, Christoph Hellwig wrote:
> > this series removes the kernel_setsockopt and kernel_getsockopt
> > functions, and instead switches their users to small functions that
> > implement setting (or in one case getting) a sock
Overview
Driver adoption for AF_XDP has been slow. The amount of code required
to proper support AF_XDP is substantial and the driver/core APIs are
vague or even non-existing. Drivers have to manually adjust data
offsets, updating AF_XDP handles differently for different modes
(aligned/un
From: Björn Töpel
The XSKMAP is partly implemented by net/xdp/xsk.c. Move xskmap.c from
kernel/bpf/ to net/xdp/, which is the logical place for AF_XDP related
code. Also, move AF_XDP struct definitions, and function declarations
only used by AF_XDP internals into net/xdp/xsk.h.
Signed-off-by: Bj
From: Björn Töpel
Move the XSK_NEXT_PG_CONTIG_{MASK,SHIFT}, and
XDP_UMEM_USES_NEED_WAKEUP defines from xdp_sock.h to the AF_XDP
internal xsk.h file. Also, start using the BIT{,_ULL} macro instead of
explicit shifts.
Signed-off-by: Björn Töpel
---
include/net/xdp_sock.h | 14 --
net
From: Magnus Karlsson
Move the AF_XDP zero-copy driver interface to its own include file
called xdp_sock_drv.h. This, hopefully, will make it more clear for
NIC driver implementors to know what functions to use for zero-copy
support.
Signed-off-by: Magnus Karlsson
---
drivers/net/ethernet/inte
From: Björn Töpel
Remove MEM_TYPE_ZERO_COPY in favor of the new MEM_TYPE_XSK_BUFF_POOL
APIs. The AF_XDP zero-copy rx_bi ring is now simply a struct xdp_buff
pointer.
Cc: intel-wired-...@lists.osuosl.org
Signed-off-by: Björn Töpel
---
drivers/net/ethernet/intel/i40e/i40e_main.c | 19 +-
driver
From: Björn Töpel
Continuing the path to support MEM_TYPE_XSK_BUFF_POOL, the AF_XDP
zero-copy/sk_buff rx_bi rings are now separate. Functions to properly
allocate the different rings are added as well.
Cc: intel-wired-...@lists.osuosl.org
Signed-off-by: Björn Töpel
---
drivers/net/ethernet/int
From: Björn Töpel
Remove MEM_TYPE_ZERO_COPY in favor of the new MEM_TYPE_XSK_BUFF_POOL
APIs.
Cc: intel-wired-...@lists.osuosl.org
Signed-off-by: Maciej Fijalkowski
Signed-off-by: Björn Töpel
---
drivers/net/ethernet/intel/ice/ice_base.c | 16 +-
drivers/net/ethernet/intel/ice/ice_txrx.h |
From: Björn Töpel
As a first step to migrate i40e to the new MEM_TYPE_XSK_BUFF_POOL
APIs, code that accesses the rx_bi (SW/shadow ring) is refactored to
use an accessor function.
Cc: intel-wired-...@lists.osuosl.org
Signed-off-by: Björn Töpel
---
drivers/net/ethernet/intel/i40e/i40e_txrx.c | 1
From: Björn Töpel
Remove MEM_TYPE_ZERO_COPY in favor of the new MEM_TYPE_XSK_BUFF_POOL
APIs.
v1->v2: Fixed xdp_buff data_end update. (Björn)
Cc: intel-wired-...@lists.osuosl.org
Signed-off-by: Björn Töpel
---
drivers/net/ethernet/intel/ixgbe/ixgbe.h | 9 +-
drivers/net/ethernet/intel/i
From: Björn Töpel
The xdp_return_{frame,frame_rx_napi,buff} function are never used,
except in xdp_convert_zc_to_xdp_frame(), by the MEM_TYPE_XSK_BUFF_POOL
memory type.
To simplify and reduce code, change so that
xdp_convert_zc_to_xdp_frame() calls xsk_buff_free() directly since the
type is know
From: Björn Töpel
In order to simplify AF_XDP zero-copy enablement for NIC driver
developers, a new AF_XDP buffer allocation API is added. The
implementation is based on a single core (single producer/consumer)
buffer pool for the AF_XDP UMEM.
A buffer is allocated using the xsk_buff_alloc() fun
From: Björn Töpel
Update MAINTAINERS to correctly mirror the current AF_XDP socket file
layout. Also, add the AF_XDP files of libbpf.
rfc->v1: Sorted file entries. (Joe)
Cc: Joe Perches
Signed-off-by: Björn Töpel
---
MAINTAINERS | 6 +-
1 file changed, 5 insertions(+), 1 deletion(-)
dif
From: Björn Töpel
There are no users of MEM_TYPE_ZERO_COPY. Remove all corresponding
code, including the "handle" member of struct xdp_buff.
rfc->v1: Fixed spelling in commit message. (Björn)
Signed-off-by: Björn Töpel
---
drivers/net/hyperv/netvsc_bpf.c | 1 -
include/net/xdp.h
From: Björn Töpel
Use the new MEM_TYPE_XSK_BUFF_POOL API in lieu of MEM_TYPE_ZERO_COPY in
mlx5e. It allows to drop a lot of code from the driver (which is now
common in AF_XDP core and was related to XSK RX frame allocation, DMA
mapping, etc.) and slightly improve performance.
rfc->v1: Put back
From: Björn Töpel
In order to reduce the number of function calls, the struct
xsk_buff_pool definition is moved to xsk_buff_pool.h. The functions
xp_get_dma(), xp_dma_sync_for_cpu(), xp_dma_sync_for_device(),
xp_validate_desc() and various helper functions are explicitly
inlined.
Further, move x
On Tue, May 14, 2020 at 08:28:00AM +, Oleksij Rempel wrote:
> On Thu, May 14, 2020 at 07:13:30AM +, Christian Herber wrote:
> > On Tue, May 12, 2020 at 10:22:01AM +0200, Oleksij Rempel wrote:
> >
> > > So I think we should pass raw SQI value to user space, at least in the
> > > first implem
On Wed, 13 May 2020 19:43:24 -0700
Linus Torvalds wrote:
> On Wed, May 13, 2020 at 6:00 PM Masami Hiramatsu wrote:
> >
> > > But we should likely at least disallow it entirely on platforms where
> > > we really can't - or pick one hardcoded choice. On sparc, you really
> > > _have_ to specify on
From: Marcelo Ricardo Leitner
> Sent: 13 May 2020 19:03
>
> On Wed, May 13, 2020 at 08:26:47AM +0200, Christoph Hellwig wrote:
> > Add a helper to directly get the SCTP_PRIMARY_ADDR sockopt from kernel
> > space without going through a fake uaccess.
>
> Same comment as on the other dlm/sctp patch
Driver has an ability to initiate a recovery process as a reaction to
detected errors. But the codepath (recovery_process) was disabled and
never active.
Here we add ethtool private flag to allow user have the recovery
procedure activated.
We still do not enable this by default though, since in s
On different hardware events we have to respond differently,
on some of hardware indications hw attention (error condition)
should be cleared by the driver to continue normal functioning.
Here we introduce attention clear flags, and put them on some
important events (in aeu_descs).
Signed-off-by:
On various critical errors, notification handler should also report
the err information into the management firmware.
MFW can interact with server/motherboard backend agents - these are
used by server manufacturers to monitor server HW health.
Thus, it is important for driver to report on any fau
From: Denis Bolotin
Upon tx timeout detection we do disable carrier and print TX queue
info on TX timeout. We then raise hw error condition and trigger
service task to handle this.
This handler will capture extra debug info and then optionally
trigger recovery procedure to try restore function.
FastLinQ devices as a complex systems may observe various hardware
level error conditions, both severe and recoverable.
Driver is able to detect and report this, but so far it only did
trace/dmesg based reporting.
Here we implement an extended hw error detection, service task
handler captures a d
In a number of critical places not only debug trace should be printed,
but the appropriate hw error condition should be raised and error
handling/recovery should start.
Introduce our new qed_hw_err_notify invocation in these places to
record and indicate critical error conditions in hardware.
Sig
qede (ethernet level driver) registers a callback handler.
This handler maintains eth dev state flags/bits to track error processing.
It implements in place processing part for nonsleeping context (WARN_ON
trigger), and a deferred (delayed work) part which triggers recovery
process for recoverable
Here we introduce qed device error tracking flags and error types.
qed_hw_err_notify is an entrace point to report errors.
It'll notify higher level drivers (qede/qedr/etc) to handle and recover
the error.
List of posible errors comes from hardware interfaces, but could be
extended in future.
Si
Fan failure is sent by firmware, driver reacts on this error with
newly introduced notification path. It will collect dump and shut down
the device to prevent physical breakage
Signed-off-by: Ariel Elior
Signed-off-by: Michal Kalderon
Signed-off-by: Igor Russkikh
---
drivers/net/ethernet/qlogi
On some adjacent code, fix bad code formatting
Signed-off-by: Ariel Elior
Signed-off-by: Michal Kalderon
Signed-off-by: Igor Russkikh
---
include/linux/qed/qed_if.h | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/include/linux/qed/qed_if.h b/include/linux/qed/qed_if.h
MCP may signal driver about generic critical failure.
Driver has to collect mdump information (get_retain),
it pushes that to logs and triggers generic notification on
"hardware attention" event.
Signed-off-by: Ariel Elior
Signed-off-by: Michal Kalderon
Signed-off-by: Igor Russkikh
---
drivers
Thats probably a legacy code had double declaration of some fields.
Cleanup this, removing copy and fixing references.
Signed-off-by: Ariel Elior
Signed-off-by: Michal Kalderon
Signed-off-by: Igor Russkikh
---
drivers/net/ethernet/qlogic/qed/qed.h | 11 +++--
drivers/net/ethernet/qlo
From: Daniel Borkmann
> Sent: 14 May 2020 00:59
> On 5/14/20 1:28 AM, Al Viro wrote:
> > On Thu, May 14, 2020 at 12:36:28AM +0200, Daniel Borkmann wrote:
> >
> >>> So on say s390 TASK_SIZE_USUALLy is (-PAGE_SIZE), which means we'd alway
> >>> try the user copy first, which seems odd.
> >>>
> >>> I'
We don't want to disconnect a session because of a stray PADT arriving
while the interface is in promiscuous mode.
Furthermore, multicast and broadcast packets make no sense here, so
only PACKET_HOST is accepted.
Reported-by: David Balažic
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")
Signed-off-by: G
On Thu, May 14, 2020 at 08:29:30AM +, David Laight wrote:
> You need to export functions that do most of the socket options
> for all protocols.
Only for those were we have users, and all those are covered.
On 5/14/20 12:01 PM, David Laight wrote:
[...]
If it's not a stupid question why is a BPF program allowed to get
into a situation where it might have an invalid kernel address.
It all stinks of a hole that allows all of kernel memory to be read
and copied to userspace.
Now you might want to som
From: Christoph Hellwig
> Only for those were we have users, and all those are covered.
What do we tell all our users when our kernel SCTP code
no longer works?
It uses SO_REUSADDR, SCTP_EVENTS, SCTP_NODELAY,
SCTP_STATUS, SCTP_INITMSG, IPV6_ONLY, SCTP_SOCKOPT_BINDX_ADD
and SO_LINGER.
We should pr
On 5/14/20 11:44 AM, Masami Hiramatsu wrote:
On Wed, 13 May 2020 19:43:24 -0700
Linus Torvalds wrote:
On Wed, May 13, 2020 at 6:00 PM Masami Hiramatsu wrote:
But we should likely at least disallow it entirely on platforms where
we really can't - or pick one hardcoded choice. On sparc, you r
On Wed, May 13, 2020 at 12:55:46PM -0700, David Miller wrote:
> From: Florian Fainelli
> Date: Wed, 13 May 2020 10:41:45 -0700
>
> > commit 86f8b1c01a0a537a73d2996615133be63cdf75db upstream
> >
> > Prior to 1d27732f411d ("net: dsa: setup and teardown ports"), we would
> > not treat failures to s
On Wed, May 13, 2020 at 02:13:07PM +0100, David Howells wrote:
> Christoph Hellwig wrote:
>
> > +int rxrpc_sock_set_min_security_level(struct sock *sk, unsigned int val);
> > +
>
> Looks good - but you do need to add this to Documentation/networking/rxrpc.txt
> also, thanks.
That file doesn't e
From: Artem Panfilov
This patch adds support for time stamping external inputs for GMAC3.
The documentation defines 4 auxiliary snapshots ATSEN0 to ATSEN3 which
can be toggled by writing the Timestamp Control Register.
When the gmac detects a pps rising edge on one of it's auxiliary inputs,
an
This patch series covers a use case where an embedded system is
disciplining an internal clock to a GNSS signal, which provides a
stable frequency, and wants to act as a PTP Grandmaster by disciplining
a ptp clock to this internal clock.
In our setup a 10Mhz oscillator is frequency adjusted so tha
This commit enables coarse correction mode for stmmac driver.
The coarse mode allows to update the system time in one process.
The required time adjustment is written in the Timestamp Update registers
while the Sub-second increment register is programmed with the period
of the clock, which is the
This commit allows a user to specify a flag value for configuring
timestamping through hwtsamp_config structure.
New flags introduced:
HWTSTAMP_FLAGS_NONE = 0
No flag specified: as it is of value 0, this will selects the
default behavior for all the existing drivers and should not
On Wed, May 13, 2020 at 02:00:43PM -0700, Joe Perches wrote:
> On Wed, 2020-05-13 at 08:26 +0200, Christoph Hellwig wrote:
> > Add a helper to directly set the IP_RECVERR sockopt from kernel space
> > without going through a fake uaccess.
>
> This seems used only with true as the second arg.
> Is
On Thu, May 14, 2020 at 10:26:41AM +, David Laight wrote:
> From: Christoph Hellwig
> > Only for those were we have users, and all those are covered.
>
> What do we tell all our users when our kernel SCTP code
> no longer works?
We only care about in-tree modules, just like for every other in
On Wed, May 13, 2020 at 03:00:58PM -0300, Marcelo Ricardo Leitner wrote:
> On Wed, May 13, 2020 at 08:26:42AM +0200, Christoph Hellwig wrote:
> > And call it directly from dlm instead of going through kernel_setsockopt.
>
> The advantage on using kernel_setsockopt here is that sctp module will
> o
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
(Patchset based on net-next due to all the driver updates)
V4:
- Fixup checkpatch.pl issues
- Collected more ACKs
V3:
- Fix issue on virtio_net patch spotted by Jason Wang
- Adjust name for variable in mlx5 patch
- Collected more ACKs
V2:
- Fix bug in mlx5 for XDP_PASS case
- Collected nitpicks
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 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
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
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
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
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
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
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,
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
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
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 |
The hyperv NIC driver does memory allocation and copy even without XDP.
In XDP mode 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 XDP implementation for hv_netvsc tran
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
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 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
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: Michael S. Tsirkin
Acked-by: Jason Wang
---
drivers/net/tun.c |2 ++
1 file changed, 2
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
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
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 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 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
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
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
1 - 100 of 456 matches
Mail list logo