Commit 83f27d02 authored by John Hurley's avatar John Hurley Committed by David S. Miller

nfp: flower: use geneve and vxlan helpers

Make use of the recently added VXLAN and geneve helper functions to
determine the type of the netdev from its rtnl_link_ops.
Signed-off-by: default avatarJohn Hurley <john.hurley@netronome.com>
Reviewed-by: default avatarJakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 1d10bd16
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include <net/tc_act/tc_pedit.h> #include <net/tc_act/tc_pedit.h>
#include <net/tc_act/tc_vlan.h> #include <net/tc_act/tc_vlan.h>
#include <net/tc_act/tc_tunnel_key.h> #include <net/tc_act/tc_tunnel_key.h>
#include <net/vxlan.h>
#include "cmsg.h" #include "cmsg.h"
#include "main.h" #include "main.h"
...@@ -94,13 +95,10 @@ nfp_fl_pre_lag(struct nfp_app *app, const struct tc_action *action, ...@@ -94,13 +95,10 @@ nfp_fl_pre_lag(struct nfp_app *app, const struct tc_action *action,
static bool nfp_fl_netdev_is_tunnel_type(struct net_device *out_dev, static bool nfp_fl_netdev_is_tunnel_type(struct net_device *out_dev,
enum nfp_flower_tun_type tun_type) enum nfp_flower_tun_type tun_type)
{ {
if (!out_dev->rtnl_link_ops) if (netif_is_vxlan(out_dev))
return false;
if (!strcmp(out_dev->rtnl_link_ops->kind, "vxlan"))
return tun_type == NFP_FL_TUNNEL_VXLAN; return tun_type == NFP_FL_TUNNEL_VXLAN;
if (!strcmp(out_dev->rtnl_link_ops->kind, "geneve")) if (netif_is_geneve(out_dev))
return tun_type == NFP_FL_TUNNEL_GENEVE; return tun_type == NFP_FL_TUNNEL_GENEVE;
return false; return false;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment