[PATCH 0/6 bpf-next] xsk: reuseq cleanup

2019-06-27 Thread Jonathan Lemon
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

[PATCH 4/6 bfp-next] Simplify AF_XDP umem allocation path for Intel drivers.

2019-06-27 Thread Jonathan Lemon
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/

Re: XDP multi-buffer incl. jumbo-frames (Was: [RFC V1 net-next 1/1] net: ena: implement XDP drop support)

2019-06-27 Thread Jonathan Lemon
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

[PATCH 2/6 bpf-next] Clean up xsk reuseq API

2019-06-27 Thread Jonathan Lemon
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

[PATCH 1/6 bpf-next] Have xsk_umem_peek_addr_rq() return chunk-aligned handles.

2019-06-27 Thread Jonathan Lemon
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

Re: [PATCH bpf-next v5 2/3] bpf_xdp_redirect_map: Perform map lookup in eBPF helper

2019-06-27 Thread Daniel Borkmann
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,

Re: [PATCH net] net/sched: flower: fix infinite loop in fl_walk()

2019-06-27 Thread Davide Caratti
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!

Re: [PATCH bpf-next v5 1/3] devmap/cpumap: Use flush list instead of bitmap

2019-06-27 Thread Daniel Borkmann
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

Re: [PATCH bpf-next v9 0/9] bpf: getsockopt and setsockopt hooks

2019-06-27 Thread Alexei Starovoitov
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

Re: [PATCH net] sctp: not bind the socket in sctp_connect

2019-06-27 Thread Marcelo Ricardo Leitner
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

Re: [PATCH 2/6 bpf-next] Clean up xsk reuseq API

2019-06-27 Thread Jakub Kicinski
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

Re: [PATCH 4/6 bfp-next] Simplify AF_XDP umem allocation path for Intel drivers.

2019-06-27 Thread Jakub Kicinski
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

Re: [PATCH bpf-next v9 0/9] bpf: getsockopt and setsockopt hooks

2019-06-27 Thread Stanislav Fomichev
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

Re: [PATCH bpf-next v9 0/9] bpf: getsockopt and setsockopt hooks

2019-06-27 Thread Alexei Starovoitov
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 *

[PATCH net] sctp: fix error handling on stream scheduler initialization

2019-06-27 Thread Marcelo Ricardo Leitner
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

[PATCH net-next 1/5] nfp: flower: refactor tunnel key layer calculation

2019-06-27 Thread Jakub Kicinski
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

[PATCH net-next 4/5] nfp: flower: add GRE decap classification support

2019-06-27 Thread Jakub Kicinski
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

[PATCH net-next 3/5] nfp: flower: rename tunnel related functions in action offload

2019-06-27 Thread Jakub Kicinski
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

[PATCH net-next 5/5] nfp: flower: add GRE encap action support

2019-06-27 Thread Jakub Kicinski
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

[PATCH net-next 2/5] nfp: flower: add helper functions for tunnel classification

2019-06-27 Thread Jakub Kicinski
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 +++-

[PATCH net-next 0/5] nfp: extend flower capabilities for GRE tunnel offload

2019-06-27 Thread Jakub Kicinski
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

Re: [PATCH v2 bpf-next 1/4] bpf: unprivileged BPF access via /dev/bpf

2019-06-27 Thread Andy Lutomirski
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

Re: [PATCH v2 bpf-next 1/4] bpf: unprivileged BPF access via /dev/bpf

