Hi Maciej Fijalkowski,
[...]
> > + tx_ctrl.cksum_offload_flag = false;
> > + tx_ctrl.tcp_seg_offload_flag = false;
> > + tx_ctrl.tcp_seg_len = 0;
>
> Aren't these three lines redundant? tx_ctrl is zero initialized.
>
Yea i think i can remove those
> > +
> > + tx_desc.dma_addr = dma_hand
wenxu wrote:
> ns21 iperf to 10.0.0.8 with dport 22 in ns22
> first time with OFFLOAD enable
>
> nft add flowtable bridge firewall fb2 { hook ingress priority 0 \; devices =
> { veth21, veth22 } \; }
> nft add chain bridge firewall ftb-all {type filter hook forward priority 0 \;
> policy accept
Use new bpf_program__attach_perf_event() in test previously relying on
direct ioctl manipulations.
Signed-off-by: Andrii Nakryiko
Reviewed-by: Stanislav Fomichev
---
.../bpf/prog_tests/stacktrace_build_id_nmi.c | 31 +--
1 file changed, 15 insertions(+), 16 deletions(-)
diff -
Convert some existing tests that attach to tracepoints to use
bpf_program__attach_tracepoint API instead.
Signed-off-by: Andrii Nakryiko
Reviewed-by: Stanislav Fomichev
---
.../bpf/prog_tests/stacktrace_build_id.c | 50 ---
.../selftests/bpf/prog_tests/stacktrace_map.c | 43
Add ability to attach to kernel and user probes and retprobes.
Implementation depends on perf event support for kprobes/uprobes.
Signed-off-by: Andrii Nakryiko
---
tools/lib/bpf/libbpf.c | 213 +++
tools/lib/bpf/libbpf.h | 7 ++
tools/lib/bpf/libbpf.map
Add tests verifying kprobe/kretprobe/uprobe/uretprobe APIs work as
expected.
Signed-off-by: Andrii Nakryiko
Reviewed-by: Stanislav Fomichev
---
.../selftests/bpf/prog_tests/attach_probe.c | 155 ++
.../selftests/bpf/progs/test_attach_probe.c | 55 +++
2 files changed, 2
bpf_link is and abstraction of an association of a BPF program and one
of many possible BPF attachment points (hooks). This allows to have
uniform interface for detaching BPF programs regardless of the nature of
link and how it was created. Details of creation and setting up of
a specific bpf_link
bpf_program__attach_perf_event allows to attach BPF program to existing
perf event hook, providing most generic and most low-level way to attach BPF
programs. It returns struct bpf_link, which should be passed to
bpf_link__destroy to detach and free resources, associated with a link.
Signed-off-by
Allow attaching BPF programs to kernel tracepoint BPF hooks specified by
category and name.
Signed-off-by: Andrii Nakryiko
---
tools/lib/bpf/libbpf.c | 78
tools/lib/bpf/libbpf.h | 4 +++
tools/lib/bpf/libbpf.map | 1 +
3 files changed, 83 insertion
It's often inconvenient to switch sign of error when passing it into
libbpf_strerror_r. It's better for it to handle that automatically.
Signed-off-by: Andrii Nakryiko
Reviewed-by: Stanislav Fomichev
---
tools/lib/bpf/str_error.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git
Add a wrapper utilizing bpf_link "infrastructure" to allow attaching BPF
programs to raw tracepoints.
Signed-off-by: Andrii Nakryiko
---
tools/lib/bpf/libbpf.c | 36
tools/lib/bpf/libbpf.h | 3 +++
tools/lib/bpf/libbpf.map | 1 +
3 files changed, 40 ins
This patchset adds the following APIs to allow attaching BPF programs to
tracing entities:
- bpf_program__attach_perf_event for attaching to any opened perf event FD,
allowing users full control;
- bpf_program__attach_kprobe for attaching to kernel probes (both entry and
return probes);
- bpf_p
From: Sergej Benilov
Date: Mon, 24 Jun 2019 23:21:02 +0200
> Before "sis900: fix TX completion" patch, TX completion was done on TxIDLE
> interrupt.
> TX completion also was the only thing done on TxIDLE interrupt.
> Since "sis900: fix TX completion", TX completion is done on TxDESC interrupt.
>
From: Xin Long
Date: Thu, 20 Jun 2019 19:03:41 +0800
> As other udp/ip tunnels do, tipc udp media should also have a
> lockless dst_cache supported on its tx path.
>
> Here we add dst_cache into udp_replicast to support dst cache
> for both rmcast and rcast, and rmcast uses ub->rcast and each
>
> -Original Message-
> From: Guilherme G. Piccoli
> Sent: Thursday, June 27, 2019 10:02 PM
> To: GR-everest-linux-l2 ;
> netdev@vger.kernel.org; Sudarsana Reddy Kalluru
> Cc: Ariel Elior ; gpicc...@canonical.com;
> jay.vosbu...@canonical.com
> Subject: [EXT] [PATCH V4] bnx2x: Prevent pt
__vxlan_dev_create() destroys FDB using specific pointer which indicates
a fdb when error occurs.
But that pointer should not be used when register_netdevice() fails because
register_netdevice() internally destroys fdb when error occurs.
This patch makes vxlan_fdb_create() to do not link fdb entry
I am Vice Chairman of Hang Seng Bank, I have Important Matter to Discuss with
you concerning my late client, Died without a NEXT OF KIN. Send me your private
email for full details information. email me at (chienkraym...@outlook.com)
Mail:infocar...@aim.com
Regards
Dr.Raymond Chien Kuo Fung
Merge commit 1c8c5a9d38f60 ("Merge
git://git.kernel.org/pub/scm/linux/kernel/git/davem/net-next") undid the
fix from commit 36f9814a494 ("bpf: fix uapi hole for 32 bit compat
applications") by taking the gpl_compatible 1-bit field definition from
commit b85fab0e67b162 ("bpf: Add gpl_compatible flag
On Fri, 28 Jun 2019 at 03:33, Roopa Prabhu wrote:
>
> On Thu, Jun 27, 2019 at 7:50 AM Taehee Yoo wrote:
> >
> > __vxlan_dev_create() destroys FDB using specific pointer which indicates
> > a fdb when error occurs.
> > But that pointer should not be used when register_netdevice() fails because
> >
On 6/27/2019 8:58 PM, Pablo Neira Ayuso wrote:
> On Thu, Jun 27, 2019 at 02:22:36PM +0800, wenxu wrote:
>> On 6/27/2019 3:19 AM, Florian Westphal wrote:
>>> Florian Westphal wrote:
> [...]
Whats the idea with this patch?
Do you see a performance improvement when bypassing bridge l
> From: Patel, Vedang
> Sent: Tuesday, June 25, 2019 3:07 PM
> To: netdev@vger.kernel.org
> Cc: Kirsher, Jeffrey T ; da...@davemloft.net;
> j...@mojatatu.com; xiyou.wangc...@gmail.com; j...@resnulli.us; intel-wired-
> l...@lists.osuosl.org; Gomes, Vinicius ;
> l...@dorileo.org; jakub.kicin...@netro
From: Jakub Kicinski
Date: Thu, 27 Jun 2019 16:12:38 -0700
> Pieter says:
>
> This set extends the flower match and action components to offload
> GRE decapsulation with classification and encapsulation actions. The
> first 3 patches are refactor and cleanup patches for improving
> readability a
On 6/27/2019 2:55 PM, Marek Vasut wrote:
> Regmap provides polling function to poll for bits in a register. This
> function is another reimplementation of polling for bit being clear in
> a register. Replace this with regmap polling function. Moreover, inline
> the function parameters, as the fu
On 6/27/2019 2:55 PM, Marek Vasut wrote:
> Regmap provides polling function to poll for bits in a register,
> use in instead of reimplementing it.
>
> Signed-off-by: Marek Vasut
> Cc: Andrew Lunn
> Cc: Florian Fainelli
> Cc: Tristram Ha
> Cc: Woojung Huh
Reviewed-by: Florian Fainelli
--
On 27 Jun 2019, at 15:42, Jakub Kicinski wrote:
> On Thu, 27 Jun 2019 15:08:34 -0700, Jonathan Lemon wrote:
>> Now that the recycle stack is always used for the driver umem path, the
>> driver code path can be simplified.
>>
>> Signed-off-by: Jonathan Lemon
>
> I guess it's a question to Bjorn
On 27 Jun 2019, at 15:38, Jakub Kicinski wrote:
On Thu, 27 Jun 2019 15:08:32 -0700, Jonathan Lemon wrote:
The reuseq is actually a recycle stack, only accessed from the kernel
side.
Also, the implementation details of the stack should belong to the
umem
object, and not exposed to the calle
From: Marek Vasut
Date: Thu, 27 Jun 2019 23:55:51 +0200
> This patchset cleans up KSZ9477 switch driver by replacing various
> ad-hoc polling implementations and register RMW with regmap functions.
>
> Each polling function is replaced separately to make it easier to review
> and possibly bisect
On Thu, Jun 27, 2019 at 3:10 PM Davide Caratti wrote:
>
> On Wed, 2019-06-26 at 14:15 -0700, Cong Wang wrote:
> > Hi, Davide
> >
> > On Tue, Jun 25, 2019 at 12:29 PM Cong Wang wrote:
> > > It should handle this overflow case more gracefully, I hope.
> > >
> >
> > Please try this attached one and
On Thu, Jun 27, 2019 at 9:32 AM Maxime Ripard wrote:
>
> The networking PHYs have a number of available device tree properties that
> can be used in their device tree node. Add a YAML schemas for those.
>
> Reviewed-by: Andrew Lunn
> Reviewed-by: Rob Herring
> Signed-off-by: Maxime Ripard
> ---
Let's use union with u8[4] and u32 members for sockopt buffer,
that should fix any possible aliasing issues.
test_sockopt_sk.c: In function ‘getsetsockopt’:
test_sockopt_sk.c:115:2: warning: dereferencing type-punned pointer will break
strict-aliasing rules [-Wstrict-aliasing]
if (*(__u32 *)buf
From: wenxu
This patch provide a meta vlan to set the vlan tag of the packet.
for q-in-q outer vlan id 20:
meta vlan set 0x88a8:20
set the default 0x8100 vlan type with vlan id 20
meta vlan set 20
Signed-off-by: wenxu
---
include/uapi/linux/netfilter/nf_tables.h | 4
net/netfilter/nft_
From: wenxu
This patch provide a meta to get the bridge vlan proto
nft add rule bridge firewall zones counter meta br_vlan_proto 0x8100
Signed-off-by: wenxu
---
include/uapi/linux/netfilter/nf_tables.h | 2 ++
net/netfilter/nft_meta.c | 9 +
2 files changed, 11 inserti
On Thu, Jun 27, 2019 at 11:55:56PM +0200, Marek Vasut wrote:
> Regmap provides read-modify-write function to update bitfields in
> registers. Replace ad-hoc read-modify-write with regmap_update_bits()
> where applicable.
>
> Signed-off-by: Marek Vasut
Reviewed-by: Andrew Lunn
Andrew
On Thu, Jun 27, 2019 at 11:55:55PM +0200, Marek Vasut wrote:
> Regmap provides polling function to poll for bits in a register. This
> function is another reimplementation of polling for bit being clear in
> a register. Replace this with regmap polling function. Moreover, inline
> the function para
On Thu, Jun 27, 2019 at 11:55:54PM +0200, Marek Vasut wrote:
> Regmap provides polling function to poll for bits in a register. This
> function is another reimplementation of polling for bit being clear in
> a register. Replace this with regmap polling function. Moreover, inline
> the function para
On Thu, Jun 27, 2019 at 11:55:53PM +0200, Marek Vasut wrote:
> Regmap provides polling function to poll for bits in a register. This
> function is another reimplementation of polling for bit being clear in
> a register. Replace this with regmap polling function. Moreover, inline
> the function para
On Thu, Jun 27, 2019 at 11:55:52PM +0200, Marek Vasut wrote:
> Regmap provides polling function to poll for bits in a register,
> use in instead of reimplementing it.
>
> Signed-off-by: Marek Vasut
Reviewed-by: Andrew Lunn
Andrew
On 06/20/2019 12:06 PM, Björn Töpel wrote:
> From: Björn Töpel
>
> When an AF_XDP socket is released/closed the XSKMAP still holds a
> reference to the socket in a "released" state. The socket will still
> use the netdev queue resource, and block newly created sockets from
> attaching to that que
On Thu, 27 Jun 2019 10:36:42 -0700, John Fastabend wrote:
> The tls close() callback currently drops the sock lock, makes a
> cancel_delayed_work_sync() call, and then relocks the sock. This
> seems suspect at best. The lock_sock() is applied to stop concurrent
> operations on the socket while tear
[sigh, I finally set up lore nntp, and I goofed some addresses. Hi
Kees and linux-api.]
On Thu, Jun 27, 2019 at 4:40 PM Andy Lutomirski wrote:
>
> On 6/27/19 1:19 PM, Song Liu wrote:
> > This patch introduce unprivileged BPF access. The access control is
> > achieved via device /dev/bpf. Users w
On 6/27/19 1:19 PM, Song Liu wrote:
This patch introduce unprivileged BPF access. The access control is
achieved via device /dev/bpf. Users with write access to /dev/bpf are able
to call sys_bpf().
Two ioctl command are added to /dev/bpf:
The two commands enable/disable permission to call sys_b
From: Pieter Jansen van Vuuren
Previously tunnel related functions in action offload only applied
to UDP tunnels. Rename these functions in preparation for new
tunnel types.
Signed-off-by: Pieter Jansen van Vuuren
Reviewed-by: Jakub Kicinski
Reviewed-by: John Hurley
---
.../ethernet/netronom
From: Pieter Jansen van Vuuren
Add new GRE encapsulation support, which allows offload of filters
using tunnel_key set action in combination with actions that egress
to GRE type ports.
Signed-off-by: Pieter Jansen van Vuuren
Signed-off-by: Jakub Kicinski
Reviewed-by: John Hurley
---
.../ethe
From: Pieter Jansen van Vuuren
Adds IPv4 address and TTL/TOS helper functions, which is done in
preparation for compiling new tunnel types.
Signed-off-by: Pieter Jansen van Vuuren
Reviewed-by: Jakub Kicinski
Reviewed-by: John Hurley
---
.../net/ethernet/netronome/nfp/flower/cmsg.h | 16 +++-
Pieter says:
This set extends the flower match and action components to offload
GRE decapsulation with classification and encapsulation actions. The
first 3 patches are refactor and cleanup patches for improving
readability and reusability. Patch 4 and 5 implement GRE decap and
encap functionality
From: Pieter Jansen van Vuuren
Extend the existing tunnel matching support to include GRE decap
classification. Specifically matching existing tunnel fields for
NVGRE (GRE with protocol field set to TEB).
Signed-off-by: Pieter Jansen van Vuuren
Reviewed-by: Jakub Kicinski
Reviewed-by: John Hur
From: Pieter Jansen van Vuuren
Refactor the key layer calculation function, in particular the tunnel
key layer calculation by introducing helper functions. This is done
in preparation for supporting GRE tunnel offloads.
Signed-off-by: Pieter Jansen van Vuuren
Reviewed-by: Jakub Kicinski
Review
It allocates the extended area for outbound streams only on sendmsg
calls, if they are not yet allocated. When using the priority
stream scheduler, this initialization may imply into a subsequent
allocation, which may fail. In this case, it was aborting the stream
scheduler initialization but lea
On Thu, Jun 27, 2019 at 3:43 PM Stanislav Fomichev wrote:
>
> > There is a build warning though:
> > test_sockopt_sk.c: In function ‘getsetsockopt’:
> > test_sockopt_sk.c:115:2: warning: dereferencing type-punned pointer will
> > break strict-aliasing rules [-Wstrict-aliasing]
> > if (*(__u32 *
On 06/27, Alexei Starovoitov wrote:
> On Thu, Jun 27, 2019 at 01:38:46PM -0700, Stanislav Fomichev wrote:
> > This series implements two new per-cgroup hooks: getsockopt and
> > setsockopt along with a new sockopt program type. The idea is pretty
> > similar to recently introduced cgroup sysctl hoo
On Thu, 27 Jun 2019 15:08:34 -0700, Jonathan Lemon wrote:
> Now that the recycle stack is always used for the driver umem path, the
> driver code path can be simplified.
>
> Signed-off-by: Jonathan Lemon
I guess it's a question to Bjorn and Magnus whether they want Intel
drivers to always go thr
On Thu, 27 Jun 2019 15:08:32 -0700, Jonathan Lemon wrote:
> The reuseq is actually a recycle stack, only accessed from the kernel side.
> Also, the implementation details of the stack should belong to the umem
> object, and not exposed to the caller.
>
> Clean up and rename for consistency in prep
On Wed, Jun 26, 2019 at 04:31:39PM +0800, Xin Long wrote:
> Now when sctp_connect() is called with a wrong sa_family, it binds
> to a port but doesn't set bp->port, then sctp_get_af_specific will
> return NULL and sctp_connect() returns -EINVAL.
>
> Then if sctp_bind() is called to bind to another
On Thu, Jun 27, 2019 at 01:38:46PM -0700, Stanislav Fomichev wrote:
> This series implements two new per-cgroup hooks: getsockopt and
> setsockopt along with a new sockopt program type. The idea is pretty
> similar to recently introduced cgroup sysctl hooks, but
> implementation is simpler (no need
On 06/23/2019 04:17 AM, Toke Høiland-Jørgensen wrote:
> From: Toke Høiland-Jørgensen
>
> The socket map uses a linked list instead of a bitmap to keep track of
> which entries to flush. Do the same for devmap and cpumap, as this means we
> don't have to care about the map index when enqueueing th
On Wed, 2019-06-26 at 14:15 -0700, Cong Wang wrote:
> Hi, Davide
>
> On Tue, Jun 25, 2019 at 12:29 PM Cong Wang wrote:
> > It should handle this overflow case more gracefully, I hope.
> >
>
> Please try this attached one and let me know if it works.
> Hope I get it right this time.
>
> Thanks!
On 06/23/2019 04:17 AM, Toke Høiland-Jørgensen wrote:
> From: Toke Høiland-Jørgensen
>
> The bpf_redirect_map() helper used by XDP programs doesn't return any
> indication of whether it can successfully redirect to the map index it was
> given. Instead, BPF programs have to track this themselves,
The specific _rq variants are deprecated, and will be removed next.
Signed-off-by: Jonathan Lemon
---
include/net/xdp_sock.h | 22 +++---
net/xdp/xsk.c | 22 +++---
2 files changed, 22 insertions(+), 22 deletions(-)
diff --git a/include/net/xdp_sock.h b/
Signed-off-by: Jonathan Lemon
---
drivers/net/ethernet/mellanox/mlx5/core/en/xsk/rx.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/net/ethernet/mellanox/mlx5/core/en/xsk/rx.c
b/drivers/net/ethernet/mellanox/mlx5/core/en/xsk/rx.c
index 8d24eaa660a8..e116b1fde7
Clean up and normalize usage of the recycle queue in order to
support upcoming TX from RX queue functionality.
Jonathan Lemon (6):
Have xsk_umem_peek_addr_rq() return chunk-aligned handles.
Clean up xsk reuseq API
Always check the recycle stack when using the umem fq.
Simplify AF_XDP umem
Now that the recycle stack is always used for the driver umem path, the
driver code path can be simplified.
Signed-off-by: Jonathan Lemon
---
drivers/net/ethernet/intel/i40e/i40e_xsk.c| 76 ++-
.../ethernet/intel/ixgbe/ixgbe_txrx_common.h | 2 +-
drivers/net/ethernet/intel/
On 26 Jun 2019, at 13:00, Jesper Dangaard Brouer wrote:
On Wed, 26 Jun 2019 09:42:07 -0700 "Jonathan Lemon"
wrote:
If all packets are collected together (like the bulk queue does), and
then passed to XDP, this could easily be made backwards compatible.
If the XDP program isn't 'multi-frag' a
The reuseq is actually a recycle stack, only accessed from the kernel side.
Also, the implementation details of the stack should belong to the umem
object, and not exposed to the caller.
Clean up and rename for consistency in preparation for the next patch.
Signed-off-by: Jonathan Lemon
---
dri
xkq_peek_addr() returns chunk-aligned handles, so have the rq behave
the same way. Clean up callsites.
Signed-off-by: Jonathan Lemon
---
drivers/net/ethernet/intel/i40e/i40e_xsk.c | 2 --
drivers/net/ethernet/intel/ixgbe/ixgbe_xsk.c| 2 --
drivers/net/ethernet/mellanox/mlx5/cor
Regmap provides polling function to poll for bits in a register. This
function is another reimplementation of polling for bit being clear in
a register. Replace this with regmap polling function. Moreover, inline
the function parameters, as the function is never called with any other
parameter valu
This patchset cleans up KSZ9477 switch driver by replacing various
ad-hoc polling implementations and register RMW with regmap functions.
Each polling function is replaced separately to make it easier to review
and possibly bisect, but maybe the patches can be squashed.
Signed-off-by: Marek Vasut
Regmap provides polling function to poll for bits in a register,
use in instead of reimplementing it.
Signed-off-by: Marek Vasut
Cc: Andrew Lunn
Cc: Florian Fainelli
Cc: Tristram Ha
Cc: Woojung Huh
---
drivers/net/dsa/microchip/ksz9477.c| 14 +-
drivers/net/dsa/microchip/ksz_
Regmap provides polling function to poll for bits in a register. This
function is another reimplementation of polling for bit being clear in
a register. Replace this with regmap polling function. Moreover, inline
the function parameters, as the function is never called with any other
parameter valu
Regmap provides polling function to poll for bits in a register. This
function is another reimplementation of polling for bit being clear in
a register. Replace this with regmap polling function. Moreover, inline
the function parameters, as the function is never called with any other
parameter valu
Regmap provides read-modify-write function to update bitfields in
registers. Replace ad-hoc read-modify-write with regmap_update_bits()
where applicable.
Signed-off-by: Marek Vasut
Cc: Andrew Lunn
Cc: Florian Fainelli
Cc: Tristram Ha
Cc: Woojung Huh
---
drivers/net/dsa/microchip/ksz9477.c |
On 06/23/2019 04:17 AM, Toke Høiland-Jørgensen wrote:
> From: Toke Høiland-Jørgensen
>
> The bpf_redirect_map() helper used by XDP programs doesn't return any
> indication of whether it can successfully redirect to the map index it was
> given. Instead, BPF programs have to track this themselves,
After discussing with Russell King, it appears this driver is making a
few confusions and not performing some checks for consistent operation.
Changes in v2:
- Removed redundant print in the phylink_validate callback (in 2/3).
Vladimir Oltean (3):
net: dsa: sja1105: Don't check state->link in p
PHYLINK being designed with PHYs in mind that can change MII protocol,
for correct operation it is necessary to ensure that the PHY interface
mode stays the same (otherwise clear the supported bit mask, as
required).
Because this is just a hypothetical situation for now, we don't bother
to check w
It has been pointed out that PHYLINK can call mac_config only to update
the phy_interface_type and without knowing what the AN results are.
Experimentally, when this was observed to happen, state->link was also
unset, and therefore was used as a proxy to ignore this call. However it
is also sugges
We need a better way to signal this, perhaps in phylink_validate, but
for now just print this error message as guidance for other people
looking at this driver's code while trying to rework PHYLINK.
Cc: Russell King
Signed-off-by: Vladimir Oltean
---
drivers/net/dsa/sja1105/sja1105_main.c | 5 +
On Thu, Jun 27, 2019 at 2:04 PM Daniel Borkmann wrote:
>
> On 06/26/2019 08:12 AM, Andrii Nakryiko wrote:
> > BPF_MAP_TYPE_PERF_EVENT_ARRAY map is often used to send data from BPF
> > program
> > to user space for additional processing. libbpf already has very low-level
> > API
> > to read singl
On Thu, Jun 27, 2019 at 2:16 PM Daniel Borkmann wrote:
>
> On 06/27/2019 12:15 AM, Andrii Nakryiko wrote:
> > On Wed, Jun 26, 2019 at 7:25 AM Daniel Borkmann
> > wrote:
> [...]
> >> What this boils down to is that this should get a proper abstraction, e.g.
> >> as
> >> in struct libbpf_event wh
When the skb is associated with a new sock, just assigning
it to skb->sk is not sufficient, we have to set its destructor
to free the sock properly too.
Reported-by: syzbot+d6636a36d3c34bd88...@syzkaller.appspotmail.com
Signed-off-by: Cong Wang
---
net/netrom/af_netrom.c | 3 ++-
1 file changed,
On Thu, 27 Jun 2019 12:14:50 +0100, Laatz, Kevin wrote:
> On the application side (xdpsock), we don't have to worry about the user
> defined headroom, since it is 0, so we only need to account for the
> XDP_PACKET_HEADROOM when computing the original address (in the default
> scenario).
That as
DMA_API_HOWTO.txt includes an example explaining when
dma_sync_single_for_device() is not needed, and that example matches
our use case. The buffer isn't changed by the CPU and direction is
DMA_FROM_DEVICE, so we can remove the call to
dma_sync_single_for_device().
Signed-off-by: Heiner Kallweit
On 06/27/2019 12:15 AM, Andrii Nakryiko wrote:
> On Wed, Jun 26, 2019 at 7:25 AM Daniel Borkmann wrote:
[...]
>> What this boils down to is that this should get a proper abstraction, e.g. as
>> in struct libbpf_event which holds the event object. There should be helper
>> functions like libbpf_eve
Documentation/DMA-API-HOWTO.txt states:
By default, the kernel assumes that your device can address 32-bits of
DMA addressing. For a 64-bit capable device, this needs to be increased,
and for a device with limitations, it needs to be decreased.
Therefore we don't need the 32 Bit DMA fallback confi
The VLAN tag is stored in the descriptor in network byte order.
Using swab16 works on little endian host systems only. Better play safe
and use ntohs or htons respectively.
Signed-off-by: Heiner Kallweit
---
drivers/net/ethernet/realtek/r8169_main.c | 5 +++--
1 file changed, 3 insertions(+), 2
On 06/26/2019 08:12 AM, Andrii Nakryiko wrote:
> BPF_MAP_TYPE_PERF_EVENT_ARRAY map is often used to send data from BPF program
> to user space for additional processing. libbpf already has very low-level API
> to read single CPU perf buffer, bpf_perf_event_read_simple(), but it's hard to
> use and
Support sockopt prog type and cgroup hooks in the bpftool.
Cc: Andrii Nakryiko
Cc: Martin Lau
Acked-by: Jakub Kicinski
Signed-off-by: Stanislav Fomichev
---
tools/bpf/bpftool/Documentation/bpftool-cgroup.rst | 7 +--
tools/bpf/bpftool/Documentation/bpftool-prog.rst | 3 ++-
tools/bpf/bp
Add sockopt selftests:
* require proper expected_attach_type
* enforce context field read/write access
* test bpf_sockopt_handled handler
* test EPERM
* test limiting optlen from getsockopt
* test out-of-bounds access
v9:
* add tests for setsockopt argument mangling
v7:
* remove return 2; test re
sockopt test that verifies chaining behavior.
v9:
* setsockopt chaining example
v7:
* rework the test to verify cgroup getsockopt chaining
Cc: Andrii Nakryiko
Cc: Martin Lau
Signed-off-by: Stanislav Fomichev
---
tools/testing/selftests/bpf/.gitignore| 1 +
tools/testing/selftests/b
socktop test that introduces new SOL_CUSTOM sockopt level and
stores whatever users sets in sk storage. Whenever getsockopt
is called, the original value is retrieved.
v9:
* SO_SNDBUF example to override user-supplied buffer
v7:
* use retval=0 and optlen-1
v6:
* test 'ret=1' use-case as well (Al
Provide user documentation about sockopt prog type and cgroup hooks.
v9:
* add details about setsockopt context and inheritance
v7:
* add description for retval=0 and optlen=-1
v6:
* describe cgroup chaining, add example
v2:
* use return code 2 for kernel bypass
Cc: Andrii Nakryiko
Cc: Martin
Make libbpf aware of new sockopt hooks so it can derive prog type
and hook point from the section names.
Cc: Andrii Nakryiko
Cc: Martin Lau
Signed-off-by: Stanislav Fomichev
---
tools/lib/bpf/libbpf.c| 5 +
tools/lib/bpf/libbpf_probes.c | 1 +
2 files changed, 6 insertions(+)
diff
Export new prog type and hook points to the libbpf.
Cc: Andrii Nakryiko
Cc: Martin Lau
Signed-off-by: Stanislav Fomichev
---
tools/include/uapi/linux/bpf.h | 14 ++
1 file changed, 14 insertions(+)
diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h
index
Add tests that make sure libbpf section detection works.
Cc: Andrii Nakryiko
Cc: Martin Lau
Signed-off-by: Stanislav Fomichev
---
tools/testing/selftests/bpf/test_section_names.c | 10 ++
1 file changed, 10 insertions(+)
diff --git a/tools/testing/selftests/bpf/test_section_names.c
b
Implement new BPF_PROG_TYPE_CGROUP_SOCKOPT program type and
BPF_CGROUP_{G,S}ETSOCKOPT cgroup hooks.
BPF_CGROUP_SETSOCKOPT can modify user setsockopt arguments before
passing them down to the kernel or bypass kernel completely.
BPF_CGROUP_GETSOCKOPT can can inspect/modify getsockopt arguments that
This series implements two new per-cgroup hooks: getsockopt and
setsockopt along with a new sockopt program type. The idea is pretty
similar to recently introduced cgroup sysctl hooks, but
implementation is simpler (no need to convert to/from strings).
What this can be applied to:
* move business
This patch adds two more API to libbpf: libbpf_enable_sys_bpf() and
libbpf_disable_sys_bpf().
For root, these two APIs are no-op.
Signed-off-by: Song Liu
---
tools/lib/bpf/libbpf.c | 54
tools/lib/bpf/libbpf.h | 7 ++
tools/lib/bpf/libbpf.map |
On Thu, Jun 27, 2019 at 10:56 AM Song Liu wrote:
>
>
>
> > On Jun 27, 2019, at 10:47 AM, Andrii Nakryiko
> > wrote:
> >
> > On Thu, Jun 27, 2019 at 10:27 AM Song Liu wrote:
> >>
> >>
> >>
> >>> On Jun 26, 2019, at 4:21 PM, Andrii Nakryiko wrote:
> >>>
> >>> Change BTF-defined map definitions t
This patch calls libbpf_[enable|disable]_sys_bpf() from bpftool. This
allows users with access to /dev/bpf to perform operations like root.
Signed-off-by: Song Liu
---
tools/bpf/bpftool/feature.c | 2 +-
tools/bpf/bpftool/main.c| 5 +
2 files changed, 6 insertions(+), 1 deletion(-)
diff
Sync changes for bpf_dev_ioctl.
Signed-off-by: Song Liu
---
tools/include/uapi/linux/bpf.h | 6 ++
1 file changed, 6 insertions(+)
diff --git a/tools/include/uapi/linux/bpf.h b/tools/include/uapi/linux/bpf.h
index b077507efa3f..13e148bd6c7c 100644
--- a/tools/include/uapi/linux/bpf.h
+++ b/
Changes v1 => v2:
1. Make default mode of /dev/bpf 0220 (Greg);
2. Rename ioctl commands as BPF_DEV_IOCTL_ENABLE_SYS_BPF and
BPF_DEV_IOCTL_DISABLE_SYS_BPF (Daniel);
3. Save space for task_struct by reusing free bit (Daniel);
4. Make the permission per process (Lorenz).
Currently, most access to
From: Paul Blakey
Date: Thu, 20 Jun 2019 16:42:18 +0300
> +struct tcf_ct_params {
...
> + struct rcu_head rcu;
> +
> +};
Please get ride of that empty line after the 'rcu' member.
> + switch (skb->protocol) {
> + case htons(ETH_P_IP):
> + family = NFPROTO_IPV4;
> +
1 - 100 of 262 matches
Mail list logo