-static inline void __fio_init_net_cmd(struct fio_net_cmd *cmd, uint16_t opcode,
- uint32_t pdu_len, uint64_t tag)
-{
- memset(cmd, 0, sizeof(*cmd));
-
- cmd->version = __cpu_to_le16(FIO_SERVER_VER);
- cmd->opcode = cpu_to_le16(opcode);
- cmd->tag = cpu_to_le64(tag);
- cmd->pdu_len = cpu_to_le32(pdu_len);
-}
-
-
-static inline void fio_init_net_cmd(struct fio_net_cmd *cmd, uint16_t opcode,
- const void *pdu, uint32_t pdu_len,
- uint64_t tag)
-{
- __fio_init_net_cmd(cmd, opcode, pdu_len, tag);
-
- if (pdu)
- memcpy(&cmd->payload, pdu, pdu_len);
-}
-