#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
{
n_left = VLIB_FRAME_SIZE;
n_buffers = 0;
- if (PREDICT_TRUE (xd->dev_type == VNET_DPDK_DEV_ETH))
+ if (PREDICT_TRUE (xd->flags & DPDK_DEVICE_FLAG_PMD))
{
while (n_left)
{
}
}
#if DPDK_VHOST_USER
- else if (xd->dev_type == VNET_DPDK_DEV_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;
}
#endif
#ifdef RTE_LIBRTE_KNI
- else if (xd->dev_type == VNET_DPDK_DEV_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);
u8 efd_discard_burst = 0;
u32 buffer_flags_template;
- if (xd->admin_up == 0)
+ if ((xd->flags & DPDK_DEVICE_FLAG_ADMIN_UP) == 0)
return 0;
n_buffers = dpdk_rx_burst (dm, xd, queue_id);
fl = vlib_buffer_get_free_list (vm, VLIB_BUFFER_DEFAULT_FREE_LIST_INDEX);
- /*
- * DAW-FIXME: VMXNET3 device stop/start doesn't work,
- * therefore fake the stop in the dpdk driver by
- * silently dropping all of the incoming pkts instead of
- * stopping the driver / hardware.
- */
- if (PREDICT_FALSE (xd->admin_up != 1))
- {
- for (mb_index = 0; mb_index < n_buffers; mb_index++)
- rte_pktmbuf_free (xd->rx_vectors[queue_id][mb_index]);
-
- return 0;
- }
-
/* Check for congestion if EFD (Early-Fast-Discard) is enabled
* in any mode (e.g. dpdk, monitor, or drop_all)
*/
b->current_length </code> and dispatch directly to
ip4-input-no-checksum, or ip6-input. Trace the packet if required.
- @param vm vlib_main_t corresponding to the current thread
+ @param vm vlib_main_t corresponding to the current thread
@param node vlib_node_runtime_t
- @param frame vlib_frame_t input-node, not used.
+ @param f vlib_frame_t input-node, not used.
@par Graph mechanics: buffer metadata, next index usage
<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:
- */