[PATCH bpf-next v2 3/6] tcp: bpf: support bpf_getsockopt for TCP_BPF_DELACK_MAX

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Support bpf_getsockopt if application tries to know what the delayed ack
max time is.

Signed-off-by: Jason Xing <kerneljasonxing@xxxxxxxxx>
---
 net/core/filter.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/net/core/filter.c b/net/core/filter.c
index 4d34d35af5c7..46ae8eb7a03c 100644
--- a/net/core/filter.c
+++ b/net/core/filter.c
@@ -5301,6 +5301,12 @@ static int bpf_sol_tcp_getsockopt(struct sock *sk, int optname,
 		memcpy(optval, &rto_min_us, optlen);
 		break;
 	}
+	case TCP_BPF_DELACK_MAX: {
+		int delack_max_us = jiffies_to_usecs(inet_csk(sk)->icsk_delack_max);
+
+		memcpy(optval, &delack_max_us, optlen);
+		break;
+	}
 	default:
 		return -EINVAL;
 	}
-- 
2.43.5





[Index of Archives]     [Linux Samsung SoC]     [Linux Rockchip SoC]     [Linux Actions SoC]     [Linux for Synopsys ARC Processors]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]


  Powered by Linux