#include <vnet/ethernet/ethernet.h>
#include <vnet/devices/dpdk/dpdk.h>
#include <vnet/classify/vnet_classify.h>
-#include <vnet/mpls-gre/packet.h>
+#include <vnet/mpls/packet.h>
#include <vnet/handoff.h>
#include "dpdk_priv.h"
HANDOFF_DISPATCH_NEXT_ETHERNET_INPUT;
}
else
- if (PREDICT_FALSE (xd->vlan_subifs || (mb_flags & PKT_RX_VLAN_PKT)))
+ if (PREDICT_FALSE ((xd->flags & DPDK_DEVICE_FLAG_HAVE_SUBIF) ||
+ (mb_flags & PKT_RX_VLAN_PKT)))
n0 = DPDK_RX_NEXT_ETHERNET_INPUT;
else
{
break;
}
}
-#if DPDK_VHOST_USER
- else if (xd->flags & DPDK_DEVICE_FLAG_VHOST_USER)
- {
- vlib_main_t *vm = vlib_get_main ();
- vlib_buffer_main_t *bm = vm->buffer_main;
- unsigned socket_id = rte_socket_id ();
- u32 offset = 0;
-
- offset = queue_id * VIRTIO_QNUM;
-
- struct vhost_virtqueue *vq =
- xd->vu_vhost_dev.virtqueue[offset + VIRTIO_TXQ];
-
- if (PREDICT_FALSE (!vq->enabled))
- return 0;
-
- struct rte_mbuf **pkts = xd->rx_vectors[queue_id];
- while (n_left)
- {
- n_this_chunk = rte_vhost_dequeue_burst (&xd->vu_vhost_dev,
- offset + VIRTIO_TXQ,
- bm->pktmbuf_pools
- [socket_id],
- pkts + n_buffers, n_left);
- n_buffers += n_this_chunk;
- n_left -= n_this_chunk;
- if (n_this_chunk == 0)
- break;
- }
-
- int i;
- u32 bytes = 0;
- for (i = 0; i < n_buffers; i++)
- {
- struct rte_mbuf *buff = pkts[i];
- bytes += rte_pktmbuf_data_len (buff);
- }
-
- f64 now = vlib_time_now (vm);
-
- dpdk_vu_vring *vring = NULL;
- /* send pending interrupts if needed */
- if (dpdk_vhost_user_want_interrupt (xd, offset + VIRTIO_TXQ))
- {
- vring = &(xd->vu_intf->vrings[offset + VIRTIO_TXQ]);
- vring->n_since_last_int += n_buffers;
-
- if ((vring->n_since_last_int && (vring->int_deadline < now))
- || (vring->n_since_last_int > dm->conf->vhost_coalesce_frames))
- dpdk_vhost_user_send_interrupt (vm, xd, offset + VIRTIO_TXQ);
- }
-
- vring = &(xd->vu_intf->vrings[offset + VIRTIO_RXQ]);
- vring->packets += n_buffers;
- vring->bytes += bytes;
-
- if (dpdk_vhost_user_want_interrupt (xd, offset + VIRTIO_RXQ))
- {
- if (vring->n_since_last_int && (vring->int_deadline < now))
- dpdk_vhost_user_send_interrupt (vm, xd, offset + VIRTIO_RXQ);
- }
-
- }
-#endif
-#ifdef RTE_LIBRTE_KNI
- else if (xd->flags & DPDK_DEVICE_FLAG_KNI)
- {
- n_buffers =
- rte_kni_rx_burst (xd->kni, xd->rx_vectors[queue_id], VLIB_FRAME_SIZE);
- rte_kni_handle_request (xd->kni);
- }
-#endif
else
{
ASSERT (0);
<em>Next Nodes:</em>
- Static arcs to: error-drop, ethernet-input,
- ip4-input-no-checksum, ip6-input, mpls-gre-input
+ ip4-input-no-checksum, ip6-input, mpls-input
- per-interface redirection, controlled by
<code>xd->per_interface_next_index</code>
*/
[DPDK_RX_NEXT_ETHERNET_INPUT] = "ethernet-input",
[DPDK_RX_NEXT_IP4_INPUT] = "ip4-input-no-checksum",
[DPDK_RX_NEXT_IP6_INPUT] = "ip6-input",
- [DPDK_RX_NEXT_MPLS_INPUT] = "mpls-gre-input",
+ [DPDK_RX_NEXT_MPLS_INPUT] = "mpls-input",
},
};
CLIB_MULTIARCH_SELECT_FN(dpdk_input);
CLIB_MULTIARCH_SELECT_FN(dpdk_input_rss);
CLIB_MULTIARCH_SELECT_FN(dpdk_input_efd);
-/* *INDENT-ON* */
/*
* Override the next nodes for the dpdk input nodes.
set_efd_bitmap (&tm->efd.mpls_exp_bitmap, mpls_exp, mpls_op);
set_efd_bitmap (&tm->efd.vlan_cos_bitmap, vlan_cos, vlan_op);
}
-
-/*
- * fd.io coding-style-patch-verification: ON
- *
- * Local Variables:
- * eval: (c-set-style "gnu")
- * End:
- */