@@ -3599,7 +3599,7 @@ pmd_load_cached_ports(struct dp_netdev_pmd_thread *pmd)
hmap_shrink(&pmd->tnl_port_cache);
HMAP_FOR_EACH (tx_port, node, &pmd->tx_ports) {
- if (netdev_has_tunnel_push_pop(tx_port->port->netdev)) {
+ if (netdev_get_tunnel_config(tx_port->port->netdev) != NULL) {
tx_port_cached = xmemdup(tx_port, sizeof *tx_port_cached);
hmap_insert(&pmd->tnl_port_cache, &tx_port_cached->node,
hash_port_no(tx_port_cached->port->port_no));
@@ -117,13 +117,6 @@ netdev_is_pmd(const struct netdev *netdev)
return netdev->netdev_class->is_pmd;
}
-bool
-netdev_has_tunnel_push_pop(const struct netdev *netdev)
-{
- return netdev->netdev_class->push_header
- && netdev->netdev_class->pop_header;
-}
-
static void
netdev_initialize(void)
OVS_EXCLUDED(netdev_mutex)
The push/pop header of flow based tunnel is generated dynamically by flows, so there won't be any tunnel header associated to netdev. The patch fixes that tnl_port_cache doesn't contain any flow based tunnel. Signed-off-by: Zang MingJie <zealot0630@gmail.com> --- lib/dpif-netdev.c | 2 +- lib/netdev.c | 7 ------- 2 files changed, 1 insertion(+), 8 deletions(-)