Commit 5cae7615 authored by Eric Dumazet's avatar Eric Dumazet Committed by Jeff Kirsher

i40e: fix build warnings

Fixes following build warnings :

drivers/net/ethernet/intel/i40e/i40e_main.c:7057:13: warning:
'i40e_sync_udp_filters_subtask' defined but not used [-Wunused-function]
drivers/net/ethernet/intel/i40e/i40e_main.c:8524:13: warning:
'i40e_add_vxlan_port' defined but not used [-Wunused-function]
drivers/net/ethernet/intel/i40e/i40e_main.c:8569:13: warning:
'i40e_del_vxlan_port' defined but not used [-Wunused-function]
drivers/net/ethernet/intel/i40e/i40e_main.c:8604:13: warning:
'i40e_add_geneve_port' defined but not used [-Wunused-function]
drivers/net/ethernet/intel/i40e/i40e_main.c:8651:13: warning:
'i40e_del_geneve_port' defined but not used [-Wunused-function]

Fixes: 6a899024 ("i40e: geneve tunnel offload support")
Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Tested-by: default avatarAndrew Bowers <andrewx.bowers@intel.com>
Signed-off-by: default avatarJeff Kirsher <jeffrey.t.kirsher@intel.com>
parent c85e4924
...@@ -7117,9 +7117,7 @@ static void i40e_service_task(struct work_struct *work) ...@@ -7117,9 +7117,7 @@ static void i40e_service_task(struct work_struct *work)
i40e_watchdog_subtask(pf); i40e_watchdog_subtask(pf);
i40e_fdir_reinit_subtask(pf); i40e_fdir_reinit_subtask(pf);
i40e_sync_filters_subtask(pf); i40e_sync_filters_subtask(pf);
#if IS_ENABLED(CONFIG_VXLAN) || IS_ENABLED(CONFIG_GENEVE)
i40e_sync_udp_filters_subtask(pf); i40e_sync_udp_filters_subtask(pf);
#endif
i40e_clean_adminq_subtask(pf); i40e_clean_adminq_subtask(pf);
i40e_service_event_complete(pf); i40e_service_event_complete(pf);
...@@ -8515,6 +8513,8 @@ static u8 i40e_get_udp_port_idx(struct i40e_pf *pf, __be16 port) ...@@ -8515,6 +8513,8 @@ static u8 i40e_get_udp_port_idx(struct i40e_pf *pf, __be16 port)
} }
#endif #endif
#if IS_ENABLED(CONFIG_VXLAN)
/** /**
* i40e_add_vxlan_port - Get notifications about VXLAN ports that come up * i40e_add_vxlan_port - Get notifications about VXLAN ports that come up
* @netdev: This physical port's netdev * @netdev: This physical port's netdev
...@@ -8524,7 +8524,6 @@ static u8 i40e_get_udp_port_idx(struct i40e_pf *pf, __be16 port) ...@@ -8524,7 +8524,6 @@ static u8 i40e_get_udp_port_idx(struct i40e_pf *pf, __be16 port)
static void i40e_add_vxlan_port(struct net_device *netdev, static void i40e_add_vxlan_port(struct net_device *netdev,
sa_family_t sa_family, __be16 port) sa_family_t sa_family, __be16 port)
{ {
#if IS_ENABLED(CONFIG_VXLAN)
struct i40e_netdev_priv *np = netdev_priv(netdev); struct i40e_netdev_priv *np = netdev_priv(netdev);
struct i40e_vsi *vsi = np->vsi; struct i40e_vsi *vsi = np->vsi;
struct i40e_pf *pf = vsi->back; struct i40e_pf *pf = vsi->back;
...@@ -8557,7 +8556,6 @@ static void i40e_add_vxlan_port(struct net_device *netdev, ...@@ -8557,7 +8556,6 @@ static void i40e_add_vxlan_port(struct net_device *netdev,
pf->udp_ports[next_idx].type = I40E_AQC_TUNNEL_TYPE_VXLAN; pf->udp_ports[next_idx].type = I40E_AQC_TUNNEL_TYPE_VXLAN;
pf->pending_udp_bitmap |= BIT_ULL(next_idx); pf->pending_udp_bitmap |= BIT_ULL(next_idx);
pf->flags |= I40E_FLAG_UDP_FILTER_SYNC; pf->flags |= I40E_FLAG_UDP_FILTER_SYNC;
#endif
} }
/** /**
...@@ -8569,7 +8567,6 @@ static void i40e_add_vxlan_port(struct net_device *netdev, ...@@ -8569,7 +8567,6 @@ static void i40e_add_vxlan_port(struct net_device *netdev,
static void i40e_del_vxlan_port(struct net_device *netdev, static void i40e_del_vxlan_port(struct net_device *netdev,
sa_family_t sa_family, __be16 port) sa_family_t sa_family, __be16 port)
{ {
#if IS_ENABLED(CONFIG_VXLAN)
struct i40e_netdev_priv *np = netdev_priv(netdev); struct i40e_netdev_priv *np = netdev_priv(netdev);
struct i40e_vsi *vsi = np->vsi; struct i40e_vsi *vsi = np->vsi;
struct i40e_pf *pf = vsi->back; struct i40e_pf *pf = vsi->back;
...@@ -8592,9 +8589,10 @@ static void i40e_del_vxlan_port(struct net_device *netdev, ...@@ -8592,9 +8589,10 @@ static void i40e_del_vxlan_port(struct net_device *netdev,
netdev_warn(netdev, "vxlan port %d was not found, not deleting\n", netdev_warn(netdev, "vxlan port %d was not found, not deleting\n",
ntohs(port)); ntohs(port));
} }
#endif
} }
#endif
#if IS_ENABLED(CONFIG_GENEVE)
/** /**
* i40e_add_geneve_port - Get notifications about GENEVE ports that come up * i40e_add_geneve_port - Get notifications about GENEVE ports that come up
* @netdev: This physical port's netdev * @netdev: This physical port's netdev
...@@ -8604,7 +8602,6 @@ static void i40e_del_vxlan_port(struct net_device *netdev, ...@@ -8604,7 +8602,6 @@ static void i40e_del_vxlan_port(struct net_device *netdev,
static void i40e_add_geneve_port(struct net_device *netdev, static void i40e_add_geneve_port(struct net_device *netdev,
sa_family_t sa_family, __be16 port) sa_family_t sa_family, __be16 port)
{ {
#if IS_ENABLED(CONFIG_GENEVE)
struct i40e_netdev_priv *np = netdev_priv(netdev); struct i40e_netdev_priv *np = netdev_priv(netdev);
struct i40e_vsi *vsi = np->vsi; struct i40e_vsi *vsi = np->vsi;
struct i40e_pf *pf = vsi->back; struct i40e_pf *pf = vsi->back;
...@@ -8639,7 +8636,6 @@ static void i40e_add_geneve_port(struct net_device *netdev, ...@@ -8639,7 +8636,6 @@ static void i40e_add_geneve_port(struct net_device *netdev,
pf->flags |= I40E_FLAG_UDP_FILTER_SYNC; pf->flags |= I40E_FLAG_UDP_FILTER_SYNC;
dev_info(&pf->pdev->dev, "adding geneve port %d\n", ntohs(port)); dev_info(&pf->pdev->dev, "adding geneve port %d\n", ntohs(port));
#endif
} }
/** /**
...@@ -8651,7 +8647,6 @@ static void i40e_add_geneve_port(struct net_device *netdev, ...@@ -8651,7 +8647,6 @@ static void i40e_add_geneve_port(struct net_device *netdev,
static void i40e_del_geneve_port(struct net_device *netdev, static void i40e_del_geneve_port(struct net_device *netdev,
sa_family_t sa_family, __be16 port) sa_family_t sa_family, __be16 port)
{ {
#if IS_ENABLED(CONFIG_GENEVE)
struct i40e_netdev_priv *np = netdev_priv(netdev); struct i40e_netdev_priv *np = netdev_priv(netdev);
struct i40e_vsi *vsi = np->vsi; struct i40e_vsi *vsi = np->vsi;
struct i40e_pf *pf = vsi->back; struct i40e_pf *pf = vsi->back;
...@@ -8677,8 +8672,8 @@ static void i40e_del_geneve_port(struct net_device *netdev, ...@@ -8677,8 +8672,8 @@ static void i40e_del_geneve_port(struct net_device *netdev,
netdev_warn(netdev, "geneve port %d was not found, not deleting\n", netdev_warn(netdev, "geneve port %d was not found, not deleting\n",
ntohs(port)); ntohs(port));
} }
#endif
} }
#endif
static int i40e_get_phys_port_id(struct net_device *netdev, static int i40e_get_phys_port_id(struct net_device *netdev,
struct netdev_phys_item_id *ppid) struct netdev_phys_item_id *ppid)
......
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