Thread (27 messages) 27 messages, 4 authors, 2020-09-25

Re: [PATCH v3 bpf-next 11/11] bpf: selftest: Use bpf_skc_to_tcp_sock() in the sock_fields test

From: Alexei Starovoitov <hidden>
Date: 2020-09-22 20:16:08
Also in: bpf

On Tue, Sep 22, 2020 at 12:05:18AM -0700, Martin KaFai Lau wrote:
quoted hunk ↗ jump to hunk
 
@@ -165,9 +168,13 @@ int egress_read_sock_fields(struct __sk_buff *skb)
 	tpcpy(tp_ret, tp);
 
 	if (sk_ret == &srv_sk) {
+		ktp = bpf_skc_to_tcp_sock(sk);
+		if (!ktp)
+			RET_LOG();
+		lsndtime = ktp->lsndtime;
If I understood the patches correctly they extend the use cases significantly,
but this test only covers cgroup/egress type with one particular helper.
Could you please expand the test cases to cover more of things from earlier
patches. Patch 7 covers some, but imo not enough.
Similarly the case of sk_release(sk) in one place and sk_release(ktp)
in another branch (one you mention in commit log) needs to have
C based selftest as well.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help