Explorar el Código

perf: Iab531beda540cfbc18d901b217679dcc4c9b5337

Update to version Iab531beda540cfbc18d901b217679dcc4c9b5337

CRs-Fixed: 3433813
Change-Id: Iab531beda540cfbc18d901b217679dcc4c9b5337
Signed-off-by: Subash Abhinov Kasiviswanathan <[email protected]>
Subash Abhinov Kasiviswanathan hace 2 años
padre
commit
b542ad53dd
Se han modificado 2 ficheros con 63 adiciones y 95 borrados
  1. 6 6
      perf/rmnet_perf_main.c
  2. 57 89
      perf/rmnet_perf_tcp.c

+ 6 - 6
perf/rmnet_perf_main.c

@@ -19,12 +19,12 @@
 #include "rmnet_perf_tcp.h"
 #include "rmnet_perf_udp.h"
 MODULE_LICENSE("\x47\x50\x4c\x20\x76\x32");static char*verinfo[]={
-"\x61\x33\x62\x61\x62\x64\x34\x30","\x37\x66\x30\x37\x38\x66\x39\x36",
-"\x65\x35\x36\x63\x62\x35\x35\x64","\x65\x32\x31\x38\x66\x34\x35\x31",
-"\x33\x39\x63\x62\x64\x37\x64\x35","\x37\x34\x31\x35\x39\x32\x31\x63",
-"\x34\x64\x65\x34\x39\x64\x62\x35","\x62\x31\x63\x34\x34\x62\x34\x63"};
-module_param_array(verinfo,charp,NULL,(0xcb7+5769-0x221c));MODULE_PARM_DESC(
-verinfo,
+"\x34\x63\x39\x62\x35\x33\x33\x37","\x61\x33\x62\x61\x62\x64\x34\x30",
+"\x37\x66\x30\x37\x38\x66\x39\x36","\x65\x35\x36\x63\x62\x35\x35\x64",
+"\x65\x32\x31\x38\x66\x34\x35\x31","\x33\x39\x63\x62\x64\x37\x64\x35",
+"\x37\x34\x31\x35\x39\x32\x31\x63","\x34\x64\x65\x34\x39\x64\x62\x35",
+"\x62\x31\x63\x34\x34\x62\x34\x63"};module_param_array(verinfo,charp,NULL,
+(0xcb7+5769-0x221c));MODULE_PARM_DESC(verinfo,
 "\x56\x65\x72\x73\x69\x6f\x6e\x20\x6f\x66\x20\x74\x68\x65\x20\x64\x72\x69\x76\x65\x72"
 );static bool DATARMNETc03b668e4c=true;module_param_named(rmnet_perf_knob0,
 DATARMNETc03b668e4c,bool,(0xdb7+6665-0x261c));static bool DATARMNET21c7a3c377=

+ 57 - 89
perf/rmnet_perf_tcp.c

