+ s = format (0, "SCRIPT: tap_create_v2 ");
+ s = format (s, "id %u ", (mp->id));
+ if (memcmp (mp->mac_address, null_mac, 6))
+ s = format (s, "mac-address %U ",
+ format_ethernet_address, mp->mac_address);
+ if (memcmp (mp->host_mac_addr, null_mac, 6))
+ s = format (s, "host-mac-addr %U ",
+ format_ethernet_address, mp->host_mac_addr);
+ if (mp->host_if_name_set)
+ s = format (s, "host-if-name %s ", mp->host_if_name);
+ if (mp->host_namespace_set)
+ s = format (s, "host-ns %s ", mp->host_namespace);
+ if (mp->host_bridge_set)
+ s = format (s, "host-bridge %s ", mp->host_bridge);
+ if (mp->host_ip4_prefix_set)
+ s = format (s, "host-ip4-addr %U/%d ", format_ip4_address,
+ mp->host_ip4_prefix.address, mp->host_ip4_prefix.len);
+ if (mp->host_ip6_prefix_set)
+ s = format (s, "host-ip6-addr %U/%d ", format_ip6_address,
+ mp->host_ip6_prefix.address, mp->host_ip6_prefix.len);
+ if (mp->host_ip4_gw_set)
+ s =
+ format (s, "host-ip4-gw %U ", format_ip4_address,
+ mp->host_ip4_prefix.address);
+ if (mp->host_ip6_gw_set)
+ s =
+ format (s, "host-ip6-gw %U ", format_ip6_address,
+ mp->host_ip6_prefix.address);
+ if (mp->num_rx_queues)
+ s = format (s, "num_rx_queues %u ", mp->num_rx_queues);
+ if (mp->tx_ring_sz)
+ s = format (s, "tx-ring-size %u ", (mp->tx_ring_sz));
+ if (mp->rx_ring_sz)
+ s = format (s, "rx-ring-size %u ", (mp->rx_ring_sz));
+ if (mp->host_mtu_set)
+ s = format (s, "host-mtu-size %u ", (mp->host_mtu_size));
+ if ((mp->tap_flags) & 0x1)
+ s = format (s, "gso-enabled ");
+ if ((mp->tap_flags) & 0x2)
+ s = format (s, "csum-offload-enabled ");
+ if ((mp->tap_flags) & 0x4)
+ s = format (s, "persist ");
+ if ((mp->tap_flags) & 0x8)
+ s = format (s, "attach ");
+ if ((mp->tap_flags) & 0x16)
+ s = format (s, "tun ");
+ if ((mp->tap_flags) & 0x32)
+ s = format (s, "gro-coalesce-enabled ");