From owner-svn-src-head@freebsd.org Tue Jan 26 14:27:02 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8A6ECA6ECFA; Tue, 26 Jan 2016 14:27:02 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org (repo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 3C7B31802; Tue, 26 Jan 2016 14:27:02 +0000 (UTC) (envelope-from hselasky@FreeBSD.org) Received: from repo.freebsd.org ([127.0.1.37]) by repo.freebsd.org (8.15.2/8.15.2) with ESMTP id u0QER1qH045193; Tue, 26 Jan 2016 14:27:01 GMT (envelope-from hselasky@FreeBSD.org) Received: (from hselasky@localhost) by repo.freebsd.org (8.15.2/8.15.2/Submit) id u0QER18e045192; Tue, 26 Jan 2016 14:27:01 GMT (envelope-from hselasky@FreeBSD.org) Message-Id: <201601261427.u0QER18e045192@repo.freebsd.org> X-Authentication-Warning: repo.freebsd.org: hselasky set sender to hselasky@FreeBSD.org using -f From: Hans Petter Selasky Date: Tue, 26 Jan 2016 14:27:01 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r294826 - head/sys/compat/linuxkpi/common/include/linux X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Jan 2016 14:27:02 -0000 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 #include -/* - * 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_ */