summaryrefslogtreecommitdiff
path: root/drivers/net/ethernet/sfc/tc_encap_actions.h
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/net/ethernet/sfc/tc_encap_actions.h')
-rw-r--r--drivers/net/ethernet/sfc/tc_encap_actions.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/net/ethernet/sfc/tc_encap_actions.h b/drivers/net/ethernet/sfc/tc_encap_actions.h
index 4d755fb92daf..c3c7904ad7ff 100644
--- a/drivers/net/ethernet/sfc/tc_encap_actions.h
+++ b/drivers/net/ethernet/sfc/tc_encap_actions.h
@@ -12,6 +12,7 @@
#define EFX_TC_ENCAP_ACTIONS_H
#include "net_driver.h"
+#if IS_ENABLED(CONFIG_SFC_SRIOV)
#include <linux/refcount.h>
#include <net/tc_act/tc_tunnel_key.h>
@@ -100,4 +101,14 @@ void efx_tc_unregister_egdev(struct efx_nic *efx, struct net_device *net_dev);
int efx_tc_netevent_event(struct efx_nic *efx, unsigned long event,
void *ptr);
+#else /* CONFIG_SFC_SRIOV */
+
+static inline int efx_tc_netevent_event(struct efx_nic *efx,
+ unsigned long event, void *ptr)
+{
+ return NOTIFY_DONE;
+}
+
+#endif /* CONFIG_SFC_SRIOV */
+
#endif /* EFX_TC_ENCAP_ACTIONS_H */