diff options
author | Ilya Maximets <i.maximets@ovn.org> | 2020-07-08 06:38:29 +0000 |
---|---|---|
committer | Ilya Maximets <i.maximets@ovn.org> | 2020-07-08 19:07:21 +0200 |
commit | 8842fdf1b318e626ab24025aaa285461d51a1621 (patch) | |
tree | beb2a0b13700520c9d909c5ac000b2ea4f781107 /ofproto/ofproto-dpif-upcall.c | |
parent | 48c1ab5d74ece8d2e6dd332bfebd3a7adce9414b (diff) | |
download | openvswitch-8842fdf1b318e626ab24025aaa285461d51a1621.tar.gz |
netdev-offload: Use dpif type instead of class.
There is no real difference between the 'class' and 'type' in the
context of common lookup operations inside netdev-offload module
because it only checks the value of pointers without using the
value itself. However, 'type' has some meaning and can be used by
offload provides on the initialization phase to check if this type
of Flow API in pair with the netdev type could be used in particular
datapath type. For example, this is needed to check if Linux flow
API could be used for current tunneling vport because it could be
used only if tunneling vport belongs to system datapath, i.e. has
backing linux interface.
This is needed to unblock tunneling offloads in userspace datapath
with DPDK flow API.
Acked-by: Eli Britstein <elibr@mellanox.com>
Acked-by: Roni Bar Yanai <roniba@mellanox.com>
Acked-by: Ophir Munk <ophirmu@mellanox.com>
Signed-off-by: Ilya Maximets <i.maximets@ovn.org>
Diffstat (limited to 'ofproto/ofproto-dpif-upcall.c')
-rw-r--r-- | ofproto/ofproto-dpif-upcall.c | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/ofproto/ofproto-dpif-upcall.c b/ofproto/ofproto-dpif-upcall.c index 920f29a6f..72751b9b3 100644 --- a/ofproto/ofproto-dpif-upcall.c +++ b/ofproto/ofproto-dpif-upcall.c @@ -2501,8 +2501,7 @@ ukey_netdev_unref(struct udpif_key *ukey) static void ukey_to_flow_netdev(struct udpif *udpif, struct udpif_key *ukey) { - const struct dpif *dpif = udpif->dpif; - const struct dpif_class *dpif_class = dpif->dpif_class; + const char *dpif_type_str = dpif_normalize_type(dpif_type(udpif->dpif)); const struct nlattr *k; unsigned int left; @@ -2515,7 +2514,7 @@ ukey_to_flow_netdev(struct udpif *udpif, struct udpif_key *ukey) if (type == OVS_KEY_ATTR_IN_PORT) { ukey->in_netdev = netdev_ports_get(nl_attr_get_odp_port(k), - dpif_class); + dpif_type_str); } else if (type == OVS_KEY_ATTR_TUNNEL) { struct flow_tnl tnl; enum odp_key_fitness res; |