summaryrefslogtreecommitdiffstats
path: root/include/linux/netdevice.h
diff options
context:
space:
mode:
authorScott Feldman2015-07-19 03:24:49 +0200
committerDavid S. Miller2015-07-21 03:32:44 +0200
commitd754f98b502ad9a8c7570d494e1eaa0e6bc0350c (patch)
treec26da1c040abc3d26d7f01e236f947c78fe4d145 /include/linux/netdevice.h
parentnet: don't reforward packets already forwarded by offload device (diff)
downloadkernel-qcow2-linux-d754f98b502ad9a8c7570d494e1eaa0e6bc0350c.tar.gz
kernel-qcow2-linux-d754f98b502ad9a8c7570d494e1eaa0e6bc0350c.tar.xz
kernel-qcow2-linux-d754f98b502ad9a8c7570d494e1eaa0e6bc0350c.zip
net: add phys ID compare helper to test if two IDs are the same
Signed-off-by: Scott Feldman <sfeldma@gmail.com> Acked-by: Jiri Pirko <jiri@resnulli.us> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'include/linux/netdevice.h')
-rw-r--r--include/linux/netdevice.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/linux/netdevice.h b/include/linux/netdevice.h
index 8364f29e08be..607b5f41f46f 100644
--- a/include/linux/netdevice.h
+++ b/include/linux/netdevice.h
@@ -766,6 +766,13 @@ struct netdev_phys_item_id {
unsigned char id_len;
};
+static inline bool netdev_phys_item_id_same(struct netdev_phys_item_id *a,
+ struct netdev_phys_item_id *b)
+{
+ return a->id_len == b->id_len &&
+ memcmp(a->id, b->id, a->id_len) == 0;
+}
+
typedef u16 (*select_queue_fallback_t)(struct net_device *dev,
struct sk_buff *skb);