svn commit: r294826 - head/sys/compat/linuxkpi/common/include/linux
Hans Petter Selasky
hselasky at FreeBSD.org
Tue Jan 26 14:27:02 UTC 2016
Author: hselasky
Date: Tue Jan 26 14:27:00 2016
New Revision: 294826
URL: https://svnweb.freebsd.org/changeset/base/294826
Log:
Add definition for the NETDEV_CHANGE event and tidy up the LinuxKPI
notifier header file a bit while at it.
MFC after: 1 week
Sponsored by: Mellanox Technologies
Modified:
head/sys/compat/linuxkpi/common/include/linux/notifier.h
Modified: head/sys/compat/linuxkpi/common/include/linux/notifier.h
==============================================================================
--- head/sys/compat/linuxkpi/common/include/linux/notifier.h Tue Jan 26 14:21:30 2016 (r294825)
+++ head/sys/compat/linuxkpi/common/include/linux/notifier.h Tue Jan 26 14:27:00 2016 (r294826)
@@ -2,7 +2,7 @@
* Copyright (c) 2010 Isilon Systems, Inc.
* Copyright (c) 2010 iX Systems, Inc.
* Copyright (c) 2010 Panasas, Inc.
- * Copyright (c) 2013, 2014 Mellanox Technologies, Ltd.
+ * Copyright (c) 2013-2016 Mellanox Technologies, Ltd.
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without
@@ -34,26 +34,24 @@
#include <sys/types.h>
#include <sys/eventhandler.h>
-/*
- * Max number of FreeBSD events to map to Linux events per notify type.
- */
#define NOTIFY_DONE 0
-#define _NOTIFY_COUNT 7
-struct notifier_block {
- int (*notifier_call)(struct notifier_block *, unsigned long, void *);
- struct notifier_block *next;
- int priority;
- eventhandler_tag tags[_NOTIFY_COUNT];
+enum {
+ NETDEV_CHANGE,
+ NETDEV_UP,
+ NETDEV_DOWN,
+ NETDEV_REGISTER,
+ NETDEV_UNREGISTER,
+ NETDEV_CHANGEADDR,
+ NETDEV_CHANGEIFADDR,
+ LINUX_NOTIFY_TAGS /* must be last */
};
-/* Values must be less than NOTIFY_COUNT */
-#define NETDEV_UP 0x0001
-#define NETDEV_DOWN 0x0002
-#define NETDEV_REGISTER 0x0003
-#define NETDEV_UNREGISTER 0x0004
-#define NETDEV_CHANGEADDR 0x0005
-#define NETDEV_CHANGEIFADDR 0x0006
-
+struct notifier_block {
+ int (*notifier_call) (struct notifier_block *, unsigned long, void *);
+ struct notifier_block *next;
+ int priority;
+ eventhandler_tag tags[LINUX_NOTIFY_TAGS];
+};
-#endif /* _LINUX_NOTIFIER_H_ */
+#endif /* _LINUX_NOTIFIER_H_ */
More information about the svn-src-all
mailing list