/*-
* BSD LICENSE
- *
+ *
* Copyright(c) 2010-2014 Intel Corporation. All rights reserved.
* All rights reserved.
- *
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
- *
+ *
* * Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* * Redistributions in binary form must reproduce the above copyright
* * Neither the name of Intel Corporation nor the names of its
* contributors may be used to endorse or promote products derived
* from this software without specific prior written permission.
- *
+ *
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
vmxnet3_rx_queue_t *rq = rxq;
if (rxq != NULL) {
/* Release both the cmd_rings */
- for (i = 0; i < VMXNET3_RX_CMDRING_SIZE; i++)
+ for (i = 0; i < VMXNET3_RX_CMDRING_SIZE; i++)
vmxnet3_cmd_ring_release(&rq->cmd_ring[i]);
}
}
mbuf = txq->cmd_ring.buf_info[tcd->txdIdx].m;
if (unlikely(mbuf == NULL))
rte_panic("EOP desc does not point to a valid mbuf");
- else
+ else
rte_pktmbuf_free(mbuf);
-
+
txq->cmd_ring.buf_info[tcd->txdIdx].m = NULL;
/* Mark the txd for which tcd was generated as completed */
if (ring->rid == 0) {
/* Usually: One HEAD type buf per packet
- * val = (ring->next2fill % rxq->hw->bufs_per_pkt) ?
+ * val = (ring->next2fill % rxq->hw->bufs_per_pkt) ?
* VMXNET3_RXD_BTYPE_BODY : VMXNET3_RXD_BTYPE_HEAD;
*/
PMD_INIT_FUNC_TRACE();
hw = VMXNET3_DEV_PRIVATE_TO_HW(dev->data->dev_private);
- if ((tx_conf->txq_flags & ETH_TXQ_FLAGS_NOMULTSEGS) !=
+ if ((tx_conf->txq_flags & ETH_TXQ_FLAGS_NOMULTSEGS) !=
ETH_TXQ_FLAGS_NOMULTSEGS) {
PMD_INIT_LOG(ERR, "TX Multi segment not support yet\n");
return (-EINVAL);
}
- if ((tx_conf->txq_flags & ETH_TXQ_FLAGS_NOOFFLOADS) !=
+ if ((tx_conf->txq_flags & ETH_TXQ_FLAGS_NOOFFLOADS) !=
ETH_TXQ_FLAGS_NOOFFLOADS) {
PMD_INIT_LOG(ERR, "TX not support offload function yet\n");
return (-EINVAL);
/* Tx vmxnet ring length should be between 512-4096 */
if (nb_desc < VMXNET3_DEF_TX_RING_SIZE) {
- PMD_INIT_LOG(ERR, "VMXNET3 Tx Ring Size Min: %u\n",
+ PMD_INIT_LOG(ERR, "VMXNET3 Tx Ring Size Min: %u\n",
VMXNET3_DEF_TX_RING_SIZE);
- return -EINVAL;
+ return -EINVAL;
} else if (nb_desc > VMXNET3_TX_RING_MAX_SIZE) {
PMD_INIT_LOG(ERR, "VMXNET3 Tx Ring Size Max: %u\n",
VMXNET3_TX_RING_MAX_SIZE);
return -EINVAL;
} else {
- ring->size = nb_desc;
- ring->size &= ~VMXNET3_RING_SIZE_MASK;
+ ring->size = nb_desc;
+ ring->size &= ~VMXNET3_RING_SIZE_MASK;
}
comp_ring->size = ring->size;
/* comp_ring initialization */
comp_ring->base = ring->base + ring->size;
comp_ring->basePA = ring->basePA +
- (sizeof(struct Vmxnet3_TxDesc) * ring->size);
+ (sizeof(struct Vmxnet3_TxDesc) * ring->size);
/* cmd_ring0 buf_info allocation */
ring->buf_info = rte_zmalloc("tx_ring_buf_info",
- ring->size * sizeof(vmxnet3_buf_info_t), CACHE_LINE_SIZE);
+ ring->size * sizeof(vmxnet3_buf_info_t), CACHE_LINE_SIZE);
if (ring->buf_info == NULL) {
PMD_INIT_LOG(ERR, "ERROR: Creating tx_buf_info structure\n");
return (-ENOMEM);