Home
last modified time | relevance | path

Searched refs:diff (Results 1 – 25 of 41) sorted by relevance

12

/net/ipv6/ila/
Dila_common.c44 __wsum diff, fval; in ila_csum_do_neutral_fmt() local
46 diff = get_csum_diff_iaddr(iaddr, p); in ila_csum_do_neutral_fmt()
51 diff = csum_add(diff, fval); in ila_csum_do_neutral_fmt()
53 *adjust = ~csum_fold(csum_add(diff, csum_unfold(*adjust))); in ila_csum_do_neutral_fmt()
67 __wsum diff; in ila_csum_do_neutral_nofmt() local
69 diff = get_csum_diff_iaddr(iaddr, p); in ila_csum_do_neutral_nofmt()
71 *adjust = ~csum_fold(csum_add(diff, csum_unfold(*adjust))); in ila_csum_do_neutral_nofmt()
79 __wsum diff; in ila_csum_adjust_transport() local
87 diff = get_csum_diff(ip6h, p); in ila_csum_adjust_transport()
89 diff, true); in ila_csum_adjust_transport()
[all …]
Dila.h81 __be32 diff[] = { in compute_csum_diff8() local
85 return csum_partial(diff, sizeof(diff), 0); in compute_csum_diff8()
/net/xfrm/
Dxfrm_replay.c110 u32 diff; in xfrm_replay_check() local
122 diff = x->replay.seq - seq; in xfrm_replay_check()
123 if (diff >= x->props.replay_window) { in xfrm_replay_check()
128 if (x->replay.bitmap & (1U << diff)) { in xfrm_replay_check()
141 u32 diff; in xfrm_replay_advance() local
148 diff = seq - x->replay.seq; in xfrm_replay_advance()
149 if (diff < x->props.replay_window) in xfrm_replay_advance()
150 x->replay.bitmap = ((x->replay.bitmap) << diff) | 1; in xfrm_replay_advance()
155 diff = x->replay.seq - seq; in xfrm_replay_advance()
156 x->replay.bitmap |= (1U << diff); in xfrm_replay_advance()
[all …]
/net/batman-adv/
Dbitarray.h30 s32 diff; in batadv_test_bit() local
32 diff = last_seqno - curr_seqno; in batadv_test_bit()
33 if (diff < 0 || diff >= BATADV_TQ_LOCAL_WINDOW_SIZE) in batadv_test_bit()
35 return test_bit(diff, seq_bits) != 0; in batadv_test_bit()
/net/core/
Dutils.c462 __be32 diff[] = { in inet_proto_csum_replace16() local
467 *sum = csum_fold(csum_partial(diff, sizeof(diff), in inet_proto_csum_replace16()
470 *sum = ~csum_fold(csum_partial(diff, sizeof(diff), in inet_proto_csum_replace16()
476 __wsum diff, bool pseudohdr) in inet_proto_csum_replace_by_diff() argument
479 *sum = csum_fold(csum_add(diff, ~csum_unfold(*sum))); in inet_proto_csum_replace_by_diff()
481 skb->csum = ~csum_add(diff, ~skb->csum); in inet_proto_csum_replace_by_diff()
483 *sum = ~csum_fold(csum_add(diff, csum_unfold(*sum))); in inet_proto_csum_replace_by_diff()
/net/netfilter/ipvs/
Dip_vs_app.c347 unsigned int flag, __u32 seq, int diff) in vs_seq_update() argument
353 vseq->delta += diff; in vs_seq_update()
364 int diff; in app_tcp_pkt_out() local
393 if (!app->pkt_out(app, cp, skb, &diff, ipvsh)) in app_tcp_pkt_out()
399 if (diff != 0) in app_tcp_pkt_out()
401 IP_VS_CONN_F_OUT_SEQ, seq, diff); in app_tcp_pkt_out()
441 int diff; in app_tcp_pkt_in() local
470 if (!app->pkt_in(app, cp, skb, &diff, ipvsh)) in app_tcp_pkt_in()
476 if (diff != 0) in app_tcp_pkt_in()
478 IP_VS_CONN_F_IN_SEQ, seq, diff); in app_tcp_pkt_in()
Dip_vs_ftp.c249 struct sk_buff *skb, int *diff, in ip_vs_ftp_out() argument
263 *diff = 0; in ip_vs_ftp_out()
419 struct sk_buff *skb, int *diff, in ip_vs_ftp_in() argument
429 *diff = 0; in ip_vs_ftp_in()
/net/rds/
Dib_ring.c75 u32 diff; in __rds_ib_ring_used() local
78 diff = ring->w_alloc_ctr - (u32) atomic_read(&ring->w_free_ctr); in __rds_ib_ring_used()
79 BUG_ON(diff > ring->w_nr); in __rds_ib_ring_used()
81 return diff; in __rds_ib_ring_used()
Dcong.c112 int diff; in rds_cong_tree_walk() local
117 diff = rds_addr_cmp(addr, &map->m_addr); in rds_cong_tree_walk()
118 if (diff < 0) in rds_cong_tree_walk()
120 else if (diff > 0) in rds_cong_tree_walk()
/net/sched/
Dsch_htb.c503 htb_class_mode(struct htb_class *cl, s64 *diff) in htb_class_mode() argument
507 if ((toks = (cl->ctokens + *diff)) < htb_lowater(cl)) { in htb_class_mode()
508 *diff = -toks; in htb_class_mode()
512 if ((toks = (cl->tokens + *diff)) >= htb_hiwater(cl)) in htb_class_mode()
515 *diff = -toks; in htb_class_mode()
529 htb_change_class_mode(struct htb_sched *q, struct htb_class *cl, s64 *diff) in htb_change_class_mode() argument
531 enum htb_cmode new_mode = htb_class_mode(cl, diff); in htb_change_class_mode()
621 static inline void htb_accnt_tokens(struct htb_class *cl, int bytes, s64 diff) in htb_accnt_tokens() argument
623 s64 toks = diff + cl->tokens; in htb_accnt_tokens()
634 static inline void htb_accnt_ctokens(struct htb_class *cl, int bytes, s64 diff) in htb_accnt_ctokens() argument
[all …]
/net/ipv4/
Dtcp_vegas.c198 u32 rtt, diff; in tcp_vegas_cong_avoid() local
227 diff = tp->snd_cwnd * (rtt-vegas->baseRTT) / vegas->baseRTT; in tcp_vegas_cong_avoid()
229 if (diff > gamma && tcp_in_slow_start(tp)) { in tcp_vegas_cong_avoid()
253 if (diff > beta) { in tcp_vegas_cong_avoid()
260 } else if (diff < alpha) { in tcp_vegas_cong_avoid()
Dtcp_htcp.c177 u32 diff = htcp_cong_time(ca); in htcp_alpha_update() local
179 if (diff > HZ) { in htcp_alpha_update()
180 diff -= HZ; in htcp_alpha_update()
181 factor = 1 + (10 * diff + ((diff / 2) * (diff / 2) / HZ)) / HZ; in htcp_alpha_update()
Dtcp_veno.c33 u32 diff; /* calculate the diff rate */ member
153 veno->diff = (tp->snd_cwnd << V_PARAM_SHIFT) - target_cwnd; in tcp_veno_cong_avoid()
163 if (veno->diff < beta) { in tcp_veno_cong_avoid()
200 if (veno->diff < beta) in tcp_veno_ssthresh()
Dsyncookies.c117 u32 diff, count = tcp_cookie_time(); in check_tcp_syn_cookie() local
123 diff = (count - (cookie >> COOKIEBITS)) & ((__u32) -1 >> COOKIEBITS); in check_tcp_syn_cookie()
124 if (diff >= MAX_SYNCOOKIE_AGE) in check_tcp_syn_cookie()
128 cookie_hash(saddr, daddr, sport, dport, count - diff, 1)) in check_tcp_syn_cookie()
/net/smc/
Dsmc_cdc.c33 int diff; in smc_cdc_tx_handler() local
39 diff = smc_curs_diff(sndbuf_desc->len, in smc_cdc_tx_handler()
44 atomic_add(diff, &cdcpend->conn->sndbuf_space); in smc_cdc_tx_handler()
230 int rc, diff; in smcd_cdc_msg_send() local
248 diff = smc_curs_diff(conn->sndbuf_desc->len, &conn->tx_curs_fin, in smcd_cdc_msg_send()
252 atomic_add(diff, &conn->sndbuf_space); in smcd_cdc_msg_send()
293 s16 diff; in smc_cdc_msg_validate() local
296 diff = conn->local_rx_ctrl.seqno - recv_seq; in smc_cdc_msg_validate()
297 if (diff < 0) { /* diff larger than 0x7fff */ in smc_cdc_msg_validate()
Dsmc_rx.c59 int diff, rc = 0; in smc_rx_update_consumer() local
65 diff = smc_curs_comp(conn->rmb_desc->len, &cons, in smc_rx_update_consumer()
68 if (diff == 0) { in smc_rx_update_consumer()
74 if (diff == 1) { in smc_rx_update_consumer()
79 } else if (diff < -1) in smc_rx_update_consumer()
/net/rxrpc/
Dlocal_object.c37 long diff; in rxrpc_local_cmp_key() local
39 diff = ((local->srx.transport_type - srx->transport_type) ?: in rxrpc_local_cmp_key()
42 if (diff != 0) in rxrpc_local_cmp_key()
43 return diff; in rxrpc_local_cmp_key()
204 long diff; in rxrpc_lookup_local() local
215 diff = rxrpc_local_cmp_key(local, srx); in rxrpc_lookup_local()
216 if (diff != 0) in rxrpc_lookup_local()
Dconn_client.c279 long diff; in rxrpc_look_up_bundle() local
295 diff = (cmp(peer) ?: in rxrpc_look_up_bundle()
300 if (diff < 0) in rxrpc_look_up_bundle()
302 else if (diff > 0) in rxrpc_look_up_bundle()
324 diff = (cmp(peer) ?: in rxrpc_look_up_bundle()
329 if (diff < 0) in rxrpc_look_up_bundle()
331 else if (diff > 0) in rxrpc_look_up_bundle()
Dpeer_object.c81 long diff; in rxrpc_peer_cmp_key() local
83 diff = ((peer->hash_key - hash_key) ?: in rxrpc_peer_cmp_key()
88 if (diff != 0) in rxrpc_peer_cmp_key()
89 return diff; in rxrpc_peer_cmp_key()
/net/netfilter/
Dnf_conncount.c321 int diff; in insert_tree() local
325 diff = key_diff(key, rbconn->key, keylen); in insert_tree()
326 if (diff < 0) { in insert_tree()
328 } else if (diff > 0) { in insert_tree()
402 int diff; in count_tree() local
406 diff = key_diff(key, rbconn->key, keylen); in count_tree()
407 if (diff < 0) { in count_tree()
409 } else if (diff > 0) { in count_tree()
Dnfnetlink_queue.c837 nfqnl_mangle(void *data, unsigned int data_len, struct nf_queue_entry *e, int diff) in nfqnl_mangle() argument
841 if (diff < 0) { in nfqnl_mangle()
849 } else if (diff > 0) { in nfqnl_mangle()
852 if (diff > skb_tailroom(e->skb)) { in nfqnl_mangle()
854 diff, GFP_ATOMIC); in nfqnl_mangle()
860 skb_put(e->skb, diff); in nfqnl_mangle()
1216 int diff = payload_len - entry->skb->len; in nfqnl_recv_verdict() local
1219 payload_len, entry, diff) < 0) in nfqnl_recv_verdict()
1222 if (ct && diff) in nfqnl_recv_verdict()
1223 nfnl_ct->seq_adjust(entry->skb, ct, ctinfo, diff); in nfqnl_recv_verdict()
/net/mac80211/
Drc80211_minstrel.h42 int diff, incr; in minstrel_ewma() local
44 diff = new - old; in minstrel_ewma()
45 incr = (EWMA_DIV - weight) * diff / EWMA_DIV; in minstrel_ewma()
/net/ipv6/
Dsyncookies.c79 __u32 diff, count = tcp_cookie_time(); in check_tcp_syn_cookie() local
83 diff = (count - (cookie >> COOKIEBITS)) & ((__u32) -1 >> COOKIEBITS); in check_tcp_syn_cookie()
84 if (diff >= MAX_SYNCOOKIE_AGE) in check_tcp_syn_cookie()
88 cookie_hash(saddr, daddr, sport, dport, count - diff, 1)) in check_tcp_syn_cookie()
/net/sctp/
Dauth.c151 int diff; in sctp_auth_compare_vectors() local
155 diff = vector1->len - vector2->len; in sctp_auth_compare_vectors()
156 if (diff) { in sctp_auth_compare_vectors()
157 longer = (diff > 0) ? vector1->data : vector2->data; in sctp_auth_compare_vectors()
163 for (i = 0; i < abs(diff); i++) { in sctp_auth_compare_vectors()
165 return diff; in sctp_auth_compare_vectors()
/net/tipc/
Dmonitor.c248 bool diff; in mon_update_local_domain() local
256 diff = dom->member_cnt != member_cnt; in mon_update_local_domain()
260 diff |= dom->members[i] != peer->addr; in mon_update_local_domain()
265 diff |= dom->up_map != prev_up_map; in mon_update_local_domain()
266 if (!diff) in mon_update_local_domain()

12