mt7621 only has 1 IRQ for ethernet part.
correct there is only 1 single IRQ on mt7621
John
Greats,
René
[1]
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/tree/drivers/net/ethernet/mediatek/mtk_eth_soc.c#n1739
[2]
https://www.ubnt.com/download/edgemax/edgerouter-x
point so maybe that is
the motivation that makes it more clear why flower API today is
insufficient. Mostly curious at this point I see Jiri and Florian
both reviewed it already.
Thanks,
John
Add the necessary header definitions to tools for new
msg_pop_data_helper.
Signed-off-by: John Fastabend
---
tools/include/uapi/linux/bpf.h| 16 +++-
tools/testing/selftests/bpf/bpf_helpers.h | 2 ++
2 files changed, 17 insertions(+), 1 deletion(-)
diff --git a/tools
Similar to msg_pull_data and msg_push_data add a set of options to
have msg_pop_data() exercised.
Signed-off-by: John Fastabend
---
tools/testing/selftests/bpf/test_sockmap.c | 127 +++-
tools/testing/selftests/bpf/test_sockmap_kern.h | 70 ++---
2 files
This adds a BPF SK_MSG program helper so that we can pop data from a
msg. We use this to pop metadata from a previous push data call.
Signed-off-by: John Fastabend
---
include/uapi/linux/bpf.h | 16 -
net/core/filter.c| 171 +++
net/ipv4
delta calculations for DROP with pop'd data (albeit a strange set
of operations for a program to be doing) had potential to be
incorrect possibly confusing user space applications, so fix it.
John Fastabend (3):
bpf: helper to pop data from messages
bpf: add msg_pop_data helper to t
On 11/25/18 5:05 PM, Daniel Borkmann wrote:
> On 11/23/2018 02:38 AM, John Fastabend wrote:
>> This adds a BPF SK_MSG program helper so that we can pop data from a
>> msg. We use this to pop metadata from a previous push data call.
>>
>> Signed-off-by: John Fastabend
&g
On 11/26/18 3:16 AM, Quentin Monnet wrote:
> 2018-11-26 02:05 UTC+0100 ~ Daniel Borkmann
>> On 11/23/2018 02:38 AM, John Fastabend wrote:
>>> This adds a BPF SK_MSG program helper so that we can pop data from a
>>> msg. We use this to pop metadata from a previous pus
ib
support.
Thanks!
John Fastabend (3):
bpf: helper to pop data from messages
bpf: add msg_pop_data helper to tools
bpf: test_sockmap, add options for msg_pop_data() helper usage
include/uapi/linux/bpf.h| 13 +-
net/core/filter.c
Add the necessary header definitions to tools for new
msg_pop_data_helper.
Signed-off-by: John Fastabend
---
tools/include/uapi/linux/bpf.h| 13 -
tools/testing/selftests/bpf/bpf_helpers.h | 2 ++
2 files changed, 14 insertions(+), 1 deletion(-)
diff --git a/tools
This adds a BPF SK_MSG program helper so that we can pop data from a
msg. We use this to pop metadata from a previous push data call.
Signed-off-by: John Fastabend
---
include/uapi/linux/bpf.h | 13 +++-
net/core/filter.c| 169 +++
net/ipv4
Similar to msg_pull_data and msg_push_data add a set of options to
have msg_pop_data() exercised.
Signed-off-by: John Fastabend
---
tools/testing/selftests/bpf/test_sockmap.c | 127 +++-
tools/testing/selftests/bpf/test_sockmap_kern.h | 70 ++---
2 files
Offload of geneve decap rules is supported in NFP. Include geneve in the
check for supported types.
Signed-off-by: John Hurley
Reviewed-by: Jakub Kicinski
---
drivers/net/ethernet/netronome/nfp/flower/tunnel_conf.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/ethernet
Make use of the recently added VXLAN and geneve helper functions to
determine the type of the netdev from its rtnl_link_ops.
Signed-off-by: John Hurley
Reviewed-by: Jakub Kicinski
---
drivers/net/ethernet/netronome/nfp/flower/action.c | 8 +++-
1 file changed, 3 insertions(+), 5 deletions
Add a helper function to determine if the type of a netdev is geneve based
on its rtnl_link_ops. This allows drivers that may wish to offload tunnels
to check the underlying type of the device.
A recent patch added a similar helper to vxlan.h
Signed-off-by: John Hurley
Reviewed-by: Jakub
A recent patch introduced the function netif_is_vxlan() to verify the
tunnel type of a given netdev as vxlan.
Add a similar function to detect geneve netdevs and make use of this
function in the NFP driver. Also make use of the vxlan helper where
applicable.
John Hurley (3):
net: add
doing something fundamentally wrong here? E.g., do I need to
clone the sk_buff before retransmitting it? If so, are there any
restrictions on *when* I clone it (I'd prefer not to do this unless
retransmission is necessary, just to save work).
Thanks in advance for any advice/pointers.
-John-
for combinations of FEC modes
* Fix: Fix uninitialized variable use at qsfp dump
John
--
John W. LinvilleSomeday the world will need a hero, and you
linvi...@tuxdriver.com might be all we have. Be ready.
));
> + printf("failed to create map %d (%s): %d %s\n",
> +i, maps[i].name, errno, strerror(errno));
> return 1;
> }
> maps[i].fd = map_fd[i];
>
LGTM
Acked-by: John Fastabend
use a bitpattern of CPUs rather than a CPU id
> to allow multiple CPUs per vlan.
Great, so does this solve your use case then? At least on drivers
with XDP support?
>
> Signed-off-by: Shannon Nelson
> ---
Some really small and trivial nits below.
Acked-by: Jo
On 10/29/2018 12:31 PM, John Fastabend wrote:
> We return 0 in the case of a nonblocking socket that has no data
> available. However, this is incorrect and may confuse applications.
> After this patch we do the correct thing and return the error
> EAGAIN.
>
> Quoting return
nonblocking and the receive operation would
block, or a receive timeout had been set and the timeout expired
before data was received.
Signed-off-by: John Fastabend
---
net/ipv4/tcp_bpf.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/net/ipv4/tcp_bpf.c b/net/ipv4/tcp_bpf.c
index b7918d4
On Sun, Oct 28, 2018 at 11:10 AM Or Gerlitz wrote:
>
> On Thu, Oct 25, 2018 at 3:28 PM John Hurley wrote:
> > Currently drivers can register to receive TC block bind/unbind callbacks
> > by implementing the setup_tc ndo in any of their given netdevs. However,
> > driver
On Fri, Oct 26, 2018 at 9:52 AM Sergei Shtylyov
wrote:
>
> Hello!
>
> On 25.10.2018 15:26, John Hurley wrote:
>
> > Add a helper function to determine if the type of a netdev is geneve based
> > on its rtnl_link_ops. This allows drivers that may wish to ofload tunnels
unnels
> >to check the underlying type of the device.
> >
> >A recent patch added a similar helper to vxlan.h
> >
> >Signed-off-by: John Hurley
> >Reviewed-by: Jakub Kicinski
>
> I don't understand why this and the next patch are part of this
> patchset. T
nts this new indirect block registration in the
> >NFP driver to allow the offloading of tunnel rules. The use of egdev
> >offload (which is currently only used for tunnel offload) is subsequently
> >removed.
>
> John, I'm missing v1->v2 changelog. Could you please add it?
&
to be NULL.
Signed-off-by: John Hurley
Reviewed-by: Jakub Kicinski
---
drivers/net/ethernet/netronome/nfp/flower/main.h | 3 +--
drivers/net/ethernet/netronome/nfp/flower/metadata.c | 11 +++
drivers/net/ethernet/netronome/nfp/flower/offload.c | 6 ++
3 files changed, 6 insertions
Add support structures and functions that can be used by NFP to impliment
the indirect block register functionality of TC.
Signed-off-by: John Hurley
Reviewed-by: Jakub Kicinski
---
drivers/net/ethernet/netronome/nfp/flower/main.c | 13 +++
drivers/net/ethernet/netronome/nfp/flower/main.h
registration, this is triggered for already existing netdevs. This means
that NFP can register for offloads from devices that exist before it is
loaded (filter rules will be replayed from the TC core).
Signed-off-by: John Hurley
Reviewed-by: Jakub Kicinski
---
drivers/net/ethernet/netronome/nfp/flower
Previously, only tunnel decap rules required egdev registration for
offload in NFP. These are now supported via indirect TC block callbacks.
Remove the egdev code from NFP.
Signed-off-by: John Hurley
Reviewed-by: Jakub Kicinski
---
drivers/net/ethernet/netronome/nfp/flower/main.c | 12
Add a helper function to determine if the type of a netdev is geneve based
on its rtnl_link_ops. This allows drivers that may wish to ofload tunnels
to check the underlying type of the device.
A recent patch added a similar helper to vxlan.h
Signed-off-by: John Hurley
Reviewed-by: Jakub
then base its offload decision on a combination
of ingress device and egress port for a rule.
Signed-off-by: John Hurley
Reviewed-by: Jakub Kicinski
---
drivers/net/ethernet/netronome/nfp/flower/action.c | 14
drivers/net/ethernet/netronome/nfp/flower/main.h | 3 +-
drivers/net/ethernet
Offload of geneve decap rules is supported in NFP. Include geneve in the
check for supported types.
Signed-off-by: John Hurley
Reviewed-by: Jakub Kicinski
---
drivers/net/ethernet/netronome/nfp/flower/tunnel_conf.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/net/ethernet
register for block offload rules using already existing
functions.
The patchset also implements this new indirect block registration in the
NFP driver to allow the offloading of tunnel rules. The use of egdev
offload (which is currently only used for tunnel offload) is subsequently
removed.
John
. In this case (if it is an ingress block),
register and also trigger the callback meaning that any already installed
rules can be replayed to the calling driver.
Signed-off-by: John Hurley
Signed-off-by: Jakub Kicinski
---
include/net/pkt_cls.h | 56 +
include/net/sch_generic.h | 3 +
net
Add support for new bpf_msg_push_data in libbpf.
Signed-off-by: John Fastabend
---
tools/include/uapi/linux/bpf.h| 20 +++-
tools/testing/selftests/bpf/bpf_helpers.h | 2 ++
2 files changed, 21 insertions(+), 1 deletion(-)
diff --git a/tools/include/uapi/linux
updates test_sockmap to run msg_push_data tests.
v2: rebase after queue map and in filter.c convert int -> u32
John Fastabend (3):
bpf: sk_msg program helper bpf_msg_push_data
bpf: libbpf support for msg_push_data
bpf: test_sockmap add options to use msg_push_data
include/linux/skms
.
However, a copy will be required if the ring is full and its possible
for the helper to fail with ENOMEM or EINVAL errors which need to be
handled by the BPF program.
This can be used similar to XDP metadata to pass data between sk_msg
layer and lower layers.
Signed-off-by: John Fastabend
---
include
. This is analagous to the options that are
used to pull data, --txmsg_start and --txmsg_end.
In addition to adding the options tests are added to the test
suit to run the tests similar to what was done for msg_pull_data.
Signed-off-by: John Fastabend
---
tools/testing/selftests/bpf/test_sockmap.c | 58
On 10/19/2018 03:57 PM, Daniel Borkmann wrote:
> On 10/20/2018 12:51 AM, Daniel Borkmann wrote:
>> On 10/18/2018 10:58 PM, John Fastabend wrote:
>>> We check if the sk_user_data (the psock in skmsg) is in fact a sockmap
>>> type to late, after we read the refcnt which i
updates test_sockmap to run msg_push_data tests.
---
John Fastabend (3):
bpf: sk_msg program helper bpf_msg_push_data
bpf: libbpf support for msg_push_data
bpf: test_sockmap add options to use msg_push_data
include/linux/skmsg.h |5 +
include/uapi
.
However, a copy will be required if the ring is full and its possible
for the helper to fail with ENOMEM or EINVAL errors which need to be
handled by the BPF program.
This can be used similar to XDP metadata to pass data between sk_msg
layer and lower layers.
Signed-off-by: John Fastabend
---
include
Add support for new bpf_msg_push_data in libbpf.
Signed-off-by: John Fastabend
---
tools/include/uapi/linux/bpf.h| 20 +++-
tools/testing/selftests/bpf/bpf_helpers.h |2 ++
2 files changed, 21 insertions(+), 1 deletion(-)
diff --git a/tools/include/uapi/linux
. This is analagous to the options that are
used to pull data, --txmsg_start and --txmsg_end.
In addition to adding the options tests are added to the test
suit to run the tests similar to what was done for msg_pull_data.
Signed-off-by: John Fastabend
---
tools/testing/selftests/bpf/test_sockmap.c | 58
. And because I consistently
run this with the ifname before realizing its the ifindex not
string name I'll Ack it.
Acked-by: John Fastabend
John Fastabend (2):
bpf: skmsg, fix psock create on existing kcm/tls port
bpf: test_maps add a test to catch kcm + sockmap
include/linux/skmsg.h | 25 +---
net/core/sock_map.c | 11 +++---
tools/testing/selftests/bpf/Makefile | 2 +-
tools
]
sock_map_link.isra.6+0x41f/0xe30 net/core/sock_map.c:178
sock_hash_update_common+0x19b/0x11e0 net/core/sock_map.c:669
sock_hash_update_elem+0x306/0x470 net/core/sock_map.c:738
map_update_elem+0x819/0xdf0 kernel/bpf/syscall.c:818
Signed-off-by: John Fastabend
Reported-by: Eric Dumazet
Fixes
Adding a socket to both sockmap and kcm is not supported due to
collision on sk_user_data usage.
If selftests is run without KCM support we will issue a warning
and continue with the tests.
Signed-off-by: John Fastabend
---
tools/testing/selftests/bpf/Makefile | 2 +-
tools/testing
On 10/18/2018 10:34 AM, Eric Dumazet wrote:
>
>
> On 10/17/2018 10:20 PM, John Fastabend wrote:
>> Before using the psock returned by sk_psock_get() when adding it to a
>> sockmap we need to ensure it is actually a sockmap based psock.
>> Previously we were only check
]
sock_map_link.isra.6+0x41f/0xe30 net/core/sock_map.c:178
sock_hash_update_common+0x19b/0x11e0 net/core/sock_map.c:669
sock_hash_update_elem+0x306/0x470 net/core/sock_map.c:738
map_update_elem+0x819/0xdf0 kernel/bpf/syscall.c:818
Signed-off-by: John Fastabend
Reported-by: Eric Dumazet
Fixes
also found an issue with KCM and kTLS
where each uses sk_data_ready hooks and associated stream parser
breaking expectations in kcm, ktls or both. But that fix will need
to go to net.
Thanks to Eric for reporting.
v2: Fix up file +/- my scripts lost track of them
John Fastabend (2):
bpf: skmsg
Adding a socket to both sockmap and kcm is not supported due to
collision on sk_user_data usage.
If selftests is run without KCM support we will issue a warning
and continue with the tests.
Signed-off-by: John Fastabend
---
tools/testing/selftests/bpf/Makefile | 2 +-
tools/testing
also found an issue with KCM and kTLS
where each uses sk_data_ready hooks and associated stream parser
breaking expectations in kcm, ktls or both. But that fix will need
to go to net.
Thanks to Eric for reporting.
---
John Fastabend (2):
bpf: skmsg, fix psock create on existing kcm/tls port
Adding a socket to both sockmap and kcm is not supported due to
collision on sk_user_data usage.
If selftests is run without KCM support we will issue a warning
and continue with the tests.
Signed-off-by: John Fastabend
---
tools/testing/selftests/bpf/Makefile |2 -
tools/testing
]
sock_map_link.isra.6+0x41f/0xe30 net/core/sock_map.c:178
sock_hash_update_common+0x19b/0x11e0 net/core/sock_map.c:669
sock_hash_update_elem+0x306/0x470 net/core/sock_map.c:738
map_update_elem+0x819/0xdf0 kernel/bpf/syscall.c:818
Signed-off-by: John Fastabend
Reported-by: Eric Dumazet
Fixes
the kernel in question without having to
announce themselves. The "send an email to i...@cavium.com" offer may
(or may not) be sufficient for the letter of the law. But it seems
both fragile and prone to subjective frustrations and delays for
users to obtain the sources at some future date
This adds support for the MSG_PEEK flag when doing redirect to ingress
and receiving on the sk_msg psock queue. Previously the flag was
being ignored which could confuse applications if they expected the
flag to work as normal.
Signed-off-by: John Fastabend
---
include/net/tcp.h |2 +-
net
the helper always reports an empty ring. To fix this
add a test for the full ring case to avoid reporting a full ring
has 0 elements. This additional functionality will be used in the
next patches from recvmsg context where end = head with a full ring
is a valid case.
Signed-off-by: John Fastabend
Add tests that do a MSG_PEEK recv followed by a regular receive to
test flag support.
Signed-off-by: John Fastabend
---
tools/testing/selftests/bpf/test_sockmap.c | 167 +++-
1 file changed, 115 insertions(+), 52 deletions(-)
diff --git a/tools/testing/selftests/bpf
MSG_PEEK call all tests continue to PASS.
---
John Fastabend (3):
bpf: skmsg, improve sk_msg_used_element to work in cork context
bpf: sockmap, support for msg_peek in sk_msg with redirect ingress
bpf: sockmap, add msg_peek tests to test_sockmap
include/linux/skmsg.h
' will be decremented
with sk_mem_uncharge().
Signed-off-by: John Fastabend
---
include/linux/skmsg.h |1 +
net/ipv4/tcp_bpf.c|1 +
2 files changed, 2 insertions(+)
diff --git a/include/linux/skmsg.h b/include/linux/skmsg.h
index 0b919f0..31df0d9 100644
--- a/include/linux/skmsg.h
+++ b
field now but I kept the original API around also in case
users of the API don't want to expose this. The flags field is an
int in case we need more control over how the API call handles
errors/features/etc in the future.
Signed-off-by: John Fastabend
---
tools/bpf/bpftool/Documentation
programs to maps and then detach them.
Signed-off-by: John Fastabend
Reviewed-by: Jakub Kicinski
---
tools/bpf/bpftool/Documentation/bpftool-prog.rst | 11 ++
tools/bpf/bpftool/Documentation/bpftool.rst |2
tools/bpf/bpftool/bash-completion/bpftool| 19
tools/bpf/bpftool
. This allows using bpftool with maps that have a extra
fields that the user knows can be ignored. This is needed to work
correctly with maps being loaded by other tools or directly via
syscalls.
v3: add bash completion and doc updates for --mapcompat
---
John Fastabend (2):
bpf: bpftool
field now but I kept the original API around also in case
users of the API don't want to expose this. The flags field is an
int in case we need more control over how the API call handles
errors/features/etc in the future.
Signed-off-by: John Fastabend
---
tools/bpf/bpftool/main.c |7
programs to maps and then detach them.
Signed-off-by: John Fastabend
---
tools/bpf/bpftool/Documentation/bpftool-prog.rst | 11 ++
tools/bpf/bpftool/Documentation/bpftool.rst |2
tools/bpf/bpftool/bash-completion/bpftool| 19
tools/bpf/bpftool/prog.c
. This allows using bpftool with maps that have a extra
fields that the user knows can be ignored. This is needed to work
correctly with maps being loaded by other tools or directly via
syscalls.
---
John Fastabend (2):
bpf: bpftool, add support for attaching programs to maps
bpf
here the record is being encrypted after BPF has run and came to
>> a verdict. In order to get there, first step is to transform open
>> coding of scatter-gather list handling into a common core framework
>> that subsystems use.
>>
>> Joint work with John.
>>
>
On Wed, Oct 10, 2018 at 2:38 PM Or Gerlitz wrote:
>
> On Thu, Oct 4, 2018 at 8:19 PM Jakub Kicinski
> wrote:
> > On Thu, 4 Oct 2018 17:20:43 +0100, John Hurley wrote:
> > > > > In this case the hw driver will receive the rules from the tunnel
> > > > &
On 10/10/2018 10:11 AM, Jakub Kicinski wrote:
> On Wed, 10 Oct 2018 09:44:26 -0700, John Fastabend wrote:
>> Sock map/hash introduce support for attaching programs to maps. To
>> date I have been doing this with custom tooling but this is less than
>> ideal as we s
On 10/10/2018 10:14 AM, Eric Dumazet wrote:
>
>
> On 10/10/2018 09:18 AM, Shannon Nelson wrote:
>> On 10/9/2018 7:17 PM, Eric Dumazet wrote:
>>>
>>>
>>> On 10/09/2018 07:11 PM, Shannon Nelson wrote:
Hence the reason we sent this as an RFC a couple of weeks ago. We got no
programs to maps and then detach them.
Signed-off-by: John Fastabend
---
tools/bpf/bpftool/main.h |1 +
tools/bpf/bpftool/prog.c | 92 ++
2 files changed, 92 insertions(+), 1 deletion(-)
diff --git a/tools/bpf/bpftool/main.h b/tools/bpf/bpftool
ing initialized at
> sff8472_parse_eeprom function, to avoid the same issue here.
>
> Fixes: a5e73bb05ee4 ("ethtool:QSFP Plus/QSFP28 Diagnostics Information
> Support")
> Signed-off-by: Eran Ben Elisha
OK, queued for next release...
--
John W. LinvilleSom
On Thu, Oct 04, 2018 at 05:06:29PM +0100, Edward Cree wrote:
> On 04/10/18 15:08, John W. Linville wrote:
> > Ping?
> >
> > On Mon, Oct 01, 2018 at 02:59:10PM -0400, John W. Linville wrote:
> >> Is this patch still RFC?
> Feel free to de-RFC and apply it.
Great
On Thu, Oct 4, 2018 at 4:53 PM Or Gerlitz wrote:
>
> On Thu, Oct 4, 2018 at 6:44 PM John Hurley wrote:
> > On Thu, Oct 4, 2018 at 3:28 PM Or Gerlitz wrote:
> > > On Thu, Oct 4, 2018 at 7:55 AM Jakub Kicinski
> > > wrote:
>
> > > > This patchset
On Thu, Oct 4, 2018 at 3:28 PM Or Gerlitz wrote:
>
> On Thu, Oct 4, 2018 at 7:55 AM Jakub Kicinski
> wrote:
> >
> > Hi!
> >
> > This set contains a rough RFC implementation of a proposed [1] replacement
> > for egdev cls_flower offloads. I did some last minute restructuring
> > and removal of
Ping?
On Mon, Oct 01, 2018 at 02:59:10PM -0400, John W. Linville wrote:
> Is this patch still RFC?
>
> On Wed, Sep 19, 2018 at 05:06:25PM +0100, Edward Cree wrote:
> > Instead of commas, just have them as separate argvs.
> >
> > The parsing state machine might loo
vname advertise foo" },
> { 1, "--set-fec devname" },
> { 0, "--set-fec devname encoding auto" },
> - { 0, "--set-fec devname encoding off," },
> - { 0, "--set-fec devname encoding baser,rs" },
> - { 0, &qu
On 09/26/2018 02:22 PM, Daniel Borkmann wrote:
> On 09/26/2018 11:09 PM, Tetsuo Handa wrote:
>> Hello, Alexei and Daniel.
>>
>> Can you show us how to run testcases you are testing?
>
> Sorry for the delay; currently quite backlogged but will definitely take a
> look
> at these reports.
about sockets always being ESTABLISHED state.
To resolve this rely on the unhash hook, which is called in the
disconnect case, to remove the sock from the sockmap.
Reported-by: Eric Dumazet
Fixes: 1aa12bdf1bfb ("bpf: sockmap, add sock close() hook to remove socks")
Signed-off-by: John
are BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB and
BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB.
Similar to TLS ULP this ensures sk_user_data is correct.
Reported-by: Eric Dumazet
Fixes: 1aa12bdf1bfb ("bpf: sockmap, add sock close() hook to remove socks")
Signed-off-by: John Fastabend
Acked-by: Yonghong Song
---
Ensure that sockets added to a sock{map|hash} that is not in the
ESTABLISHED state is rejected.
Fixes: 1aa12bdf1bfb ("bpf: sockmap, add sock close() hook to remove socks")
Signed-off-by: John Fastabend
Acked-by: Yonghong Song
---
tools/testing/selftests/bpf/test_maps.c | 10 +++
Yonghong I carried your ACKs forward.
---
John Fastabend (3):
bpf: sockmap only allow ESTABLISHED sock state
bpf: sockmap, fix transition through disconnect without close
bpf: test_maps, only support ESTABLISHED socks
kernel/bpf/sockmap.c| 91
On 09/17/2018 02:09 PM, Y Song wrote:
> On Mon, Sep 17, 2018 at 10:32 AM John Fastabend
> wrote:
>>
>> It is possible (via shutdown()) for TCP socks to go trough TCP_CLOSE
>> state via tcp_disconnect() without actually calling tcp_close which
>> would then cal
On 09/17/2018 02:21 PM, Y Song wrote:
> On Mon, Sep 17, 2018 at 10:33 AM John Fastabend
> wrote:
>>
>> Ensure that sockets added to a sock{map|hash} that is not in the
>> ESTABLISHED state is rejected.
>>
>> Fixes: 1aa12bdf1bfb ("bpf: sockmap, add sock clo
are BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB and
BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB.
Similar to TLS ULP this ensures sk_user_data is correct.
Reported-by: Eric Dumazet
Fixes: 1aa12bdf1bfb ("bpf: sockmap, add sock close() hook to remove socks")
Signed-off-by: John Fastabend
Acked-by: Yonghong Song
--
Ensure that sockets added to a sock{map|hash} that is not in the
ESTABLISHED state is rejected.
Fixes: 1aa12bdf1bfb ("bpf: sockmap, add sock close() hook to remove socks")
Signed-off-by: John Fastabend
---
tools/testing/selftests/bpf/test_maps.c | 10 +++---
1 file changed, 7
about sockets always being ESTABLISHED state.
To resolve this rely on the unhash hook, which is called in the
disconnect case, to remove the sock from the sockmap.
Reported-by: Eric Dumazet
Fixes: 1aa12bdf1bfb ("bpf: sockmap, add sock close() hook to remove socks")
Signed-off-by: John
for ESTABLISH state in hash update sockmap as well
v3: Do not release lock from unhash in error path, no lock was
used in the first place. And drop not so useful code comments
Thanks for reviewing Yonghong I carried your ACK forward
on patch 1/3.
Thanks,
John
---
John Fastabend (3):
bpf
mma-less version in the syntax synopsis and only
> mention the commas in the running-text.
LGTM -- queued for next release...thanks!
John
> ethtool.8.in | 11 ---
> ethtool.c | 50 +++---
> test-cmdline.c | 9 +
>
On 09/17/2018 10:59 AM, John Fastabend wrote:
> It is possible (via shutdown()) for TCP socks to go trough TCP_CLOSE
> state via tcp_disconnect() without actually calling tcp_close which
> would then call our bpf_tcp_close() callback. Because of this a user
> could disconnect a soc
Ensure that sockets added to a sock{map|hash} that is not in the
ESTABLISHED state is rejected.
Fixes: 1aa12bdf1bfb ("bpf: sockmap, add sock close() hook to remove socks")
Signed-off-by: John Fastabend
---
tools/testing/selftests/bpf/test_maps.c | 10 +++---
1 file changed, 7
are BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB and
BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB.
Similar to TLS ULP this ensures sk_user_data is correct.
Reported-by: Eric Dumazet
Fixes: 1aa12bdf1bfb ("bpf: sockmap, add sock close() hook to remove socks")
Signed-off-by: John Fastabend
---
kernel/bpf/sockma
about sockets always being ESTABLISHED state.
To resolve this rely on the unhash hook, which is called in the
disconnect case, to remove the sock from the sockmap.
Reported-by: Eric Dumazet
Fixes: 1aa12bdf1bfb ("bpf: sockmap, add sock close() hook to remove socks")
Signed-off-by: John
for ESTABLISH state in hash update sockmap as well.
Thanks,
John
---
John Fastabend (3):
bpf: sockmap only allow ESTABLISHED sock state
bpf: sockmap, fix transition through disconnect without close
bpf: test_maps, only support ESTABLISHED socks
kernel/bpf/sockmap.c
Ensure that sockets added to a sock{map|hash} that is not in the
ESTABLISHED state is rejected.
Fixes: 1aa12bdf1bfb ("bpf: sockmap, add sock close() hook to remove socks")
Signed-off-by: John Fastabend
---
tools/testing/selftests/bpf/test_maps.c | 10 +++---
1 file changed, 7
about sockets always being ESTABLISHED state.
To resolve this rely on the unhash hook, which is called in the
disconnect case, to remove the sock from the sockmap.
Reported-by: Eric Dumazet
Fixes: 1aa12bdf1bfb ("bpf: sockmap, add sock close() hook to remove socks")
Signed-off-by: John
Eric noted that using the close callback is not sufficient
to catch all transitions from ESTABLISHED state to a LISTEN
state. So this series does two things. First, only allow
adding socks in ESTABLISH state and second use unhash callback
to catch tcp_disconnect() transitions.
Thanks,
John
are BPF_SOCK_OPS_PASSIVE_ESTABLISHED_CB and
BPF_SOCK_OPS_ACTIVE_ESTABLISHED_CB.
Similar to TLS ULP this ensures sk_user_data is correct.
Reported-by: Eric Dumazet
Fixes: 1aa12bdf1bfb ("bpf: sockmap, add sock close() hook to remove socks")
Signed-off-by: John Fastabend
---
kernel/bpf/sockma
oth the setup (in tls_do_decryption)
and when we clear it from the crypto callback handler
tls_decrypt_done(). After this selftests pass again and fixes KASAN
errors/warnings.
Fixes: 94524d8fc965 ("net/tls: Add support for async decryption of tls records")
Signed-off-by: John Fastabend
---
incl
1 - 100 of 2993 matches
Mail list logo