int opcode; /* Actual command fields */
void *buf;
off_t size;
- uint64_t *tagptr;
+ uint64_t tag;
struct flist_head next; /* Other sk_entry's, if linked command */
};
entry->buf = buf;
entry->size = size;
- entry->tagptr = tagptr;
+ if (tagptr)
+ entry->tag = *tagptr;
+ else
+ entry->tag = 0;
entry->flags = flags;
return entry;
}
else
*flags = 0;
- if (entry->tagptr)
- *tag = *entry->tagptr;
- else
- *tag = 0;
+ *tag = entry->tag;
}
static int send_vec_entry(struct sk_out *sk_out, struct sk_entry *first)
if (entry->flags & SK_F_VEC)
ret = send_vec_entry(sk_out, entry);
else if (entry->flags & SK_F_SIMPLE) {
- uint64_t tag = 0;
-
- if (entry->tagptr)
- tag = *entry->tagptr;
+ uint64_t tag = entry->tag;
ret = fio_net_send_simple_cmd(sk_out->sk, entry->opcode, tag,
NULL);
} else {
ret = fio_net_send_cmd(sk_out->sk, entry->opcode, entry->buf,
- entry->size, entry->tagptr, NULL);
+ entry->size, &entry->tag, NULL);
}
fio_mutex_up(&sk_out->xmit);