@@ -35,30 +35,28 @@ DATARMNET815cbb4bf5;};union{__be32 DATARMNET2cb607d686;struct in6_addr
 DATARMNETc3f31215b7;};union{struct{__be16 DATARMNET08e913477e;__be16 
 DATARMNETda7f7fa492;};u32 DATARMNET556bcfcf8f;};u8 DATARMNET0d956cc77a;};struct 
 DATARMNETddbc1e5435{struct hlist_node hash;struct rcu_head DATARMNET28bfe9e6ad;
-struct DATARMNET4b40fe9cd4 DATARMNET54338da2ff;struct sock*DATARMNETa3e9a18f1b;
-unsigned long DATARMNET763f2e5fac;u32 DATARMNETfef3675ce7;u32 
-DATARMNET9076d335ab;u32 DATARMNET9c389f3b86;u32 DATARMNET9a57846b4e;u32 
-DATARMNETb8fc35ed64;bool DATARMNET55056146f6;u8 DATARMNET1717afebc7;};struct 
-DATARMNET74cfea3d20{struct delayed_work DATARMNET190b4452e8;bool 
-DATARMNETcd94e0d3c7;};static DEFINE_SPINLOCK(DATARMNET8e3721c47d);static 
-DEFINE_HASHTABLE(DATARMNET1fd012f255,DATARMNET347bd5eb15);static u32 
-DATARMNET1c62a8e2c9;static struct DATARMNET74cfea3d20 DATARMNETac6535da80;static
- u32 DATARMNET84337b8855=(0xeb7+698-0x110d);module_param_named(
-rmnet_perf_tcp_knob0,DATARMNET84337b8855,uint,(0xdb7+6665-0x261c));static u64 
-DATARMNETeb09e391b5[DATARMNETaa18c75b61];module_param_array_named(
-rmnet_perf_tcp_stat,DATARMNETeb09e391b5,ullong,NULL,(0xcb7+5769-0x221c));static 
-void DATARMNET32b91c8ae6(u32 DATARMNET248f120dd5){if(DATARMNET248f120dd5<
-DATARMNETaa18c75b61)DATARMNETeb09e391b5[DATARMNET248f120dd5]+=(0xd26+209-0xdf6);
-}static bool DATARMNETd92eab34a9(struct DATARMNETddbc1e5435*DATARMNET63b1a086d5,
-unsigned long DATARMNET763f2e5fac){unsigned long DATARMNETc2d5c71ce1;
-DATARMNETc2d5c71ce1=msecs_to_jiffies(DATARMNET3dad3dfdc0);if(DATARMNET763f2e5fac
--DATARMNET63b1a086d5->DATARMNET763f2e5fac>DATARMNETc2d5c71ce1)return true;return
- false;}static void DATARMNET776e08992c(struct rcu_head*DATARMNET5d432e897f){
-struct DATARMNETddbc1e5435*DATARMNET63b1a086d5;DATARMNET63b1a086d5=container_of(
-DATARMNET5d432e897f,struct DATARMNETddbc1e5435,DATARMNET28bfe9e6ad);if(!
-IS_ERR_OR_NULL(DATARMNET63b1a086d5->DATARMNETa3e9a18f1b))sock_put(
-DATARMNET63b1a086d5->DATARMNETa3e9a18f1b);kfree(DATARMNET63b1a086d5);}static 
-bool DATARMNETb8167597bc(bool DATARMNETe78ad140cc){struct DATARMNETddbc1e5435*
+struct DATARMNET4b40fe9cd4 DATARMNET54338da2ff;unsigned long DATARMNET763f2e5fac
+;u32 DATARMNETfef3675ce7;u32 DATARMNET9076d335ab;u32 DATARMNET9c389f3b86;u32 
+DATARMNET9a57846b4e;u32 DATARMNETb8fc35ed64;bool DATARMNET55056146f6;u8 
+DATARMNET1717afebc7;};struct DATARMNET74cfea3d20{struct delayed_work 
+DATARMNET190b4452e8;bool DATARMNETcd94e0d3c7;};static DEFINE_SPINLOCK(
+DATARMNET8e3721c47d);static DEFINE_HASHTABLE(DATARMNET1fd012f255,
+DATARMNET347bd5eb15);static u32 DATARMNET1c62a8e2c9;static struct 
+DATARMNET74cfea3d20 DATARMNETac6535da80;static u32 DATARMNET84337b8855=
+(0xeb7+698-0x110d);module_param_named(rmnet_perf_tcp_knob0,DATARMNET84337b8855,
+uint,(0xdb7+6665-0x261c));static u64 DATARMNETeb09e391b5[DATARMNETaa18c75b61];
+module_param_array_named(rmnet_perf_tcp_stat,DATARMNETeb09e391b5,ullong,NULL,
+(0xcb7+5769-0x221c));static void DATARMNET32b91c8ae6(u32 DATARMNET248f120dd5){if
+(DATARMNET248f120dd5<DATARMNETaa18c75b61)DATARMNETeb09e391b5[DATARMNET248f120dd5
+]+=(0xd26+209-0xdf6);}static bool DATARMNETd92eab34a9(struct DATARMNETddbc1e5435
+*DATARMNET63b1a086d5,unsigned long DATARMNET763f2e5fac){unsigned long 
+DATARMNETc2d5c71ce1;DATARMNETc2d5c71ce1=msecs_to_jiffies(DATARMNET3dad3dfdc0);if
+(DATARMNET763f2e5fac-DATARMNET63b1a086d5->DATARMNET763f2e5fac>
+DATARMNETc2d5c71ce1)return true;return false;}static void DATARMNET776e08992c(
+struct rcu_head*DATARMNET5d432e897f){struct DATARMNETddbc1e5435*
+DATARMNET63b1a086d5;DATARMNET63b1a086d5=container_of(DATARMNET5d432e897f,struct 
+DATARMNETddbc1e5435,DATARMNET28bfe9e6ad);kfree(DATARMNET63b1a086d5);}static bool
+ DATARMNETb8167597bc(bool DATARMNETe78ad140cc){struct DATARMNETddbc1e5435*
 DATARMNET63b1a086d5;struct hlist_node*DATARMNET0386f6f82a;unsigned long 
 DATARMNET763f2e5fac;int DATARMNET5c2fd31d7b;DATARMNET763f2e5fac=jiffies;
 hash_for_each_safe(DATARMNET1fd012f255,DATARMNET5c2fd31d7b,DATARMNET0386f6f82a,
@@ -129,75 +127,45 @@ DATARMNET8e3721c47d,DATARMNETfb0677cc3c);return DATARMNET63b1a086d5;}}
 DATARMNET63b1a086d5=DATARMNETba919c78e5(DATARMNET3396919a68);
 spin_unlock_irqrestore(&DATARMNET8e3721c47d,DATARMNETfb0677cc3c);if(
 DATARMNET63b1a086d5)DATARMNET11a5f0fd38(DATARMNET63b1a086d5,DATARMNET543491eb0f,
-DATARMNETd147c14c0e);return DATARMNET63b1a086d5;}static struct sock*
-DATARMNETc0b5d624ae(struct DATARMNET4b40fe9cd4*DATARMNET3396919a68,struct 
-net_device*DATARMNETc96400be1e){struct net*net=dev_net(DATARMNETc96400be1e);if(
-DATARMNET3396919a68->DATARMNET0d956cc77a==(0xd11+230-0xdf3))return 
-inet_lookup_established(net,&tcp_hashinfo,DATARMNET3396919a68->
-DATARMNETdfe430c2d6,DATARMNET3396919a68->DATARMNET08e913477e,DATARMNET3396919a68
-->DATARMNET2cb607d686,DATARMNET3396919a68->DATARMNETda7f7fa492,
-DATARMNETc96400be1e->ifindex);return __inet6_lookup_established(net,&
-tcp_hashinfo,&DATARMNET3396919a68->DATARMNET815cbb4bf5,DATARMNET3396919a68->
-DATARMNET08e913477e,&DATARMNET3396919a68->DATARMNETc3f31215b7,ntohs(
-DATARMNET3396919a68->DATARMNETda7f7fa492),DATARMNETc96400be1e->ifindex,
-(0xd2d+202-0xdf7));}static void DATARMNET31a7673e56(struct DATARMNETddbc1e5435*
-DATARMNET63b1a086d5,struct sk_buff*DATARMNET543491eb0f)__must_hold(RCU){struct 
-sock*sk;if(DATARMNET543491eb0f->sk){sk=DATARMNET543491eb0f->sk;}else if(
-DATARMNET63b1a086d5->DATARMNETa3e9a18f1b){sk=DATARMNET63b1a086d5->
-DATARMNETa3e9a18f1b;}else if((sk=DATARMNETc0b5d624ae(&DATARMNET63b1a086d5->
-DATARMNET54338da2ff,DATARMNET543491eb0f->dev))){DATARMNET63b1a086d5->
-DATARMNETa3e9a18f1b=sk;}else{struct rmnet_skb_cb*DATARMNET1ec4882bf7=
+DATARMNETd147c14c0e);return DATARMNET63b1a086d5;}static void DATARMNET31a7673e56
+(struct DATARMNETddbc1e5435*DATARMNET63b1a086d5,struct sk_buff*
+DATARMNET543491eb0f)__must_hold(RCU){struct sock*sk;if(DATARMNET543491eb0f->sk){
+sk=DATARMNET543491eb0f->sk;}else{struct rmnet_skb_cb*DATARMNET1ec4882bf7=
 RMNET_SKB_CB(DATARMNET543491eb0f);DATARMNET32b91c8ae6(DATARMNETb03f9571a3);
 DATARMNET63b1a086d5->DATARMNET55056146f6=true;DATARMNET1ec4882bf7->tethered=true
-;return;}if(!DATARMNET543491eb0f->sk){sock_hold(sk);DATARMNET543491eb0f->sk=sk;
-DATARMNET543491eb0f->destructor=sock_edemux;if(sk_fullsock(sk)){struct dst_entry
-*dst=rcu_dereference(sk->sk_rx_dst);if(dst){u32 DATARMNETc8fe0ce669=(
-DATARMNET63b1a086d5->DATARMNET54338da2ff.DATARMNET0d956cc77a==(0xd11+230-0xdf3))
-?(0xd2d+202-0xdf7):sk->sk_rx_dst_cookie;dst=dst_check(dst,DATARMNETc8fe0ce669);}
-if(dst&&sk->sk_rx_dst_ifindex==DATARMNET543491eb0f->dev->ifindex)
-skb_dst_set_noref(DATARMNET543491eb0f,dst);}}inet_csk(sk)->icsk_ack.pending|=
-ICSK_ACK_NOW;DATARMNET63b1a086d5->DATARMNETb8fc35ed64++;DATARMNET32b91c8ae6(
-DATARMNET7797205f58);}static u32 DATARMNET62fb576113(struct sk_buff*
-DATARMNET543491eb0f){struct tcphdr*DATARMNET668416551c=tcp_hdr(
-DATARMNET543491eb0f);return DATARMNET543491eb0f->len-((u8*)DATARMNET668416551c-
-DATARMNET543491eb0f->data)-DATARMNET668416551c->doff*(0xd11+230-0xdf3);}static 
-void DATARMNET55fda9e01e(struct DATARMNETddbc1e5435*DATARMNET63b1a086d5,struct 
-sk_buff*DATARMNET543491eb0f,bool DATARMNETd147c14c0e)__must_hold(RCU){struct 
+;return;}}static u32 DATARMNET62fb576113(struct sk_buff*DATARMNET543491eb0f){
+struct tcphdr*DATARMNET668416551c=tcp_hdr(DATARMNET543491eb0f);return 
+DATARMNET543491eb0f->len-((u8*)DATARMNET668416551c-DATARMNET543491eb0f->data)-
+DATARMNET668416551c->doff*(0xd11+230-0xdf3);}static void DATARMNET55fda9e01e(
+struct DATARMNETddbc1e5435*DATARMNET63b1a086d5,struct sk_buff*
+DATARMNET543491eb0f,bool DATARMNETd147c14c0e)__must_hold(RCU){struct 
 rmnet_skb_cb*DATARMNET1ec4882bf7=RMNET_SKB_CB(DATARMNET543491eb0f);struct tcphdr
-*DATARMNET668416551c=tcp_hdr(DATARMNET543491eb0f);u32 DATARMNET26945497d8=ntohl(
-DATARMNET668416551c->seq);u32 DATARMNETb1b0ee1b2d=ntohl(DATARMNET668416551c->
-ack_seq);u32 DATARMNETb6ff6d25f8=READ_ONCE(DATARMNET63b1a086d5->
-DATARMNETfef3675ce7);u32 DATARMNET91c1d5c029=READ_ONCE(DATARMNET63b1a086d5->
-DATARMNET9076d335ab);u32 DATARMNET9445bc443c=READ_ONCE(DATARMNET63b1a086d5->
-DATARMNET9a57846b4e);DATARMNET63b1a086d5->DATARMNET763f2e5fac=jiffies;if(
-DATARMNET63b1a086d5->DATARMNET55056146f6){DATARMNET1ec4882bf7->tethered=true;
-return;}if(DATARMNETd147c14c0e){if(after(DATARMNETb1b0ee1b2d,DATARMNET91c1d5c029
-)){u32 DATARMNET4e557c82d6=DATARMNETb6ff6d25f8-DATARMNETb1b0ee1b2d;if(
-DATARMNET4e557c82d6>DATARMNET9445bc443c)DATARMNET31a7673e56(DATARMNET63b1a086d5,
-DATARMNET543491eb0f);WRITE_ONCE(DATARMNET63b1a086d5->DATARMNET9076d335ab,
-DATARMNETb1b0ee1b2d);}}else{u32 DATARMNET4e557c82d6=DATARMNETb6ff6d25f8-
-DATARMNET91c1d5c029;if(after(DATARMNET26945497d8,DATARMNETb6ff6d25f8)){
-DATARMNET4e557c82d6=DATARMNET26945497d8-DATARMNET91c1d5c029;DATARMNET4e557c82d6
-+=DATARMNET62fb576113(DATARMNET543491eb0f);if(DATARMNET4e557c82d6>
+*DATARMNET668416551c=tcp_hdr(DATARMNET543491eb0f);u32 DATARMNETb1b0ee1b2d=ntohl(
+DATARMNET668416551c->ack_seq);u32 DATARMNETb6ff6d25f8=READ_ONCE(
+DATARMNET63b1a086d5->DATARMNETfef3675ce7);u32 DATARMNET91c1d5c029=READ_ONCE(
+DATARMNET63b1a086d5->DATARMNET9076d335ab);u32 DATARMNET9445bc443c=READ_ONCE(
+DATARMNET63b1a086d5->DATARMNET9a57846b4e);DATARMNET63b1a086d5->
+DATARMNET763f2e5fac=jiffies;if(DATARMNET63b1a086d5->DATARMNET55056146f6){
+DATARMNET1ec4882bf7->tethered=true;return;}if(DATARMNETd147c14c0e){if(after(
+DATARMNETb1b0ee1b2d,DATARMNET91c1d5c029)){u32 DATARMNET4e557c82d6=
+DATARMNETb6ff6d25f8-DATARMNETb1b0ee1b2d;if(DATARMNET4e557c82d6>
 DATARMNET9445bc443c)DATARMNET31a7673e56(DATARMNET63b1a086d5,DATARMNET543491eb0f)
-;WRITE_ONCE(DATARMNET63b1a086d5->DATARMNETfef3675ce7,DATARMNET26945497d8);}
-DATARMNET1ec4882bf7->bif=DATARMNET4e557c82d6;DATARMNET1ec4882bf7->ack_thresh=
-DATARMNET9445bc443c;DATARMNET1ec4882bf7->ack_forced=DATARMNET63b1a086d5->
-DATARMNETb8fc35ed64;}}void DATARMNET9250714999(struct sk_buff*
-DATARMNET543491eb0f){struct DATARMNET4b40fe9cd4 DATARMNET3396919a68={};struct 
-DATARMNETddbc1e5435*DATARMNET63b1a086d5;struct tcphdr*DATARMNET668416551c;u32 
-DATARMNETd660a1a629;if(!skb_transport_header_was_set(DATARMNET543491eb0f)||
-DATARMNET543491eb0f->ip_summed==CHECKSUM_NONE)return;DATARMNET668416551c=tcp_hdr
-(DATARMNET543491eb0f);if(DATARMNET668416551c->syn)return;DATARMNETd660a1a629=
-DATARMNET62fb576113(DATARMNET543491eb0f);if(!DATARMNETd660a1a629&&
-DATARMNET668416551c->ack)return;DATARMNET3396919a68.DATARMNET08e913477e=
-DATARMNET668416551c->source;DATARMNET3396919a68.DATARMNETda7f7fa492=
-DATARMNET668416551c->dest;if(DATARMNET543491eb0f->protocol==htons(ETH_P_IP)){
-struct iphdr*DATARMNET86f1f2cdc9=ip_hdr(DATARMNET543491eb0f);DATARMNET3396919a68
-.DATARMNETdfe430c2d6=DATARMNET86f1f2cdc9->saddr;DATARMNET3396919a68.
-DATARMNET2cb607d686=DATARMNET86f1f2cdc9->daddr;DATARMNET3396919a68.
-DATARMNET0d956cc77a=(0xd11+230-0xdf3);}else{struct ipv6hdr*DATARMNETbf55123e5b=
-ipv6_hdr(DATARMNET543491eb0f);memcpy(&DATARMNET3396919a68.DATARMNET815cbb4bf5,&
+;WRITE_ONCE(DATARMNET63b1a086d5->DATARMNET9076d335ab,DATARMNETb1b0ee1b2d);}}}
+void DATARMNET9250714999(struct sk_buff*DATARMNET543491eb0f){struct 
+DATARMNET4b40fe9cd4 DATARMNET3396919a68={};struct DATARMNETddbc1e5435*
+DATARMNET63b1a086d5;struct tcphdr*DATARMNET668416551c;u32 DATARMNETd660a1a629;if
+(!skb_transport_header_was_set(DATARMNET543491eb0f)||DATARMNET543491eb0f->
+ip_summed==CHECKSUM_NONE)return;DATARMNET668416551c=tcp_hdr(DATARMNET543491eb0f)
+;if(DATARMNET668416551c->syn)return;DATARMNETd660a1a629=DATARMNET62fb576113(
+DATARMNET543491eb0f);if(!DATARMNETd660a1a629&&DATARMNET668416551c->ack)return;
+DATARMNET3396919a68.DATARMNET08e913477e=DATARMNET668416551c->source;
+DATARMNET3396919a68.DATARMNETda7f7fa492=DATARMNET668416551c->dest;if(
+DATARMNET543491eb0f->protocol==htons(ETH_P_IP)){struct iphdr*DATARMNET86f1f2cdc9
+=ip_hdr(DATARMNET543491eb0f);DATARMNET3396919a68.DATARMNETdfe430c2d6=
+DATARMNET86f1f2cdc9->saddr;DATARMNET3396919a68.DATARMNET2cb607d686=
+DATARMNET86f1f2cdc9->daddr;DATARMNET3396919a68.DATARMNET0d956cc77a=
+(0xd11+230-0xdf3);}else{struct ipv6hdr*DATARMNETbf55123e5b=ipv6_hdr(
+DATARMNET543491eb0f);memcpy(&DATARMNET3396919a68.DATARMNET815cbb4bf5,&
 DATARMNETbf55123e5b->saddr,sizeof(DATARMNETbf55123e5b->saddr));memcpy(&
 DATARMNET3396919a68.DATARMNETc3f31215b7,&DATARMNETbf55123e5b->daddr,sizeof(
 DATARMNETbf55123e5b->daddr));DATARMNET3396919a68.DATARMNET0d956cc77a=