Lines Matching defs:slave

228 static int send_mad_to_slave(int slave, struct mlx4_ib_demux_ctx *ctx,
249 return mlx4_ib_send_to_slave(dev, slave, ctx->port, IB_QPT_GSI, &wc, NULL, mad);
261 /* fix port GID to be the real one (slave 0) */
318 static int send_reply_to_slave(int slave, struct mcast_group *group,
345 sa_data->scope_join_state |= (group->func[slave].join_state & 0x0f);
348 ret = send_mad_to_slave(slave, group->demux, (struct ib_mad *)&mad);
495 static int join_group(struct mcast_group *group, int slave, u8 join_mask)
500 /* remove bits that slave is already member of, and adjust */
501 join_state = join_mask & (~group->func[slave].join_state);
503 group->func[slave].join_state |= join_state;
504 if (group->func[slave].state != MCAST_MEMBER && join_state) {
505 group->func[slave].state = MCAST_MEMBER;
511 static int leave_group(struct mcast_group *group, int slave, u8 leave_state)
516 group->func[slave].join_state &= ~leave_state;
517 if (!group->func[slave].join_state) {
518 group->func[slave].state = MCAST_NOT_MEMBER;
524 static int check_leave(struct mcast_group *group, int slave, u8 leave_mask)
526 if (group->func[slave].state != MCAST_MEMBER)
530 if (~group->func[slave].join_state & leave_mask)
882 int mlx4_ib_mcg_demux_handler(struct ib_device *ibdev, int port, int slave,
899 *(u8 *)(&tid) = (u8)slave; /* in group we kept the modified TID */
932 int slave, struct ib_sa_mad *sa_mad)
953 req->func = slave;
964 if (group->func[slave].num_pend_reqs > MAX_PEND_REQS_PER_FUNC) {
967 port, slave, MAX_PEND_REQS_PER_FUNC);
972 ++group->func[slave].num_pend_reqs;
985 port, slave, sa_mad->mad_hdr.method);
1206 static int push_deleteing_req(struct mcast_group *group, int slave)
1211 if (!group->func[slave].join_state)
1218 if (!list_empty(&group->func[slave].pending)) {
1219 pend_req = list_entry(group->func[slave].pending.prev, struct mcast_req, group_list);
1227 req->func = slave;
1229 ++group->func[slave].num_pend_reqs;
1235 void clean_vf_mcast(struct mlx4_ib_demux_ctx *ctx, int slave)
1246 clear_pending_reqs(group, slave);
1247 push_deleteing_req(group, slave);