[PATCH net-next v3 3/3] net/udpgso_bench.sh test fails on error

2019-06-17 Thread Fred Klassen
Ensure that failure on any individual test results in an overall failure of the test script. Signed-off-by: Fred Klassen --- tools/testing/selftests/net/udpgso_bench.sh | 33 + 1 file changed, 33 insertions(+) diff --git a/tools/testing/selftests/net/udpgso_bench.sh

[PATCH net-next v3 2/3] net/udpgso_bench.sh add UDP GSO audit tests

2019-06-17 Thread Fred Klassen
: Unexpected number of Zerocopy completions:493706 expected493704 received Also reduce individual test time from 4 to 3 seconds so that overall test time does not increase significantly. v3: Enhancements as per Willem de Bruijn - document -P option for TCP audit Signed-off-by: Fred

[PATCH net-next v3 1/3] net/udpgso_bench_tx: options to exercise TX CMSG

2019-06-17 Thread Fred Klassen
MSG_TRUNC - general code cleanup Signed-off-by: Fred Klassen --- tools/testing/selftests/net/udpgso_bench_tx.c | 291 -- 1 file changed, 276 insertions(+), 15 deletions(-) diff --git a/tools/testing/selftests/net/udpgso_bench_tx.c b/tools/testing/selftests/net

[PATCH net-next v3 0/3] UDP GSO audit tests

2019-06-17 Thread Fred Klassen
Updates to UDP GSO selftests ot optionally stress test CMSG subsytem, and report the reliability and performance of both TX Timestamping and ZEROCOPY messages. Fred Klassen (3): net/udpgso_bench_tx: options to exercise TX CMSG net/udpgso_bench.sh add UDP GSO audit tests net/udpgso_bench.sh

[PATCH net v4] net/udp_gso: Allow TX timestamp with UDP GSO

2019-06-17 Thread Fred Klassen
de Bruijn Moving tests from net to net-next v3: Update only relevant tx_flag bits as per Willem de Bruijn v4: Update comments and commit message as per Willem de Bruijn Fixes: ee80d1ebe5ba ("udp: add udp gso") Signed-off-by: Fred Klassen --- net/ipv4/udp_offload.c | 5

Re: [PATCH net-next v2 1/3] net/udpgso_bench_tx: options to exercise TX CMSG

