tcp: avoid fr segments less than mss if possible
[vpp.git] / src / vnet / dpo / receive_dpo.c
index 30ddcee..413c3ae 100644 (file)
  */
 receive_dpo_t *receive_dpo_pool;
 
+int
+dpo_is_receive (const dpo_id_t *dpo)
+{
+    return (dpo->dpoi_type == DPO_RECEIVE);
+}
+
 static receive_dpo_t *
 receive_dpo_alloc (void)
 {
     receive_dpo_t *rd;
+    vlib_main_t *vm;
+    u8 did_barrier_sync;
 
+    dpo_pool_barrier_sync (vm, receive_dpo_pool, did_barrier_sync);
     pool_get_aligned(receive_dpo_pool, rd, CLIB_CACHE_LINE_BYTES);
+    dpo_pool_barrier_release (vm, did_barrier_sync);
+
     clib_memset(rd, 0, sizeof(*rd));
 
     return (rd);
@@ -111,10 +122,9 @@ format_receive_dpo (u8 *s, va_list *ap)
 
     if (~0 != rd->rd_sw_if_index)
     {
-        return (format(s, "dpo-receive: %U on %U",
-                       format_ip46_address, &rd->rd_addr, IP46_TYPE_ANY,
-                       format_vnet_sw_interface_name, vnm,
-                       vnet_get_sw_interface(vnm, rd->rd_sw_if_index)));
+      return (format (s, "dpo-receive: %U on %U", format_ip46_address,
+                     &rd->rd_addr, IP46_TYPE_ANY,
+                     format_vnet_sw_if_index_name, vnm, rd->rd_sw_if_index));
     }
     else
     {
@@ -145,15 +155,13 @@ const static dpo_vft_t receive_vft = {
  * this means that these graph nodes are ones from which a receive is the
  * parent object in the DPO-graph.
  */
-const static char* const receive_ip4_nodes[] =
-{
-    "ip4-local",
-    NULL,
+const static char *const receive_ip4_nodes[] = {
+  "ip4-receive",
+  NULL,
 };
-const static char* const receive_ip6_nodes[] =
-{
-    "ip6-local",
-    NULL,
+const static char *const receive_ip6_nodes[] = {
+  "ip6-receive",
+  NULL,
 };
 
 const static char* const * const receive_nodes[DPO_PROTO_NUM] =