/*-
* 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
error = virtqueue_enqueue_recv_refill(vq, m);
if (error) {
- rte_pktmbuf_free_seg(m);
+ rte_pktmbuf_free_seg(m);
break;
}
nbufs++;
error = virtqueue_enqueue_recv_refill(vq, m);
if (unlikely(error)) {
RTE_LOG(ERR, PMD, "cannot requeue discarded mbuf");
- rte_pktmbuf_free_seg(m);
+ rte_pktmbuf_free_seg(m);
}
}
}
error = virtqueue_enqueue_recv_refill(rxvq, new_mbuf);
if (unlikely(error)) {
- rte_pktmbuf_free_seg(new_mbuf);
+ rte_pktmbuf_free_seg(new_mbuf);
break;
}
nb_enqueued ++;
}
if (likely(nb_enqueued)) {
if (unlikely(virtqueue_kick_prepare(rxvq))) {
- virtqueue_notify(rxvq);
+ virtqueue_notify(rxvq);
PMD_RX_LOG(DEBUG, "Notified\n");
}
}
PMD_TX_LOG(ERR, "virtqueue_enqueue error: %d\n", error);
break;
}
- nb_tx++;
+ nb_tx++;
hw->eth_stats.obytes += txm->pkt.data_len;
hw->eth_stats.q_obytes[txvq->queue_id]
+= txm->pkt.data_len;
hw->eth_stats.q_opackets[txvq->queue_id] += nb_tx;
if(unlikely(virtqueue_kick_prepare(txvq))) {
- virtqueue_notify(txvq);
+ virtqueue_notify(txvq);
PMD_TX_LOG(DEBUG, "Notified backend after xmit\n");
}