From b5ee53c64e74c9ca210fb3029c9e8bc21c37179d Mon Sep 17 00:00:00 2001 From: Dezhi Huang Date: Sat, 13 Apr 2024 19:08:25 +0800 Subject: [PATCH] ANDROID: Allow vendor modules perform more operationson on sock. Export netdev_get_name, tcp_send_active_reset functions, allow vendor modules perform more operations on socks and improve users' online experience.When users browse websites or watch videos, we will sense the bad sock is on which device, so that the sock can be switched to another good device by us, so that the internet service will no longer be stuck. In a similar scenario, if the user downloads from multiple devices and the rate of one device is low,we can reset the TCP stream with a lower rate and establish it on the device with a higher rate. Bug: 334000512 Change-Id: I9ed90ea9fe6f3dc9f11ae1661ca9f2f5fdad5820 Signed-off-by: Dezhi Huang (cherry picked from commit 21614c79408f0342363db9874d315fbb3ff6553b) --- net/core/dev.c | 1 + net/ipv4/tcp_output.c | 1 + 2 files changed, 2 insertions(+) diff --git a/net/core/dev.c b/net/core/dev.c index 3c6d188148ba..809a8f3ac55f 100644 --- a/net/core/dev.c +++ b/net/core/dev.c @@ -927,6 +927,7 @@ out: up_read(&devnet_rename_sem); return ret; } +EXPORT_SYMBOL_GPL(netdev_get_name); /** * dev_getbyhwaddr_rcu - find a device by its hardware address diff --git a/net/ipv4/tcp_output.c b/net/ipv4/tcp_output.c index 0c2c1a4261a8..ad56e480eaff 100644 --- a/net/ipv4/tcp_output.c +++ b/net/ipv4/tcp_output.c @@ -3487,6 +3487,7 @@ void tcp_send_active_reset(struct sock *sk, gfp_t priority) */ trace_tcp_send_reset(sk, NULL); } +EXPORT_SYMBOL_GPL(tcp_send_active_reset); /* Send a crossed SYN-ACK during socket establishment. * WARNING: This routine must only be called when we have already sent