2019-06-27 Thread Andy Lutomirski
[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

Re: [PATCH 1/2] tls: remove close callback sock unlock/lock and flush_sync

2019-06-27 Thread Jakub Kicinski
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

Re: [PATCH bpf-next v3 1/2] xsk: remove AF_XDP socket from map when the socket is released

2019-06-27 Thread Daniel Borkmann
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

Re: [PATCH 1/5] net: dsa: microchip: Replace ad-hoc polling with regmap

2019-06-27 Thread Andrew Lunn
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

Re: [PATCH 2/5] net: dsa: microchip: Replace ksz9477_wait_vlan_ctrl_ready polling with regmap

2019-06-27 Thread Andrew Lunn
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

Re: [PATCH 3/5] net: dsa: microchip: Replace ksz9477_wait_alu_ready polling with regmap

2019-06-27 Thread Andrew Lunn
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

Re: [PATCH 4/5] net: dsa: microchip: Replace ksz9477_wait_alu_sta_ready polling with regmap

2019-06-27 Thread Andrew Lunn
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

Re: [PATCH 5/5] net: dsa: microchip: Replace bit RMW with regmap

2019-06-27 Thread Andrew Lunn
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

[PATCH 1/2 nf-next v3] netfilter: nft_meta: Add NFT_META_BRI_IIFVPROTO support

2019-06-27 Thread wenxu
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

[PATCH 2/2 nf-next v3] netfilter:nft_meta: Add NFT_META_VLAN support

2019-06-27 Thread wenxu
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_

[PATCH bpf-next] selftests/bpf: fix -Wstrict-aliasing in test_sockopt_sk.c

2019-06-27 Thread Stanislav Fomichev
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

Re: [PATCH v4 02/13] dt-bindings: net: Add a YAML schemas for the generic PHY options

2019-06-27 Thread Rob Herring
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 > ---

Re: [PATCH net] net/sched: flower: fix infinite loop in fl_walk()

2019-06-27 Thread Cong Wang
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

Re: [PATCH 0/5] net: dsa: microchip: Further regmap cleanups

2019-06-27 Thread David Miller
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

Re: [PATCH 2/6 bpf-next] Clean up xsk reuseq API

2019-06-27 Thread Jonathan Lemon
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

Re: [PATCH 4/6 bfp-next] Simplify AF_XDP umem allocation path for Intel drivers.

2019-06-27 Thread Jonathan Lemon
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

Re: [PATCH 1/5] net: dsa: microchip: Replace ad-hoc polling with regmap

2019-06-27 Thread Florian Fainelli
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 --

Re: [PATCH 2/5] net: dsa: microchip: Replace ksz9477_wait_vlan_ctrl_ready polling with regmap

2019-06-27 Thread Florian Fainelli
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

Re: [PATCH net-next 0/5] nfp: extend flower capabilities for GRE tunnel offload

2019-06-27 Thread David Miller
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

RE: [PATCH net-next v6 1/8] igb: clear out skb->tstamp after reading the txtime

2019-06-27 Thread Brown, Aaron F
> 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

Re: [PATCH 2/3 nf-next] netfilter:nf_flow_table: Support bridge type flow offload

2019-06-27 Thread wenxu
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

Re: [PATCH net v2] vxlan: do not destroy fdb if register_netdevice() is failed

2019-06-27 Thread Taehee Yoo
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 > >

[PATCH v3] bpf: fix uapi bpf_prog_info fields alignment

2019-06-27 Thread Baruch Siach
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

GOOD DAY

2019-06-27 Thread Chambers, Marcine
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

[PATCH net v3] vxlan: do not destroy fdb if register_netdevice() is failed

2019-06-27 Thread Taehee Yoo
__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

RE: [EXT] [PATCH V4] bnx2x: Prevent ptp_task to be rescheduled indefinitely

2019-06-27 Thread Sudarsana Reddy Kalluru
> -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

Re: [PATCH net] tipc: add dst_cache support for udp media

2019-06-27 Thread David Miller
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 >

Re: [PATCH] sis900: remove TxIDLE

2019-06-27 Thread David Miller
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. >

[PATCH v3 bpf-next 0/9] libbpf: add bpf_link and tracing attach APIs

2019-06-27 Thread Andrii Nakryiko
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

[PATCH v3 bpf-next 7/9] selftests/bpf: switch test to new attach_perf_event API

2019-06-27 Thread Andrii Nakryiko
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 -

[PATCH v3 bpf-next 9/9] selftests/bpf: convert existing tracepoint tests to new APIs

2019-06-27 Thread Andrii Nakryiko
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

[PATCH v3 bpf-next 4/9] libbpf: add kprobe/uprobe attach API

2019-06-27 Thread Andrii Nakryiko
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

[PATCH v3 bpf-next 8/9] selftests/bpf: add kprobe/uprobe selftests

2019-06-27 Thread Andrii Nakryiko
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

[PATCH v3 bpf-next 2/9] libbpf: introduce concept of bpf_link

2019-06-27 Thread Andrii Nakryiko
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

[PATCH v3 bpf-next 3/9] libbpf: add ability to attach/detach BPF program to perf event

2019-06-27 Thread Andrii Nakryiko
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

[PATCH v3 bpf-next 5/9] libbpf: add tracepoint attach API

2019-06-27 Thread Andrii Nakryiko
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

[PATCH v3 bpf-next 1/9] libbpf: make libbpf_strerror_r agnostic to sign of error

2019-06-27 Thread Andrii Nakryiko
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

[PATCH v3 bpf-next 6/9] libbpf: add raw tracepoint attach API

2019-06-27 Thread Andrii Nakryiko
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

Re: [PATCH 2/3 nf-next] netfilter:nf_flow_table: Support bridge type flow offload

2019-06-27 Thread Florian Westphal
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

Re: [RFC, PATCH 2/2, net-next] net: netsec: add XDP support

2019-06-27 Thread Ilias Apalodimas
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

<    1   2   3