Lines Matching refs:hdr
251 static u16 tipc_build_gap_ack_blks(struct tipc_link *l, struct tipc_msg *hdr);
871 static int link_schedule_user(struct tipc_link *l, struct tipc_msg *hdr) in link_schedule_user() argument
874 u32 dport = msg_origport(hdr); in link_schedule_user()
883 TIPC_SKB_CB(skb)->chain_imp = msg_importance(hdr); in link_schedule_user()
1014 struct tipc_msg *hdr; in tipc_link_xmit() local
1022 hdr = buf_msg(skb_peek(list)); in tipc_link_xmit()
1023 if (unlikely(msg_size(hdr) > mtu)) { in tipc_link_xmit()
1025 skb_queue_len(list), msg_user(hdr), in tipc_link_xmit()
1026 msg_type(hdr), msg_size(hdr), mtu); in tipc_link_xmit()
1031 imp = msg_importance(hdr); in tipc_link_xmit()
1038 rc = link_schedule_user(l, hdr); in tipc_link_xmit()
1049 hdr = buf_msg(skb); in tipc_link_xmit()
1050 msg_set_seqno(hdr, seqno); in tipc_link_xmit()
1051 msg_set_ack(hdr, ack); in tipc_link_xmit()
1052 msg_set_bcast_ack(hdr, bc_ack); in tipc_link_xmit()
1143 struct tipc_msg *hdr; in tipc_link_advance_backlog() local
1155 hdr = buf_msg(skb); in tipc_link_advance_backlog()
1156 imp = msg_importance(hdr); in tipc_link_advance_backlog()
1165 msg_set_seqno(hdr, seqno); in tipc_link_advance_backlog()
1166 msg_set_ack(hdr, ack); in tipc_link_advance_backlog()
1167 msg_set_bcast_ack(hdr, bc_ack); in tipc_link_advance_backlog()
1188 struct tipc_msg *hdr; in link_retransmit_failure() local
1200 hdr = buf_msg(skb); in link_retransmit_failure()
1201 if (link_is_bc_sndlink(l) && !less(r->acked, msg_seqno(hdr))) in link_retransmit_failure()
1207 msg_user(hdr), msg_type(hdr), msg_size(hdr), msg_errcode(hdr)); in link_retransmit_failure()
1209 msg_seqno(hdr), msg_prevnode(hdr), msg_destnode(hdr)); in link_retransmit_failure()
1237 struct tipc_msg *hdr = buf_msg(skb); in tipc_data_input() local
1239 switch (msg_user(hdr)) { in tipc_data_input()
1244 if (unlikely(msg_in_group(hdr) || msg_mcast(hdr))) { in tipc_data_input()
1287 struct tipc_msg *hdr = buf_msg(skb); in tipc_link_input() local
1290 int usr = msg_user(hdr); in tipc_link_input()
1296 l->stats.recv_bundled += msg_msgcnt(hdr); in tipc_link_input()
1313 tipc_link_bc_init_rcv(l->bc_rcvlink, hdr); in tipc_link_input()
1334 struct tipc_msg *hdr = buf_msg(skb); in tipc_link_tnl_rcv() local
1340 if (msg_type(hdr) == SYNCH_MSG) { in tipc_link_tnl_rcv()
1346 if (likely(!msg_nof_fragms(hdr))) { in tipc_link_tnl_rcv()
1355 if (msg_fragm_no(hdr) == 1) in tipc_link_tnl_rcv()
1356 msg_set_type(hdr, FIRST_FRAGMENT); in tipc_link_tnl_rcv()
1357 else if (msg_fragm_no(hdr) < msg_nof_fragms(hdr)) in tipc_link_tnl_rcv()
1358 msg_set_type(hdr, FRAGMENT); in tipc_link_tnl_rcv()
1360 msg_set_type(hdr, LAST_FRAGMENT); in tipc_link_tnl_rcv()
1403 struct tipc_msg *hdr, bool uc) in tipc_get_gap_ack_blks() argument
1410 p = (struct tipc_gap_ack_blks *)msg_data(hdr); in tipc_get_gap_ack_blks()
1480 static u16 tipc_build_gap_ack_blks(struct tipc_link *l, struct tipc_msg *hdr) in tipc_build_gap_ack_blks() argument
1486 ga = (struct tipc_gap_ack_blks *)msg_data(hdr); in tipc_build_gap_ack_blks()
1490 msg_set_bcast_ack(hdr, bcl->rcv_nxt - 1); in tipc_build_gap_ack_blks()
1491 msg_set_bc_gap(hdr, link_bc_rcv_gap(bcl)); in tipc_build_gap_ack_blks()
1496 ga->ugack_cnt = (msg_seq_gap(hdr)) ? in tipc_build_gap_ack_blks()
1529 struct tipc_msg *hdr; in tipc_link_advance_transmq() local
1616 hdr = buf_msg(_skb); in tipc_link_advance_transmq()
1617 msg_set_ack(hdr, ack); in tipc_link_advance_transmq()
1618 msg_set_bcast_ack(hdr, bc_ack); in tipc_link_advance_transmq()
1754 struct tipc_msg *hdr = buf_msg(skb); in tipc_link_rcv() local
1760 if (unlikely(msg_user(hdr) == LINK_PROTOCOL)) in tipc_link_rcv()
1767 hdr = buf_msg(skb); in tipc_link_rcv()
1768 seqno = msg_seqno(hdr); in tipc_link_rcv()
1785 released += tipc_link_advance_transmq(l, l, msg_ack(hdr), 0, in tipc_link_rcv()
1800 if (unlikely(msg_user(hdr) == TUNNEL_PROTOCOL)) in tipc_link_rcv()
1828 struct tipc_msg *hdr; in tipc_link_build_proto_msg() local
1851 hdr = buf_msg(skb); in tipc_link_build_proto_msg()
1852 data = msg_data(hdr); in tipc_link_build_proto_msg()
1853 msg_set_session(hdr, l->session); in tipc_link_build_proto_msg()
1854 msg_set_bearer_id(hdr, l->bearer_id); in tipc_link_build_proto_msg()
1855 msg_set_net_plane(hdr, l->net_plane); in tipc_link_build_proto_msg()
1856 msg_set_next_sent(hdr, l->snd_nxt); in tipc_link_build_proto_msg()
1857 msg_set_ack(hdr, l->rcv_nxt - 1); in tipc_link_build_proto_msg()
1858 msg_set_bcast_ack(hdr, bcl->rcv_nxt - 1); in tipc_link_build_proto_msg()
1859 msg_set_bc_ack_invalid(hdr, !node_up); in tipc_link_build_proto_msg()
1860 msg_set_last_bcast(hdr, l->bc_sndlink->snd_nxt - 1); in tipc_link_build_proto_msg()
1861 msg_set_link_tolerance(hdr, tolerance); in tipc_link_build_proto_msg()
1862 msg_set_linkprio(hdr, priority); in tipc_link_build_proto_msg()
1863 msg_set_redundant_link(hdr, node_up); in tipc_link_build_proto_msg()
1864 msg_set_seq_gap(hdr, 0); in tipc_link_build_proto_msg()
1865 msg_set_seqno(hdr, l->snd_nxt + U16_MAX / 2); in tipc_link_build_proto_msg()
1869 msg_set_seqno(hdr, l->snd_nxt_state++); in tipc_link_build_proto_msg()
1870 msg_set_seq_gap(hdr, rcvgap); in tipc_link_build_proto_msg()
1872 msg_set_bc_gap(hdr, bc_rcvgap); in tipc_link_build_proto_msg()
1873 msg_set_probe(hdr, probe); in tipc_link_build_proto_msg()
1874 msg_set_is_keepalive(hdr, probe || probe_reply); in tipc_link_build_proto_msg()
1876 glen = tipc_build_gap_ack_blks(l, hdr); in tipc_link_build_proto_msg()
1878 msg_set_size(hdr, INT_H_SIZE + glen + dlen); in tipc_link_build_proto_msg()
1885 msg_set_dest_session_valid(hdr, 1); in tipc_link_build_proto_msg()
1886 msg_set_dest_session(hdr, l->peer_session); in tipc_link_build_proto_msg()
1888 msg_set_max_pkt(hdr, l->advertised_mtu); in tipc_link_build_proto_msg()
1890 msg_set_size(hdr, INT_H_SIZE + TIPC_MAX_IF_NAME); in tipc_link_build_proto_msg()
1908 struct tipc_msg *hdr, *ihdr; in tipc_link_create_dummy_tnl_msg() local
1922 hdr = buf_msg(skb); in tipc_link_create_dummy_tnl_msg()
1923 msg_set_msgcnt(hdr, 1); in tipc_link_create_dummy_tnl_msg()
1924 msg_set_bearer_id(hdr, l->peer_bearer_id); in tipc_link_create_dummy_tnl_msg()
1926 ihdr = (struct tipc_msg *)msg_data(hdr); in tipc_link_create_dummy_tnl_msg()
1942 struct tipc_msg *hdr, tnlhdr; in tipc_link_tnl_prepare() local
1970 hdr = buf_msg(tnlskb); in tipc_link_tnl_prepare()
1972 msg_set_syncpt(hdr, syncpt); in tipc_link_tnl_prepare()
1973 msg_set_bearer_id(hdr, l->peer_bearer_id); in tipc_link_tnl_prepare()
2006 hdr = buf_msg(skb); in tipc_link_tnl_prepare()
2008 msg_set_seqno(hdr, seqno++); in tipc_link_tnl_prepare()
2009 pktlen = msg_size(hdr); in tipc_link_tnl_prepare()
2038 link_co_err, msg_user(hdr), in tipc_link_tnl_prepare()
2039 msg_type(hdr), msg_size(hdr)); in tipc_link_tnl_prepare()
2050 skb_copy_to_linear_data_offset(tnlskb, INT_H_SIZE, hdr, pktlen); in tipc_link_tnl_prepare()
2060 hdr = buf_msg(skb); in tipc_link_tnl_prepare()
2061 msg_set_msgcnt(hdr, pktcnt); in tipc_link_tnl_prepare()
2118 bool tipc_link_validate_msg(struct tipc_link *l, struct tipc_msg *hdr) in tipc_link_validate_msg() argument
2121 u16 session = msg_session(hdr); in tipc_link_validate_msg()
2122 int mtyp = msg_type(hdr); in tipc_link_validate_msg()
2124 if (msg_user(hdr) != LINK_PROTOCOL) in tipc_link_validate_msg()
2145 if (!link_is_up(l) && msg_ack(hdr)) in tipc_link_validate_msg()
2150 return !less(msg_seqno(hdr), l->rcv_nxt_state); in tipc_link_validate_msg()
2164 struct tipc_msg *hdr = buf_msg(skb); in tipc_link_proto_rcv() local
2166 bool reply = msg_probe(hdr), retransmitted = false; in tipc_link_proto_rcv()
2167 u32 dlen = msg_data_sz(hdr), glen = 0; in tipc_link_proto_rcv()
2168 u16 peers_snd_nxt = msg_next_sent(hdr); in tipc_link_proto_rcv()
2169 u16 peers_tol = msg_link_tolerance(hdr); in tipc_link_proto_rcv()
2170 u16 peers_prio = msg_linkprio(hdr); in tipc_link_proto_rcv()
2171 u16 gap = msg_seq_gap(hdr); in tipc_link_proto_rcv()
2172 u16 ack = msg_ack(hdr); in tipc_link_proto_rcv()
2175 int mtyp = msg_type(hdr); in tipc_link_proto_rcv()
2188 if (tipc_own_addr(l->net) > msg_prevnode(hdr)) in tipc_link_proto_rcv()
2189 l->net_plane = msg_net_plane(hdr); in tipc_link_proto_rcv()
2194 hdr = buf_msg(skb); in tipc_link_proto_rcv()
2195 data = msg_data(hdr); in tipc_link_proto_rcv()
2197 if (!tipc_link_validate_msg(l, hdr)) { in tipc_link_proto_rcv()
2210 if (msg_data_sz(hdr) < TIPC_MAX_IF_NAME) in tipc_link_proto_rcv()
2224 if (msg_peer_stopping(hdr)) { in tipc_link_proto_rcv()
2232 if (mtyp == ACTIVATE_MSG && msg_dest_session_valid(hdr) && in tipc_link_proto_rcv()
2233 l->session != msg_dest_session(hdr)) { in tipc_link_proto_rcv()
2234 if (less(l->session, msg_dest_session(hdr))) in tipc_link_proto_rcv()
2235 l->session = msg_dest_session(hdr) + 1; in tipc_link_proto_rcv()
2247 l->peer_session = msg_session(hdr); in tipc_link_proto_rcv()
2249 l->peer_bearer_id = msg_bearer_id(hdr); in tipc_link_proto_rcv()
2250 if (l->mtu > msg_max_pkt(hdr)) in tipc_link_proto_rcv()
2251 l->mtu = msg_max_pkt(hdr); in tipc_link_proto_rcv()
2256 glen = tipc_get_gap_ack_blks(&ga, l, hdr, true); in tipc_link_proto_rcv()
2260 l->rcv_nxt_state = msg_seqno(hdr) + 1; in tipc_link_proto_rcv()
2276 if (msg_probe(hdr)) in tipc_link_proto_rcv()
2289 if ((reply || msg_is_keepalive(hdr)) && in tipc_link_proto_rcv()
2321 struct tipc_msg *hdr; in tipc_link_build_bc_proto_msg() local
2330 hdr = buf_msg(skb); in tipc_link_build_bc_proto_msg()
2331 msg_set_last_bcast(hdr, l->bc_sndlink->snd_nxt - 1); in tipc_link_build_bc_proto_msg()
2332 msg_set_bcast_ack(hdr, ack); in tipc_link_build_bc_proto_msg()
2333 msg_set_bcgap_after(hdr, ack); in tipc_link_build_bc_proto_msg()
2336 msg_set_bcgap_to(hdr, gap_to); in tipc_link_build_bc_proto_msg()
2337 msg_set_non_seq(hdr, bcast); in tipc_link_build_bc_proto_msg()
2361 void tipc_link_bc_init_rcv(struct tipc_link *l, struct tipc_msg *hdr) in tipc_link_bc_init_rcv() argument
2363 int mtyp = msg_type(hdr); in tipc_link_bc_init_rcv()
2364 u16 peers_snd_nxt = msg_bc_snd_nxt(hdr); in tipc_link_bc_init_rcv()
2369 if (msg_user(hdr) == BCAST_PROTOCOL) { in tipc_link_bc_init_rcv()
2378 if (msg_peer_node_is_up(hdr)) in tipc_link_bc_init_rcv()
2388 int tipc_link_bc_sync_rcv(struct tipc_link *l, struct tipc_msg *hdr, in tipc_link_bc_sync_rcv() argument
2391 u16 peers_snd_nxt = msg_bc_snd_nxt(hdr); in tipc_link_bc_sync_rcv()
2397 if (!msg_peer_node_is_up(hdr)) in tipc_link_bc_sync_rcv()
2401 if (msg_ack(hdr)) in tipc_link_bc_sync_rcv()
2482 struct tipc_msg *hdr = buf_msg(skb); in tipc_link_bc_nack_rcv() local
2483 u32 dnode = msg_destnode(hdr); in tipc_link_bc_nack_rcv()
2484 int mtyp = msg_type(hdr); in tipc_link_bc_nack_rcv()
2485 u16 acked = msg_bcast_ack(hdr); in tipc_link_bc_nack_rcv()
2487 u16 to = msg_bcgap_to(hdr); in tipc_link_bc_nack_rcv()
2659 void *hdr; in __tipc_nl_add_link() local
2662 hdr = genlmsg_put(msg->skb, msg->portid, msg->seq, &tipc_genl_family, in __tipc_nl_add_link()
2664 if (!hdr) in __tipc_nl_add_link()
2708 genlmsg_end(msg->skb, hdr); in __tipc_nl_add_link()
2717 genlmsg_cancel(msg->skb, hdr); in __tipc_nl_add_link()
2777 void *hdr; in tipc_nl_add_bc_link() local
2788 hdr = genlmsg_put(msg->skb, msg->portid, msg->seq, &tipc_genl_family, in tipc_nl_add_bc_link()
2790 if (!hdr) { in tipc_nl_add_bc_link()
2831 genlmsg_end(msg->skb, hdr); in tipc_nl_add_bc_link()
2841 genlmsg_cancel(msg->skb, hdr); in tipc_nl_add_bc_link()