vnet: device flow offload infra
[vpp.git] / src / plugins / dpdk / device / device.c
index 61cd970..cdd9785 100644 (file)
@@ -522,13 +522,14 @@ CLIB_MULTIARCH_FN (dpdk_interface_tx) (vlib_main_t * vm,
     }
 
   /* transmit as many packets as possible */
-  n_packets = mb - ptd->mbufs;
+  tx_pkts = n_packets = mb - ptd->mbufs;
   n_left = tx_burst_vector_internal (vm, xd, ptd->mbufs, n_packets);
 
   {
     /* If there is no callback then drop any non-transmitted packets */
     if (PREDICT_FALSE (n_left))
       {
+       tx_pkts -= n_left;
        vlib_simple_counter_main_t *cm;
        vnet_main_t *vnm = vnet_get_main ();
 
@@ -714,6 +715,8 @@ VNET_DEVICE_CLASS (dpdk_device_class) = {
   .subif_add_del_function = dpdk_subif_add_del_function,
   .rx_redirect_to_node = dpdk_set_interface_next_node,
   .mac_addr_change_function = dpdk_set_mac_address,
+  .format_flow = format_dpdk_flow,
+  .flow_ops_function = dpdk_flow_ops_fn,
 };
 /* *INDENT-ON* */