Merge branch 'master' into gfio
authorJens Axboe <axboe@kernel.dk>
Wed, 29 Feb 2012 09:15:51 +0000 (10:15 +0100)
committerJens Axboe <axboe@kernel.dk>
Wed, 29 Feb 2012 09:15:51 +0000 (10:15 +0100)
We need the crc function namespace change.

1  2 
server.c

diff --combined server.c
index 2e8682c999cc395f0af45ab67723d40459735484,5e94696eb6aa6ee79d34668723b3981f1384d4dd..f263a0a3b11bc19fc8aa56b4707bbe6ff1983b4a
+++ b/server.c
@@@ -24,7 -24,7 +24,7 @@@
  
  #include "fio_version.h"
  
 -int fio_net_port = 8765;
 +int fio_net_port = FIO_NET_PORT;
  
  int exit_backend = 0;
  
@@@ -124,7 -124,7 +124,7 @@@ static int verify_convert_cmd(struct fi
        cmd->cmd_crc16 = le16_to_cpu(cmd->cmd_crc16);
        cmd->pdu_crc16 = le16_to_cpu(cmd->pdu_crc16);
  
-       crc = crc16(cmd, FIO_NET_CMD_CRC_SZ);
+       crc = fio_crc16(cmd, FIO_NET_CMD_CRC_SZ);
        if (crc != cmd->cmd_crc16) {
                log_err("fio: server bad crc on command (got %x, wanted %x)\n",
                                cmd->cmd_crc16, crc);
@@@ -202,7 -202,7 +202,7 @@@ struct fio_net_cmd *fio_net_recv_cmd(in
                        break;
  
                /* Verify payload crc */
-               crc = crc16(pdu, cmd.pdu_len);
+               crc = fio_crc16(pdu, cmd.pdu_len);
                if (crc != cmd.pdu_crc16) {
                        log_err("fio: server bad crc on payload ");
                        log_err("(got %x, wanted %x)\n", cmd.pdu_crc16, crc);
@@@ -238,11 -238,11 +238,11 @@@ void fio_net_cmd_crc(struct fio_net_cm
  {
        uint32_t pdu_len;
  
-       cmd->cmd_crc16 = __cpu_to_le16(crc16(cmd, FIO_NET_CMD_CRC_SZ));
+       cmd->cmd_crc16 = __cpu_to_le16(fio_crc16(cmd, FIO_NET_CMD_CRC_SZ));
  
        pdu_len = le32_to_cpu(cmd->pdu_len);
        if (pdu_len)
-               cmd->pdu_crc16 = __cpu_to_le16(crc16(cmd->payload, pdu_len));
+               cmd->pdu_crc16 = __cpu_to_le16(fio_crc16(cmd->payload, pdu_len));
  }
  
  int fio_net_send_cmd(int fd, uint16_t opcode, const void *buf, off_t size,