ANDROID: GKI: net: add vendor hooks for link data path
add vendor hooks to support link data path feature. 1.android_vh_dc_send_copy For send copy pkt on the other ways 2.android_vh_dc_receive For Drop duplicated pkt when dual connection connected Bug: 343838581 Change-Id: I31acba1827205c366a4f54c4b940d4d8f2c21bff Signed-off-by: Dezhi Huang <huangdezhi@hihonor.com> (cherry picked from commit 86dd89554f8308fcd58af6156fd67ac2ac7facbf) (cherry picked from commit f949397a1b86bdb461a14176db4a7cdc6cc63cbc)
This commit is contained in:
committed by
Treehugger Robot
parent
76532812c0
commit
8689d027d8
@@ -177,6 +177,8 @@ EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_check_mmap_file);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_check_file_open);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_gic_v3_suspend);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_gic_set_affinity);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_dc_send_copy);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_dc_receive);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_check_bpf_syscall);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_rproc_recovery);
|
||||
EXPORT_TRACEPOINT_SYMBOL_GPL(android_vh_rproc_recovery_set);
|
||||
|
||||
@@ -81,6 +81,11 @@ DECLARE_HOOK(android_vh_tcp_rcv_established_fast_path,
|
||||
TP_PROTO(struct sock *sk), TP_ARGS(sk));
|
||||
DECLARE_HOOK(android_vh_tcp_rcv_established_slow_path,
|
||||
TP_PROTO(struct sock *sk), TP_ARGS(sk));
|
||||
struct net_device;
|
||||
DECLARE_HOOK(android_vh_dc_send_copy,
|
||||
TP_PROTO(struct sk_buff *skb, struct net_device *dev), TP_ARGS(skb, dev));
|
||||
DECLARE_HOOK(android_vh_dc_receive,
|
||||
TP_PROTO(struct sk_buff *skb, int *flag), TP_ARGS(skb, flag));
|
||||
/* macro versions of hooks are no longer required */
|
||||
|
||||
#endif /* _TRACE_HOOK_NET_VH_H */
|
||||
|
||||
@@ -3625,6 +3625,9 @@ static int xmit_one(struct sk_buff *skb, struct net_device *dev,
|
||||
|
||||
len = skb->len;
|
||||
trace_net_dev_start_xmit(skb, dev);
|
||||
|
||||
trace_android_vh_dc_send_copy(skb, dev);
|
||||
|
||||
rc = netdev_start_xmit(skb, dev, txq, more);
|
||||
trace_net_dev_xmit(skb, rc, dev, len);
|
||||
|
||||
@@ -5509,6 +5512,7 @@ static int __netif_receive_skb_core(struct sk_buff **pskb, bool pfmemalloc,
|
||||
bool deliver_exact = false;
|
||||
int ret = NET_RX_DROP;
|
||||
__be16 type;
|
||||
int flag = 0;
|
||||
|
||||
net_timestamp_check(!READ_ONCE(net_hotdata.tstamp_prequeue), skb);
|
||||
|
||||
@@ -5528,6 +5532,10 @@ another_round:
|
||||
|
||||
__this_cpu_inc(softnet_data.processed);
|
||||
|
||||
trace_android_vh_dc_receive(skb, &flag);
|
||||
if (flag != 0)
|
||||
return NET_RX_DROP;
|
||||
|
||||
if (static_branch_unlikely(&generic_xdp_needed_key)) {
|
||||
int ret2;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user