#include <unistd.h>
#include <stdio.h>
+#include "dp-packet.h"
#include "dpif-netdev.h"
#include "list.h"
#include "netdev-dpdk.h"
#include "ovs-numa.h"
#include "ovs-thread.h"
#include "ovs-rcu.h"
-#include "packet-dpif.h"
#include "packets.h"
#include "shash.h"
#include "sset.h"
/* XXX this function should be called only by pmd threads (or by non pmd
* threads holding the nonpmd_mempool_mutex) */
void
-free_dpdk_buf(struct dpif_packet *p)
+free_dpdk_buf(struct dp_packet *p)
{
struct rte_mbuf *pkt = (struct rte_mbuf *) p;
unsigned i OVS_UNUSED)
{
struct rte_mbuf *m = _m;
- uint32_t buf_len = mp->elt_size - sizeof(struct dpif_packet);
+ uint32_t buf_len = mp->elt_size - sizeof(struct dp_packet);
- RTE_MBUF_ASSERT(mp->elt_size >= sizeof(struct dpif_packet));
+ RTE_MBUF_ASSERT(mp->elt_size >= sizeof(struct dp_packet));
memset(m, 0, mp->elt_size);
/* start of buffer is just after mbuf structure */
- m->buf_addr = (char *)m + sizeof(struct dpif_packet);
+ m->buf_addr = (char *)m + sizeof(struct dp_packet);
m->buf_physaddr = rte_mempool_virt2phy(mp, m) +
- sizeof(struct dpif_packet);
+ sizeof(struct dp_packet);
m->buf_len = (uint16_t)buf_len;
/* keep some headroom between start of buffer and data */
}
static int
-netdev_dpdk_rxq_recv(struct netdev_rxq *rxq_, struct dpif_packet **packets,
+netdev_dpdk_rxq_recv(struct netdev_rxq *rxq_, struct dp_packet **packets,
int *c)
{
struct netdev_rxq_dpdk *rx = netdev_rxq_dpdk_cast(rxq_);
/* Tx function. Transmit packets indefinitely */
static void
-dpdk_do_tx_copy(struct netdev *netdev, int qid, struct dpif_packet ** pkts,
+dpdk_do_tx_copy(struct netdev *netdev, int qid, struct dp_packet ** pkts,
int cnt)
OVS_NO_THREAD_SAFETY_ANALYSIS
{
static inline void
netdev_dpdk_send__(struct netdev_dpdk *dev, int qid,
- struct dpif_packet **pkts, int cnt, bool may_steal)
+ struct dp_packet **pkts, int cnt, bool may_steal)
{
int i;
if (may_steal) {
for (i = 0; i < cnt; i++) {
- dpif_packet_delete(pkts[i]);
+ dp_packet_delete(pkts[i]);
}
}
} else {
VLOG_WARN_RL(&rl, "Too big size %d max_packet_len %d",
(int)size , dev->max_packet_len);
- dpif_packet_delete(pkts[i]);
+ dp_packet_delete(pkts[i]);
dropped++;
next_tx_idx = i + 1;
}
static int
netdev_dpdk_eth_send(struct netdev *netdev, int qid,
- struct dpif_packet **pkts, int cnt, bool may_steal)
+ struct dp_packet **pkts, int cnt, bool may_steal)
{
struct netdev_dpdk *dev = netdev_dpdk_cast(netdev);
static int
netdev_dpdk_ring_send(struct netdev *netdev, int qid OVS_UNUSED,
- struct dpif_packet **pkts, int cnt, bool may_steal)
+ struct dp_packet **pkts, int cnt, bool may_steal)
{
struct netdev_dpdk *dev = netdev_dpdk_cast(netdev);