summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2017-01-27 11:59:32 -0500
committerDavid S. Miller <davem@davemloft.net>2017-01-27 11:59:32 -0500
commitb41fd8fdef5ad4a1dbd2a159714bd4358bb49625 (patch)
treef4efdf0f07abaa69f49d6e1d2d0390fdbd89b999 /include
parent2b368b234ec43abbf46f2983478c438d36e58134 (diff)
parent9b41080125176841ece49b661aa133afffe99381 (diff)
Merge branch 'sfc-encapsulated-filters'
Edward Cree says: ==================== sfc: encapsulated filters This series adds support for setting up filters for encapsulated traffic on SFC 8000-series adapters, which recognise VXLAN, GENEVE and NVGRE packets by parsing packet headers. (VXLAN and GENEVE will only be recognised if the driver on the primary PF has notified the firmware of relevant UDP ports, which this driver does not yet do.) While the driver currently has no way of using these filters for flow steering, it is nonetheless necessary to insert catch-all (aka 'default') filters to direct this traffic, similar to the existing unencapsulated uni- and multi-cast catch-all filters, as otherwise the traffic will be dropped by the NIC - implementation details of the hardware filtering mean that the traffic will not get matched on outer MAC address to unencapsulated catch- all filters. (Yes, this is a mess.) Although this is, therefore, fixing a bug in the existing driver, it's a bug which has existed since 8000 series support was added, and the fix involves quite a big patch with an 'adding features' flavour to it, hence why this is for net-next rather than net and stable. v2: move netif_cond_dbg into netdevice.h and its own patch ==================== Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include')
-rw-r--r--include/linux/netdevice.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index d63cacb67ea6..9511e5a1cfc6 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -4347,6 +4347,15 @@ do { \
})
#endif
+/* if @cond then downgrade to debug, else print at @level */
+#define netif_cond_dbg(priv, type, netdev, cond, level, fmt, args...) \
+ do { \
+ if (cond) \
+ netif_dbg(priv, type, netdev, fmt, ##args); \
+ else \
+ netif_ ## level(priv, type, netdev, fmt, ##args); \
+ } while (0)
+
#if defined(VERBOSE_DEBUG)
#define netif_vdbg netif_dbg
#else