2019-06-13 Thread Fred Klassen
> On May 28, 2019, at 2:35 PM, Willem de Bruijn > wrote: >> -static void flush_zerocopy(int fd) >> +static void flush_cmsg(struct cmsghdr *cmsg) >> { >> - struct msghdr msg = {0};/* flush */ >> + switch (cmsg->cmsg_level) { >> + case SOL_SOCKET: >> + if

[PATCH net-next v2 3/3] net/udpgso_bench.sh test fails on error

2019-05-28 Thread Fred Klassen
Ensure that failure on any individual test results in an overall failure of the test script. Signed-off-by: Fred Klassen --- tools/testing/selftests/net/udpgso_bench.sh | 33 + 1 file changed, 33 insertions(+) diff --git a/tools/testing/selftests/net/udpgso_bench.sh

[PATCH net-next v2 2/3] net/udpgso_bench.sh add UDP GSO audit tests

2019-05-28 Thread Fred Klassen
) ./udpgso_bench_tx: Unexpected number of Zerocopy completions:493706 expected493704 received Also reduce individual test time from 4 to 3 seconds so that overall test time does not increase significantly. Signed-off-by: Fred Klassen --- tools/testing/selftests/net/udpgso_bench.sh | 18

[PATCH net-next v2 1/3] net/udpgso_bench_tx: options to exercise TX CMSG

2019-05-28 Thread Fred Klassen
: Enhancements as per Willem de Bruijn - Updated control and buffer parameters for recvmsg - poll() parameter cleanup - fail on bad audit results - remove TOS options - improved reporting Signed-off-by: Fred Klassen --- tools/testing/selftests/net/udpgso_bench_tx.c | 324

[PATCH net-next v2 0/3] UDP GSO audit tests

2019-05-28 Thread Fred Klassen
Updates to UDP GSO selftests ot optionally stress test CMSG subsytem, and report the reliability and performance of both TX Timestamping and ZEROCOPY messages. Fred Klassen (3): net/udpgso_bench_tx: options to exercise TX CMSG net/udpgso_bench.sh add UDP GSO audit tests net/udpgso_bench.sh

[PATCH net-next v3 0/1] Allow TX timestamp with UDP GSO

2019-05-28 Thread Fred Klassen
Fixes an issue where TX Timestamps are not arriving on the error queue when UDP_SEGMENT CMSG type is combined with CMSG type SO_TIMESTAMPING. Fred Klassen (1): net/udp_gso: Allow TX timestamp with UDP GSO net/ipv4/udp_offload.c | 5 + 1 file changed, 5 insertions(+) -- 2.11.0

[PATCH net-next v3 1/1] net/udp_gso: Allow TX timestamp with UDP GSO

2019-05-28 Thread Fred Klassen
nt tx_flag bits as per Willem de Bruijn Fixes: ee80d1ebe5ba ("udp: add udp gso") Signed-off-by: Fred Klassen --- net/ipv4/udp_offload.c | 5 + 1 file changed, 5 insertions(+) diff --git a/net/ipv4/udp_offload.c b/net/ipv4/udp_offload.c index 065334b41d57..de8ecba42d55 1

Re: [PATCH net 4/4] net/udpgso_bench_tx: audit error queue

2019-05-28 Thread Fred Klassen
> On May 28, 2019, at 8:08 AM, Willem de Bruijn > wrote: > I will push up latest patches soon. I did some testing and discovered that only TCP audit tests failed. They failed much less often when enabling poll. Once in about 20 runs still failed. Therefore I commented out the TCP audit

Re: [PATCH net 4/4] net/udpgso_bench_tx: audit error queue

2019-05-27 Thread Fred Klassen
> On May 27, 2019, at 6:15 PM, Willem de Bruijn > wrote: >> I wanted to discuss whether or not to attach a buffer to the >> recvmsg(fd, , MSG_ERRQUEUE). Without it, I have >> MSG_TRUNC errors in my msg_flags. Either I have to add >> a buffer, or ignore that error flag. > > Either sounds

Re: [PATCH net 4/4] net/udpgso_bench_tx: audit error queue

2019-05-27 Thread Fred Klassen
> On May 27, 2019, at 2:46 PM, Willem de Bruijn > wrote: >> Also, I my v2 fix in net is still up for debate. In its current state, it >> meets my application’s requirements, but may not meet all of yours. > I gave more specific feedback on issues with it (referencing zerocopy > and IP_TOS,

Re: [PATCH net 4/4] net/udpgso_bench_tx: audit error queue

2019-05-27 Thread Fred Klassen
Willem, Thanks for spending so much time with me on this patch. I’m pretty new to this, so I know I am making lots of mistakes. I have been working on a v2 of the selftests in net-next, but want to review the layout of the report before I submit (see below). Also, I my v2 fix in net is still up

[PATCH net v2 0/1] Allow TX timestamp with UDP GSO

2019-05-26 Thread Fred Klassen
Fixes an issue where TX Timestamps are not arriving on the error queue when UDP_SEGMENT CMSG type is combined with CMSG type SO_TIMESTAMPING. This is version 2 which moves the tests to net-next. Fred Klassen (1): net/udp_gso: Allow TX timestamp with UDP GSO net/ipv4/udp_offload.c | 4 1

[PATCH net v2 1/1] net/udp_gso: Allow TX timestamp with UDP GSO

2019-05-26 Thread Fred Klassen
_IP/IP_TOS. ./udpgso_bench_tx -4ucPv -S 1472 -q 182 -l2 -D 172.16.120.18 poll timeout udp tx: 0 MB/s1 calls/s 1 msg/s This patch preserves tx_flags for the first UDP GSO segment. This mirrors the stack's behaviour for IPv4 fragments. Fixes: ee80d1ebe5ba ("udp: add udp gso")

Re: [PATCH net 1/4] net/udp_gso: Allow TX timestamp with UDP GSO

2019-05-25 Thread Fred Klassen
> On May 23, 2019, at 2:59 PM, Willem de Bruijn > wrote:what exactly is the issue with IP_TOS? > > If I understand correctly, the issue here is that the new 'P' option > that polls on the error queue times out. This is unrelated to > specifying TOS bits? Without zerocopy or timestamps, no

Re: [PATCH net 1/4] net/udp_gso: Allow TX timestamp with UDP GSO

2019-05-25 Thread Fred Klassen
> On May 23, 2019, at 2:39 PM, Willem de Bruijn > wrote: > Zerocopy notification reference count is managed in skb_segment. That > should work. > I’m trying to understand the context of reference counting in skb_segment. I assume that there is an opportunity to optimize the count of

Re: [PATCH net 1/4] net/udp_gso: Allow TX timestamp with UDP GSO

2019-05-25 Thread Fred Klassen
> On May 23, 2019, at 2:59 PM, Willem de Bruijn > wrote: > what exactly is the issue with IP_TOS? > > If I understand correctly, the issue here is that the new 'P' option > that polls on the error queue times out. This is unrelated to > specifying TOS bits? Without zerocopy or timestamps, no

Re: [PATCH net 1/4] net/udp_gso: Allow TX timestamp with UDP GSO

2019-05-25 Thread Fred Klassen
> On May 25, 2019, at 8:20 AM, Willem de Bruijn > wrote: > > On Fri, May 24, 2019 at 6:01 PM Fred Klassen wrote: >> >> >> >>> On May 24, 2019, at 12:29 PM, Willem de Bruijn >>> wrote: >>> >>> It is the last moment th

Re: [PATCH net 1/4] net/udp_gso: Allow TX timestamp with UDP GSO

2019-05-24 Thread Fred Klassen
> On May 24, 2019, at 12:29 PM, Willem de Bruijn > wrote: > > It is the last moment that a timestamp can be generated for the last > byte, I don't see how that is "neither the start nor the end of a GSO > packet”. My misunderstanding. I thought TCP did last segment timestamping, not last

Re: [PATCH net 1/4] net/udp_gso: Allow TX timestamp with UDP GSO

2019-05-24 Thread Fred Klassen
> Interesting. TCP timestamping takes the opposite choice and does > timestamp the last byte in the sendmsg request. > I have a difficult time with the philosophy of TX timestamping the last segment. The actual timestamp occurs just before the last segment is sent. This is neither the start nor

Re: [PATCH net 2/4] net/udpgso_bench_tx: options to exercise TX CMSG

2019-05-23 Thread Fred Klassen
> > To ensure that we do not regress, when adding options, please consider > (just a general suggestion, not a strong request for this patch set) > updating the kselftest to run a variant of the test with the new code > coverage. In this case, make the code pass/fail instead of only user >

Re: [PATCH net 1/4] net/udp_gso: Allow TX timestamp with UDP GSO

2019-05-23 Thread Fred Klassen
> Thanks for the report. > > Zerocopy notification reference count is managed in skb_segment. That > should work. > > Support for timestamping with the new GSO feature is indeed an > oversight. The solution is similar to how TCP associates the timestamp > with the right segment in

Re: [PATCH net 4/4] net/udpgso_bench_tx: audit error queue

2019-05-23 Thread Fred Klassen
Willem, this is only my 2nd patch, and my last one was a one liner. I’ll try to work through this, but let me know if I am doing a rookie mistake (learning curve and all). > On May 23, 2019, at 2:56 PM, Willem de Bruijn > wrote: > > On Thu, May 23, 2019 at 5:11 PM Fred Kl

[PATCH net 2/4] net/udpgso_bench_tx: options to exercise TX CMSG

2019-05-23 Thread Fred Klassen
("selftests: udp gso benchmark") Signed-off-by: Fred Klassen --- tools/testing/selftests/net/udpgso_bench_tx.c | 290 -- 1 file changed, 273 insertions(+), 17 deletions(-) diff --git a/tools/testing/selftests/net/udpgso_bench_tx.c b/tools/testing/selftests/net/udpgso_

[PATCH net 4/4] net/udpgso_bench_tx: audit error queue

2019-05-23 Thread Fred Klassen
Timestamps: received: 34046 errors: 0 Zerocopy acks: received: 54422 errors: 0 Fixes: 3a687bef148d ("selftests: udp gso benchmark") Signed-off-by: Fred Klassen --- tools/testing/selftests/net/udpgso_bench_tx.c | 152 +++--- 1 file changed, 113 inserti

[PATCH net 3/4] net/udpgso_bench_tx: fix sendmmsg on unconnected socket

2019-05-23 Thread Fred Klassen
Fixes the following error if using both -m and -u options: # ./udpgso_bench -4um -D 172.16.120.189 ./udpgso_bench: sendmmsg: Destination address required Fixes: 3a687bef148d ("selftests: udp gso benchmark") Signed-off-by: Fred Klassen --- tools/testing/selftests/net/udpgso_

[PATCH net 0/4] Allow TX timestamp with UDP GSO

2019-05-23 Thread Fred Klassen
and ZEROCOPY messages. Fred Klassen (4): net/udp_gso: Allow TX timestamp with UDP GSO net/udpgso_bench_tx: options to exercise TX CMSG net/udpgso_bench_tx: fix sendmmsg on unconnected socket net/udpgso_bench_tx: audit error queue net/ipv4/udp_offload.c| 4 + tools

[PATCH net 1/4] net/udp_gso: Allow TX timestamp with UDP GSO

2019-05-23 Thread Fred Klassen
_IP/IP_TOS. ./udpgso_bench_tx -4ucPv -S 1472 -q 182 -l2 -D 172.16.120.18 poll timeout udp tx: 0 MB/s1 calls/s 1 msg/s This patch preserves tx_flags for the first UDP GSO segment. This mirrors the stack's behaviour for IPv4 fragments. Fixes: ee80d1ebe5ba ("udp: add udp gso")

Re: [PATCH v2] ipmi: Prevent use-after-free in deliver_response

2019-01-20 Thread Fred Klassen
Correct, targeting 5.0. > On Jan 19, 2019, at 5:30 PM, Corey Minyard wrote: > > I assume you want this for 5.0., right?

[PATCH v2] ipmi: Prevent use-after-free in deliver_response

2019-01-19 Thread Fred Klassen
handle_new_recv_msgs+0x1ce/0x440 tasklet_action_common.isra.19+0xc4/0x250 __do_softirq+0x11f/0x51f Fixes: e86ee2d44b44 ("ipmi: Rework locking and shutdown for hot remove") Cc: sta...@vger.kernel.org Signed-off-by: Fred Klassen --- drivers/char/ipmi/ipmi_msghandler.c | 2 +- 1 file changed, 1 inser

PATCH] ipmi: Prevent use-after-free in deliver_response

2019-01-19 Thread Fred Klassen
/0x21d0 handle_new_recv_msgs+0x1ce/0x440 tasklet_action_common.isra.19+0xc4/0x250 __do_softirq+0x11f/0x51f Fixes: e86ee2d44b4 ("ipmi: Rework locking and shutdown for hot remove") Signed-off-by: Fred Klassen Cc: sta...@vger.kernel.org --- drivers/char/ipmi/ipmi_msghandler.c | 2 +- 1 fi

[PATCH] ipmi: Prevent use-after-free in deliver_response

2019-01-18 Thread Fred Klassen
handle_one_recv_msg+0x37a/0x21d0 handle_new_recv_msgs+0x1ce/0x440 tasklet_action_common.isra.19+0xc4/0x250 __do_softirq+0x11f/0x51f Fixes: e86ee2d44b4 ("ipmi: Rework locking and shutdown for hot remove") Signed-off-by: Fred Klassen --- drivers/char/ipmi/ipmi_msghandler.c | 2