Netdev List
 help / color / mirror / Atom feed
* [PATCH 0/5] staging: remove ncpfs and ipx code
From: Greg Kroah-Hartman @ 2018-06-01 18:45 UTC (permalink / raw)
  To: devel; +Cc: netdev, linux-kernel, Greg Kroah-Hartman

The ncpfs filesystem and ipx networking code moved into the
drivers/staging/ tree back in November of last year.  Since then, no one
has steped up to take over maintance of this code.  Given that it has
been more than 6 months, it is time to delete it.

Note, there is more work to be done to remove the ipx header files
completly, as it is burried deep into the networking stack in places.  I
will work on a patch series to complete that later, after this is
merged, in order to clean up the last remaining bits properly.

Unless there are any objections, I'll take this through my staging tree.

Greg Kroah-Hartman (5):
  staging: ncpfs: delete it
  ncpfs: remove compat functionality
  ncpfs: remove Documentation
  ncpfs: remove uapi .h files
  staging: ipx: delete it from the tree

 Documentation/filesystems/00-INDEX     |    2 -
 Documentation/filesystems/ncpfs.txt    |   12 -
 drivers/staging/Kconfig                |    4 -
 drivers/staging/Makefile               |    2 -
 drivers/staging/ipx/Kconfig            |   61 -
 drivers/staging/ipx/Makefile           |    8 -
 drivers/staging/ipx/TODO               |    4 -
 drivers/staging/ipx/af_ipx.c           | 2082 ------------------------
 drivers/staging/ipx/ipx_proc.c         |  338 ----
 drivers/staging/ipx/ipx_route.c        |  293 ----
 drivers/staging/ipx/pe2.c              |   36 -
 drivers/staging/ipx/sysctl_net_ipx.c   |   40 -
 drivers/staging/ncpfs/Kconfig          |  108 --
 drivers/staging/ncpfs/Makefile         |   17 -
 drivers/staging/ncpfs/TODO             |    4 -
 drivers/staging/ncpfs/dir.c            | 1232 --------------
 drivers/staging/ncpfs/file.c           |  263 ---
 drivers/staging/ncpfs/getopt.c         |   76 -
 drivers/staging/ncpfs/getopt.h         |   17 -
 drivers/staging/ncpfs/inode.c          | 1067 ------------
 drivers/staging/ncpfs/ioctl.c          |  923 -----------
 drivers/staging/ncpfs/mmap.c           |  125 --
 drivers/staging/ncpfs/ncp_fs.h         |  101 --
 drivers/staging/ncpfs/ncp_fs_i.h       |   31 -
 drivers/staging/ncpfs/ncp_fs_sb.h      |  174 --
 drivers/staging/ncpfs/ncplib_kernel.c  | 1326 ---------------
 drivers/staging/ncpfs/ncplib_kernel.h  |  215 ---
 drivers/staging/ncpfs/ncpsign_kernel.c |  128 --
 drivers/staging/ncpfs/ncpsign_kernel.h |   27 -
 drivers/staging/ncpfs/sock.c           |  855 ----------
 drivers/staging/ncpfs/symlink.c        |  182 ---
 fs/compat.c                            |   72 +-
 include/uapi/linux/ncp.h               |  202 ---
 include/uapi/linux/ncp_fs.h            |  147 --
 include/uapi/linux/ncp_mount.h         |   72 -
 include/uapi/linux/ncp_no.h            |   20 -
 36 files changed, 1 insertion(+), 10265 deletions(-)
 delete mode 100644 Documentation/filesystems/ncpfs.txt
 delete mode 100644 drivers/staging/ipx/Kconfig
 delete mode 100644 drivers/staging/ipx/Makefile
 delete mode 100644 drivers/staging/ipx/TODO
 delete mode 100644 drivers/staging/ipx/af_ipx.c
 delete mode 100644 drivers/staging/ipx/ipx_proc.c
 delete mode 100644 drivers/staging/ipx/ipx_route.c
 delete mode 100644 drivers/staging/ipx/pe2.c
 delete mode 100644 drivers/staging/ipx/sysctl_net_ipx.c
 delete mode 100644 drivers/staging/ncpfs/Kconfig
 delete mode 100644 drivers/staging/ncpfs/Makefile
 delete mode 100644 drivers/staging/ncpfs/TODO
 delete mode 100644 drivers/staging/ncpfs/dir.c
 delete mode 100644 drivers/staging/ncpfs/file.c
 delete mode 100644 drivers/staging/ncpfs/getopt.c
 delete mode 100644 drivers/staging/ncpfs/getopt.h
 delete mode 100644 drivers/staging/ncpfs/inode.c
 delete mode 100644 drivers/staging/ncpfs/ioctl.c
 delete mode 100644 drivers/staging/ncpfs/mmap.c
 delete mode 100644 drivers/staging/ncpfs/ncp_fs.h
 delete mode 100644 drivers/staging/ncpfs/ncp_fs_i.h
 delete mode 100644 drivers/staging/ncpfs/ncp_fs_sb.h
 delete mode 100644 drivers/staging/ncpfs/ncplib_kernel.c
 delete mode 100644 drivers/staging/ncpfs/ncplib_kernel.h
 delete mode 100644 drivers/staging/ncpfs/ncpsign_kernel.c
 delete mode 100644 drivers/staging/ncpfs/ncpsign_kernel.h
 delete mode 100644 drivers/staging/ncpfs/sock.c
 delete mode 100644 drivers/staging/ncpfs/symlink.c
 delete mode 100644 include/uapi/linux/ncp.h
 delete mode 100644 include/uapi/linux/ncp_fs.h
 delete mode 100644 include/uapi/linux/ncp_mount.h
 delete mode 100644 include/uapi/linux/ncp_no.h

-- 
2.17.1

^ permalink raw reply

* [PATCH 5/5] staging: ipx: delete it from the tree
From: Greg Kroah-Hartman @ 2018-06-01 18:45 UTC (permalink / raw)
  To: devel; +Cc: netdev, David S . Miller, linux-kernel, Greg Kroah-Hartman
In-Reply-To: <20180601184547.20213-1-gregkh@linuxfoundation.org>

The ipx code moved into the staging tree back in November 2017 and no
one has complained or even noticed it was gone.  Because of that, let's
just delete it.

Note, the ipx header files are not removed here, that will come later
through the networking tree, as that takes a bit more work to unwind.

Cc: Stephen Hemminger <stephen@networkplumber.org>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/staging/Kconfig              |    2 -
 drivers/staging/Makefile             |    1 -
 drivers/staging/ipx/Kconfig          |   61 -
 drivers/staging/ipx/Makefile         |    8 -
 drivers/staging/ipx/TODO             |    4 -
 drivers/staging/ipx/af_ipx.c         | 2082 --------------------------
 drivers/staging/ipx/ipx_proc.c       |  338 -----
 drivers/staging/ipx/ipx_route.c      |  293 ----
 drivers/staging/ipx/pe2.c            |   36 -
 drivers/staging/ipx/sysctl_net_ipx.c |   40 -
 10 files changed, 2865 deletions(-)
 delete mode 100644 drivers/staging/ipx/Kconfig
 delete mode 100644 drivers/staging/ipx/Makefile
 delete mode 100644 drivers/staging/ipx/TODO
 delete mode 100644 drivers/staging/ipx/af_ipx.c
 delete mode 100644 drivers/staging/ipx/ipx_proc.c
 delete mode 100644 drivers/staging/ipx/ipx_route.c
 delete mode 100644 drivers/staging/ipx/pe2.c
 delete mode 100644 drivers/staging/ipx/sysctl_net_ipx.c

diff --git a/drivers/staging/Kconfig b/drivers/staging/Kconfig
index b695560cab2f..563dd3ee682a 100644
--- a/drivers/staging/Kconfig
+++ b/drivers/staging/Kconfig
@@ -24,8 +24,6 @@ menuconfig STAGING
 
 if STAGING
 
-source "drivers/staging/ipx/Kconfig"
-
 source "drivers/staging/wlan-ng/Kconfig"
 
 source "drivers/staging/comedi/Kconfig"
diff --git a/drivers/staging/Makefile b/drivers/staging/Makefile
index d6d0e9266cb5..03e77ee05c2a 100644
--- a/drivers/staging/Makefile
+++ b/drivers/staging/Makefile
@@ -3,7 +3,6 @@
 
 obj-y				+= media/
 obj-y				+= typec/
-obj-$(CONFIG_IPX)		+= ipx/
 obj-$(CONFIG_PRISM2_USB)	+= wlan-ng/
 obj-$(CONFIG_COMEDI)		+= comedi/
 obj-$(CONFIG_FB_OLPC_DCON)	+= olpc_dcon/
diff --git a/drivers/staging/ipx/Kconfig b/drivers/staging/ipx/Kconfig
deleted file mode 100644
index cdff083d0ee6..000000000000
diff --git a/drivers/staging/ipx/Makefile b/drivers/staging/ipx/Makefile
deleted file mode 100644
index 440fafa9fd07..000000000000
diff --git a/drivers/staging/ipx/TODO b/drivers/staging/ipx/TODO
deleted file mode 100644
index 80db5d968264..000000000000
diff --git a/drivers/staging/ipx/af_ipx.c b/drivers/staging/ipx/af_ipx.c
deleted file mode 100644
index 5703dd176787..000000000000
diff --git a/drivers/staging/ipx/ipx_proc.c b/drivers/staging/ipx/ipx_proc.c
deleted file mode 100644
index b9232e4e2ed4..000000000000
diff --git a/drivers/staging/ipx/ipx_route.c b/drivers/staging/ipx/ipx_route.c
deleted file mode 100644
index 3cf93aa9f284..000000000000
diff --git a/drivers/staging/ipx/pe2.c b/drivers/staging/ipx/pe2.c
deleted file mode 100644
index ba7d4214bbff..000000000000
diff --git a/drivers/staging/ipx/sysctl_net_ipx.c b/drivers/staging/ipx/sysctl_net_ipx.c
deleted file mode 100644
index c3eef457db88..000000000000
-- 
2.17.1

^ permalink raw reply related

* [PATCH 4/5] ncpfs: remove uapi .h files
From: Greg Kroah-Hartman @ 2018-06-01 18:45 UTC (permalink / raw)
  To: devel; +Cc: netdev, linux-kernel, Greg Kroah-Hartman
In-Reply-To: <20180601184547.20213-1-gregkh@linuxfoundation.org>

Now that ncpfs is removed from the tree, there is no need to keep the
uapi header files around as no one uses them, and it is not a feature
that the kernel supports anymore.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 include/uapi/linux/ncp.h       | 202 ---------------------------------
 include/uapi/linux/ncp_fs.h    | 147 ------------------------
 include/uapi/linux/ncp_mount.h |  72 ------------
 include/uapi/linux/ncp_no.h    |  20 ----
 4 files changed, 441 deletions(-)
 delete mode 100644 include/uapi/linux/ncp.h
 delete mode 100644 include/uapi/linux/ncp_fs.h
 delete mode 100644 include/uapi/linux/ncp_mount.h
 delete mode 100644 include/uapi/linux/ncp_no.h

diff --git a/include/uapi/linux/ncp.h b/include/uapi/linux/ncp.h
deleted file mode 100644
index ca6f3d42c88f..000000000000
diff --git a/include/uapi/linux/ncp_fs.h b/include/uapi/linux/ncp_fs.h
deleted file mode 100644
index e76a44229d2f..000000000000
diff --git a/include/uapi/linux/ncp_mount.h b/include/uapi/linux/ncp_mount.h
deleted file mode 100644
index 9bdbcd68c329..000000000000
diff --git a/include/uapi/linux/ncp_no.h b/include/uapi/linux/ncp_no.h
deleted file mode 100644
index 654d7c7f5d92..000000000000
-- 
2.17.1

^ permalink raw reply

* [PATCH 3/5] ncpfs: remove Documentation
From: Greg Kroah-Hartman @ 2018-06-01 18:45 UTC (permalink / raw)
  To: devel; +Cc: netdev, linux-kernel, Greg Kroah-Hartman
In-Reply-To: <20180601184547.20213-1-gregkh@linuxfoundation.org>

No need for any more ncpfs documentation around given that the
filesystem is now removed.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 Documentation/filesystems/00-INDEX  |  2 --
 Documentation/filesystems/ncpfs.txt | 12 ------------
 2 files changed, 14 deletions(-)
 delete mode 100644 Documentation/filesystems/ncpfs.txt

diff --git a/Documentation/filesystems/00-INDEX b/Documentation/filesystems/00-INDEX
index b7bd6c9009cc..5f305a2af852 100644
--- a/Documentation/filesystems/00-INDEX
+++ b/Documentation/filesystems/00-INDEX
@@ -89,8 +89,6 @@ locks.txt
 	- info on file locking implementations, flock() vs. fcntl(), etc.
 mandatory-locking.txt
 	- info on the Linux implementation of Sys V mandatory file locking.
-ncpfs.txt
-	- info on Novell Netware(tm) filesystem using NCP protocol.
 nfs/
 	- nfs-related documentation.
 nilfs2.txt
diff --git a/Documentation/filesystems/ncpfs.txt b/Documentation/filesystems/ncpfs.txt
deleted file mode 100644
index 5af164f4b37b..000000000000
-- 
2.17.1

^ permalink raw reply related

* [PATCH 2/5] ncpfs: remove compat functionality
From: Greg Kroah-Hartman @ 2018-06-01 18:45 UTC (permalink / raw)
  To: devel; +Cc: netdev, linux-kernel, Greg Kroah-Hartman
In-Reply-To: <20180601184547.20213-1-gregkh@linuxfoundation.org>

Now that ncpfs is gone from the tree, no need to have the compatibility
thunking layer around, it will not actually go anywhere :)

So delete that logic from fs/compat.c, it is no longer needed.

Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 fs/compat.c | 72 +----------------------------------------------------
 1 file changed, 1 insertion(+), 71 deletions(-)

diff --git a/fs/compat.c b/fs/compat.c
index 190b38b39d9e..4a0aaaf53217 100644
--- a/fs/compat.c
+++ b/fs/compat.c
@@ -16,79 +16,12 @@
  */
 
 #include <linux/compat.h>
-#include <linux/ncp_mount.h>
 #include <linux/nfs4_mount.h>
 #include <linux/syscalls.h>
 #include <linux/slab.h>
 #include <linux/uaccess.h>
 #include "internal.h"
 
-struct compat_ncp_mount_data {
-	compat_int_t version;
-	compat_uint_t ncp_fd;
-	__compat_uid_t mounted_uid;
-	compat_pid_t wdog_pid;
-	unsigned char mounted_vol[NCP_VOLNAME_LEN + 1];
-	compat_uint_t time_out;
-	compat_uint_t retry_count;
-	compat_uint_t flags;
-	__compat_uid_t uid;
-	__compat_gid_t gid;
-	compat_mode_t file_mode;
-	compat_mode_t dir_mode;
-};
-
-struct compat_ncp_mount_data_v4 {
-	compat_int_t version;
-	compat_ulong_t flags;
-	compat_ulong_t mounted_uid;
-	compat_long_t wdog_pid;
-	compat_uint_t ncp_fd;
-	compat_uint_t time_out;
-	compat_uint_t retry_count;
-	compat_ulong_t uid;
-	compat_ulong_t gid;
-	compat_ulong_t file_mode;
-	compat_ulong_t dir_mode;
-};
-
-static void *do_ncp_super_data_conv(void *raw_data)
-{
-	int version = *(unsigned int *)raw_data;
-
-	if (version == 3) {
-		struct compat_ncp_mount_data *c_n = raw_data;
-		struct ncp_mount_data *n = raw_data;
-
-		n->dir_mode = c_n->dir_mode;
-		n->file_mode = c_n->file_mode;
-		n->gid = c_n->gid;
-		n->uid = c_n->uid;
-		memmove (n->mounted_vol, c_n->mounted_vol, (sizeof (c_n->mounted_vol) + 3 * sizeof (unsigned int)));
-		n->wdog_pid = c_n->wdog_pid;
-		n->mounted_uid = c_n->mounted_uid;
-	} else if (version == 4) {
-		struct compat_ncp_mount_data_v4 *c_n = raw_data;
-		struct ncp_mount_data_v4 *n = raw_data;
-
-		n->dir_mode = c_n->dir_mode;
-		n->file_mode = c_n->file_mode;
-		n->gid = c_n->gid;
-		n->uid = c_n->uid;
-		n->retry_count = c_n->retry_count;
-		n->time_out = c_n->time_out;
-		n->ncp_fd = c_n->ncp_fd;
-		n->wdog_pid = c_n->wdog_pid;
-		n->mounted_uid = c_n->mounted_uid;
-		n->flags = c_n->flags;
-	} else if (version != 5) {
-		return NULL;
-	}
-
-	return raw_data;
-}
-
-
 struct compat_nfs_string {
 	compat_uint_t len;
 	compat_uptr_t data;
@@ -154,7 +87,6 @@ static int do_nfs4_super_data_conv(void *raw_data)
 	return 0;
 }
 
-#define NCPFS_NAME      "ncpfs"
 #define NFS4_NAME	"nfs4"
 
 COMPAT_SYSCALL_DEFINE5(mount, const char __user *, dev_name,
@@ -183,9 +115,7 @@ COMPAT_SYSCALL_DEFINE5(mount, const char __user *, dev_name,
 		goto out2;
 
 	if (kernel_type && options) {
-		if (!strcmp(kernel_type, NCPFS_NAME)) {
-			do_ncp_super_data_conv(options);
-		} else if (!strcmp(kernel_type, NFS4_NAME)) {
+		if (!strcmp(kernel_type, NFS4_NAME)) {
 			retval = -EINVAL;
 			if (do_nfs4_super_data_conv(options))
 				goto out3;
-- 
2.17.1

^ permalink raw reply related

* [PATCH 1/5] staging: ncpfs: delete it
From: Greg Kroah-Hartman @ 2018-06-01 18:45 UTC (permalink / raw)
  To: devel; +Cc: netdev, David S . Miller, linux-kernel, Greg Kroah-Hartman
In-Reply-To: <20180601184547.20213-1-gregkh@linuxfoundation.org>

The ncpfs code moved into the staging tree back in November 2017 and no
one has complained or even noticed it was gone.  Because of that, let's
just delete it.

Cc: Stephen Hemminger <stephen@networkplumber.org>
Cc: David S. Miller <davem@davemloft.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
---
 drivers/staging/Kconfig                |    2 -
 drivers/staging/Makefile               |    1 -
 drivers/staging/ncpfs/Kconfig          |  108 --
 drivers/staging/ncpfs/Makefile         |   17 -
 drivers/staging/ncpfs/TODO             |    4 -
 drivers/staging/ncpfs/dir.c            | 1232 ----------------------
 drivers/staging/ncpfs/file.c           |  263 -----
 drivers/staging/ncpfs/getopt.c         |   76 --
 drivers/staging/ncpfs/getopt.h         |   17 -
 drivers/staging/ncpfs/inode.c          | 1067 -------------------
 drivers/staging/ncpfs/ioctl.c          |  923 -----------------
 drivers/staging/ncpfs/mmap.c           |  125 ---
 drivers/staging/ncpfs/ncp_fs.h         |  101 --
 drivers/staging/ncpfs/ncp_fs_i.h       |   31 -
 drivers/staging/ncpfs/ncp_fs_sb.h      |  174 ----
 drivers/staging/ncpfs/ncplib_kernel.c  | 1326 ------------------------
 drivers/staging/ncpfs/ncplib_kernel.h  |  215 ----
 drivers/staging/ncpfs/ncpsign_kernel.c |  128 ---
 drivers/staging/ncpfs/ncpsign_kernel.h |   27 -
 drivers/staging/ncpfs/sock.c           |  855 ---------------
 drivers/staging/ncpfs/symlink.c        |  182 ----
 21 files changed, 6874 deletions(-)
 delete mode 100644 drivers/staging/ncpfs/Kconfig
 delete mode 100644 drivers/staging/ncpfs/Makefile
 delete mode 100644 drivers/staging/ncpfs/TODO
 delete mode 100644 drivers/staging/ncpfs/dir.c
 delete mode 100644 drivers/staging/ncpfs/file.c
 delete mode 100644 drivers/staging/ncpfs/getopt.c
 delete mode 100644 drivers/staging/ncpfs/getopt.h
 delete mode 100644 drivers/staging/ncpfs/inode.c
 delete mode 100644 drivers/staging/ncpfs/ioctl.c
 delete mode 100644 drivers/staging/ncpfs/mmap.c
 delete mode 100644 drivers/staging/ncpfs/ncp_fs.h
 delete mode 100644 drivers/staging/ncpfs/ncp_fs_i.h
 delete mode 100644 drivers/staging/ncpfs/ncp_fs_sb.h
 delete mode 100644 drivers/staging/ncpfs/ncplib_kernel.c
 delete mode 100644 drivers/staging/ncpfs/ncplib_kernel.h
 delete mode 100644 drivers/staging/ncpfs/ncpsign_kernel.c
 delete mode 100644 drivers/staging/ncpfs/ncpsign_kernel.h
 delete mode 100644 drivers/staging/ncpfs/sock.c
 delete mode 100644 drivers/staging/ncpfs/symlink.c

diff --git a/drivers/staging/Kconfig b/drivers/staging/Kconfig
index d5926f0d3f6c..b695560cab2f 100644
--- a/drivers/staging/Kconfig
+++ b/drivers/staging/Kconfig
@@ -26,8 +26,6 @@ if STAGING
 
 source "drivers/staging/ipx/Kconfig"
 
-source "drivers/staging/ncpfs/Kconfig"
-
 source "drivers/staging/wlan-ng/Kconfig"
 
 source "drivers/staging/comedi/Kconfig"
diff --git a/drivers/staging/Makefile b/drivers/staging/Makefile
index 919753c3d3f6..d6d0e9266cb5 100644
--- a/drivers/staging/Makefile
+++ b/drivers/staging/Makefile
@@ -4,7 +4,6 @@
 obj-y				+= media/
 obj-y				+= typec/
 obj-$(CONFIG_IPX)		+= ipx/
-obj-$(CONFIG_NCP_FS)		+= ncpfs/
 obj-$(CONFIG_PRISM2_USB)	+= wlan-ng/
 obj-$(CONFIG_COMEDI)		+= comedi/
 obj-$(CONFIG_FB_OLPC_DCON)	+= olpc_dcon/
diff --git a/drivers/staging/ncpfs/Kconfig b/drivers/staging/ncpfs/Kconfig
deleted file mode 100644
index c931cf22a1f6..000000000000
diff --git a/drivers/staging/ncpfs/Makefile b/drivers/staging/ncpfs/Makefile
deleted file mode 100644
index 66fe5f878817..000000000000
diff --git a/drivers/staging/ncpfs/TODO b/drivers/staging/ncpfs/TODO
deleted file mode 100644
index 9b6d38b7e248..000000000000
diff --git a/drivers/staging/ncpfs/dir.c b/drivers/staging/ncpfs/dir.c
deleted file mode 100644
index 0c57c5c5d40a..000000000000
diff --git a/drivers/staging/ncpfs/file.c b/drivers/staging/ncpfs/file.c
deleted file mode 100644
index 8f8cc0334ddd..000000000000
diff --git a/drivers/staging/ncpfs/getopt.c b/drivers/staging/ncpfs/getopt.c
deleted file mode 100644
index 5c941bef14c4..000000000000
diff --git a/drivers/staging/ncpfs/getopt.h b/drivers/staging/ncpfs/getopt.h
deleted file mode 100644
index 30f0da317670..000000000000
diff --git a/drivers/staging/ncpfs/inode.c b/drivers/staging/ncpfs/inode.c
deleted file mode 100644
index bb411610a071..000000000000
diff --git a/drivers/staging/ncpfs/ioctl.c b/drivers/staging/ncpfs/ioctl.c
deleted file mode 100644
index d378b98cd7b6..000000000000
diff --git a/drivers/staging/ncpfs/mmap.c b/drivers/staging/ncpfs/mmap.c
deleted file mode 100644
index a5c5cf2ff007..000000000000
diff --git a/drivers/staging/ncpfs/ncp_fs.h b/drivers/staging/ncpfs/ncp_fs.h
deleted file mode 100644
index bdd262b6c198..000000000000
diff --git a/drivers/staging/ncpfs/ncp_fs_i.h b/drivers/staging/ncpfs/ncp_fs_i.h
deleted file mode 100644
index 3432bafb53a5..000000000000
diff --git a/drivers/staging/ncpfs/ncp_fs_sb.h b/drivers/staging/ncpfs/ncp_fs_sb.h
deleted file mode 100644
index f06cde4adf71..000000000000
diff --git a/drivers/staging/ncpfs/ncplib_kernel.c b/drivers/staging/ncpfs/ncplib_kernel.c
deleted file mode 100644
index 3e047eb4cc7c..000000000000
diff --git a/drivers/staging/ncpfs/ncplib_kernel.h b/drivers/staging/ncpfs/ncplib_kernel.h
deleted file mode 100644
index aaae8aa9bf7d..000000000000
diff --git a/drivers/staging/ncpfs/ncpsign_kernel.c b/drivers/staging/ncpfs/ncpsign_kernel.c
deleted file mode 100644
index 8085b1a3ba47..000000000000
diff --git a/drivers/staging/ncpfs/ncpsign_kernel.h b/drivers/staging/ncpfs/ncpsign_kernel.h
deleted file mode 100644
index 57ff0a0650b8..000000000000
diff --git a/drivers/staging/ncpfs/sock.c b/drivers/staging/ncpfs/sock.c
deleted file mode 100644
index 4c13174d85b7..000000000000
diff --git a/drivers/staging/ncpfs/symlink.c b/drivers/staging/ncpfs/symlink.c
deleted file mode 100644
index b6e16da4837a..000000000000
-- 
2.17.1

^ permalink raw reply related

* Re: [PATCH bpf-next] bpf: prevent non-IPv4 socket to be added into sock hash
From: John Fastabend @ 2018-06-01 18:40 UTC (permalink / raw)
  To: Eric Dumazet; +Cc: Wei Wang, netdev, Willem de Bruijn
In-Reply-To: <ee9f3172-14c5-3bf8-c61f-cf4e19c705f7@gmail.com>

On 06/01/2018 12:56 AM, John Fastabend wrote:
> On 05/31/2018 06:00 PM, Eric Dumazet wrote:
>> On Thu, May 31, 2018 at 7:32 PM John Fastabend <john.fastabend@gmail.com> wrote:
>>>
>>>
>>> Hi Wei,
>>>
>>> Thanks for the report and fix. It would be better to fix the
>>> root cause so that IPv6 works as intended.
>>>
>>> I'm testing the following now,
>>>
>>> Author: John Fastabend <john.fastabend@gmail.com>
>>> Date:   Thu May 31 14:38:59 2018 -0700
>>>
>>>     sockmap: fix crash when ipv6 sock is added by adding support for IPv6
>>>
>>>     Apparently we had a testing escape and missed IPv6. This fixes a crash
>>>     where we assign tcp_prot to IPv6 sockets instead of tcpv6_prot.
>>>
>>>     Signed-off-by: John Fastabend <john.fastabend@gmail.com>
>>>
>>
>> Hi John
>>
>> In any case, please forward correct attribution for Wei's work, and
>> syzbot 'Reported-by'
> 
> Will send update with tags in a moment.
> 
>>
>> Are you sure you are handling IPv4 mapped in IPv6 sockets as well ?
>>
>
> No, will look into it. Although I didn't see any code to handle it
> in the ./net/tls case either so if there is some issue with this it
> could possibly exist in both ULPs. I guess if ipv4 mapped ipv6
> changes prot or callbacks then we could stomp on it.
>

Will need a v2 to address this, by adding a check to only work on
ESTABLISHED sockets we resolve this issue and the one noted in the
TLS ULP side as well.

Thanks a lot Eric.

^ permalink raw reply

* Re: [PATCH net-next 00/11] Misc. bug fixes & optimizations for HNS3 driver
From: David Miller @ 2018-06-01 18:24 UTC (permalink / raw)
  To: salil.mehta
  Cc: yisen.zhuang, lipeng321, mehta.salil, netdev, linux-kernel,
	linuxarm
In-Reply-To: <20180601165211.46372-1-salil.mehta@huawei.com>

From: Salil Mehta <salil.mehta@huawei.com>
Date: Fri, 1 Jun 2018 17:52:00 +0100

> This patch-set presents some bug fixes found out during the internal
> review and system testing and some small optimizations.

Series applied, thank you.

^ permalink raw reply

* Re: [PATCH net] ipv6: omit traffic class when calculating flow hash
From: Ido Schimmel @ 2018-06-01 18:19 UTC (permalink / raw)
  To: Michal Kubecek
  Cc: David S. Miller, netdev, linux-kernel, Nicolas Dichtel,
	Tom Herbert, David Ahern
In-Reply-To: <20180601112948.93BE7A0C48@unicorn.suse.cz>

On Fri, Jun 01, 2018 at 12:34:41PM +0200, Michal Kubecek wrote:
> Some of the code paths calculating flow hash for IPv6 use flowlabel member
> of struct flowi6 which, despite its name, encodes both flow label and
> traffic class. If traffic class changes within a TCP connection (as e.g.
> ssh does), ECMP route can switch between path. It's also incosistent with
> other code paths where ip6_flowlabel() (returning only flow label) is used
> to feed the key.
> 
> Use only flow label everywhere, including one place where hash key is set
> using ip6_flowinfo().
> 
> Fixes: 51ebd3181572 ("ipv6: add support of equal cost multipath (ECMP)")
> Fixes: f70ea018da06 ("net: Add functions to get skb->hash based on flow structures")
> Signed-off-by: Michal Kubecek <mkubecek@suse.cz>

Hi Michal,

Please consider adding a test case to
tools/testing/selftests/net/fib_tests.sh

Personally, I tested the patch by looping over different values of 'tos'
for 'ip route get' and confirmed that the same nexthop is selected.

Thanks!

^ permalink raw reply

* Re: [PATCH net-next v18 0/8] sched: Add Common Applications Kept Enhanced (cake) qdisc
From: David Miller @ 2018-06-01 18:17 UTC (permalink / raw)
  To: toke
  Cc: netdev, cake, gamanakis, peteheist, ycheng, ncardwell, dave.taht,
	netfilter-devel
In-Reply-To: <87r2lq9zez.fsf@toke.dk>

From: Toke Høiland-Jørgensen <toke@toke.dk>
Date: Fri, 01 Jun 2018 19:42:12 +0200

> Toke Høiland-Jørgensen <toke@toke.dk> writes:
> 
>> This patch series adds the CAKE qdisc, and has been split up to ease
>> review.
>>
>> I have attempted to split out each configurable feature into its own patch.
>> The first commit adds the base shaper and packet scheduler, while
>> subsequent commits add the optional features. The full userspace API and
>> most data structures are included in this commit, but options not
>> understood in the base version will be ignored.
> 
> Hmm, there seems to be a lockup issue being triggered when running CAKE
> at high speeds (>40 Gbps in my tests). Please drop this series for now,
> we'll return for 4.19 with a revised version.

Ok.

Thanks for continuing to push this work along.

^ permalink raw reply

* Re: [PATCH net-next 0/9] Test mirror-to-gretap with bridge in UL
From: David Miller @ 2018-06-01 18:11 UTC (permalink / raw)
  To: petrm; +Cc: netdev, linux-kselftest, shuah, idosch
In-Reply-To: <cover.1527788672.git.petrm@mellanox.com>

From: Petr Machata <petrm@mellanox.com>
Date: Thu, 31 May 2018 19:51:56 +0200

> This patchset adds more tests to the mirror-to-gretap suite where bridge
> is present in the underlay. Specifically it adds tests for bridge VLAN
> handling, FDB, and bridge port STP status.
> 
> In patches #1-#3, the codebase is refactored to support the new tests.
> 
> In patch #4, an STP test is added to the mirroring library, that will
> later be called from bridge tests.
> 
> In patches #5-#8, the test for mirror-to-gretap with an 802.1q bridge in
> underlay is adapted and more tests are added.
> 
> In patch #9, an STP test is added to the test suite for mirror-to-gretap
> with an 802.1d bridge in underlay.

Series applied, thanks.

^ permalink raw reply

* Re: suspicius csum initialization in vmxnet3_rx_csum
From: Ronak Doshi @ 2018-06-01 18:10 UTC (permalink / raw)
  To: Neil Horman; +Cc: Paolo Abeni, Guolin Yang, Boon Ang, Louis Luo, netdev
In-Reply-To: <20180531233227.GA6985@neilslaptop.think-freely.org>



On Thu, 31 May 2018, Neil Horman wrote:

> On Thu, May 31, 2018 at 11:02:34AM -0700, Ronak Doshi wrote:
> > 
> > On Wed, 30 May 2018, Paolo Abeni wrote:
> > 
> > > Hi,
> > > 
> > > On Thu, 2018-05-24 at 21:48 +0000, Guolin Yang wrote:
> > > > Yes, that code  is not correct, we should fix that code
> > > 
> > > Did you have any chance to address the issue and/or to give a more in-
> > > deepth look to the change proposed in my initial email?
> > >  
> > Hi Paolo,
> > 
> > Can you provide the esx build you are using? It can be found using 
> > "vmware -vl" on ESX host.
> > 
> > Did you try your proposed fix and did it work? Are you sure the packet
> > hits the below if block and not the else block? I still don't think the
> > ICMP packet will go through the below if block.
> > 
> >    if (gdesc->rcd.csum) {
> > 	skb->csum = htons(gdesc->rcd.csum);
> > 	skb->ip_summed = CHECKSUM_PARTIAL;
> >    } else {
> > 	skb_checksum_none_assert(skb);
> >    }
> > 
> > The vmxnet3 emulation does not calculate rcd.csum for ICMP packet and
> > hence should go through the else block i.e. checksum none.
> > 
> What packet types will rcd.csum be set for?
> Neil 
> 
I looked thorugh the emulation code and found that rcd.csum is not set. 
For valid v4/v6, TCP/UDP packets the code block above the mentioend "if" 
block will be executed or else it will go through checksum none.

That's why I wanted to know (in previous emails) which ESX build is being 
used while this was tested. The code block under "if (gdesc->rcd.csum)" 
block might seem incorrect but it shouldn't be hit as rcd.csum is not set. 
Hence, I asked did the fix provided by Paolo worked for the icmp test?

Thanks,
Ronak

^ permalink raw reply

* Re: [PATCH 1/1] net: usb: cdc_mbim: add flag FLAG_SEND_ZLP
From: David Miller @ 2018-06-01 18:02 UTC (permalink / raw)
  To: dnlplm; +Cc: bjorn, oliver, netdev, linux-usb
In-Reply-To: <1527758309-9614-1-git-send-email-dnlplm@gmail.com>

From: Daniele Palmas <dnlplm@gmail.com>
Date: Thu, 31 May 2018 11:18:29 +0200

> Testing Telit LM940 with ICMP packets > 14552 bytes revealed that
> the modem needs FLAG_SEND_ZLP to properly work, otherwise the cdc
> mbim data interface won't be anymore responsive.
> 
> Signed-off-by: Daniele Palmas <dnlplm@gmail.com>

Applied and queued up for -stable.

^ permalink raw reply

* Re: [PATCH net v2 0/2] ip[6] tunnels: fix mtu calculations
From: David Miller @ 2018-06-01 17:57 UTC (permalink / raw)
  To: nicolas.dichtel; +Cc: petrm, idosch, netdev
In-Reply-To: <20180531085933.31079-1-nicolas.dichtel@6wind.com>

From: Nicolas Dichtel <nicolas.dichtel@6wind.com>
Date: Thu, 31 May 2018 10:59:31 +0200

> The first patch restores the possibility to bind an ip4 tunnel to an
> interface whith a large mtu.
> The second patch was spotted after the first fix. I also target it to net
> because it fixes the max mtu value that can be used for ipv6 tunnels.
> 
> v2: remove the 0xfff8 in ip_tunnel_newlink()

Series applied and queued up for -stable.

I think the 0xfff8 value might come from the requirement that ipv6
fragments need to be a multiple of 8 bytes long.

^ permalink raw reply

* Re: [PATCH net] ipv6: omit traffic class when calculating flow hash
From: David Ahern @ 2018-06-01 17:55 UTC (permalink / raw)
  To: Michal Kubecek
  Cc: David S. Miller, netdev, linux-kernel, Nicolas Dichtel,
	Tom Herbert
In-Reply-To: <20180601175150.jgmmdygb2pzjvmqo@unicorn.suse.cz>

On 6/1/18 11:51 AM, Michal Kubecek wrote:
> On Fri, Jun 01, 2018 at 10:42:10AM -0600, David Ahern wrote:
>>
>> Can you make an inline for the flowlabel conversion. Something like this:
>>
>> diff --git a/include/net/ipv6.h b/include/net/ipv6.h
>> index 798558fd1681..e36eca2f8531 100644
>> --- a/include/net/ipv6.h
>> +++ b/include/net/ipv6.h
>> @@ -284,6 +284,11 @@ struct ip6_flowlabel {
>>  #define IPV6_FLOWLABEL_MASK            cpu_to_be32(0x000FFFFF)
>>  #define IPV6_FLOWLABEL_STATELESS_FLAG  cpu_to_be32(0x00080000)
>>
>> +static inline u32 flowi6_get_flowlabel(const struct flowi6 *fl6)
>> +{
>> +       return (__force u32)(fl6->flowlabel & IPV6_FLOWLABEL_MASK);
>> +}
>> +
>>  #define IPV6_TCLASS_MASK (IPV6_FLOWINFO_MASK & ~IPV6_FLOWLABEL_MASK)
>>  #define IPV6_TCLASS_SHIFT      20
>>
>> From there we can fix the flow struct to have flowinfo instead of
>> flowlabel and use the macro to hide the conversion.
> 
> I'll send v2 with inline helper. I'm just not sure about including the
> cast as this way the helper would be useful for hash key which is not
> clear from the name. So it seems more appropriate to either introduce a
> helper which just does the masking or helper which does also the copying
> into struct flow_keys.
> 

I think the cast should stay in the helper. See the RFC patch flipping
the name from flowlabel to flowinfo. Makes the code the more readable IMHO.

^ permalink raw reply

* Re: [PATCH net] ipv6: omit traffic class when calculating flow hash
From: Michal Kubecek @ 2018-06-01 17:51 UTC (permalink / raw)
  To: David Ahern
  Cc: David S. Miller, netdev, linux-kernel, Nicolas Dichtel,
	Tom Herbert
In-Reply-To: <4c70b2ef-20c2-0e7c-d1f6-7d4c97e566f2@gmail.com>

On Fri, Jun 01, 2018 at 10:42:10AM -0600, David Ahern wrote:
> 
> Can you make an inline for the flowlabel conversion. Something like this:
> 
> diff --git a/include/net/ipv6.h b/include/net/ipv6.h
> index 798558fd1681..e36eca2f8531 100644
> --- a/include/net/ipv6.h
> +++ b/include/net/ipv6.h
> @@ -284,6 +284,11 @@ struct ip6_flowlabel {
>  #define IPV6_FLOWLABEL_MASK            cpu_to_be32(0x000FFFFF)
>  #define IPV6_FLOWLABEL_STATELESS_FLAG  cpu_to_be32(0x00080000)
> 
> +static inline u32 flowi6_get_flowlabel(const struct flowi6 *fl6)
> +{
> +       return (__force u32)(fl6->flowlabel & IPV6_FLOWLABEL_MASK);
> +}
> +
>  #define IPV6_TCLASS_MASK (IPV6_FLOWINFO_MASK & ~IPV6_FLOWLABEL_MASK)
>  #define IPV6_TCLASS_SHIFT      20
> 
> From there we can fix the flow struct to have flowinfo instead of
> flowlabel and use the macro to hide the conversion.

I'll send v2 with inline helper. I'm just not sure about including the
cast as this way the helper would be useful for hash key which is not
clear from the name. So it seems more appropriate to either introduce a
helper which just does the masking or helper which does also the copying
into struct flow_keys.

Michal Kubecek

^ permalink raw reply

* Re: [PATCH net-next v18 0/8] sched: Add Common Applications Kept Enhanced (cake) qdisc
From: Toke Høiland-Jørgensen @ 2018-06-01 17:42 UTC (permalink / raw)
  To: netdev, cake
  Cc: Georgios Amanakis, Pete Heist, Yuchung Cheng, Neal Cardwell,
	Dave Taht, netfilter-devel
In-Reply-To: <152776056580.16347.7216549227396672873.stgit@alrua-kau>

Toke Høiland-Jørgensen <toke@toke.dk> writes:

> This patch series adds the CAKE qdisc, and has been split up to ease
> review.
>
> I have attempted to split out each configurable feature into its own patch.
> The first commit adds the base shaper and packet scheduler, while
> subsequent commits add the optional features. The full userspace API and
> most data structures are included in this commit, but options not
> understood in the base version will be ignored.

Hmm, there seems to be a lockup issue being triggered when running CAKE
at high speeds (>40 Gbps in my tests). Please drop this series for now,
we'll return for 4.19 with a revised version.

-Toke

^ permalink raw reply

* Re: [PATCH] net: core: improve the tx_hash calculating
From: David Miller @ 2018-06-01 17:27 UTC (permalink / raw)
  To: xiangxia.m.yue; +Cc: netdev
In-Reply-To: <1527761641-22034-1-git-send-email-xiangxia.m.yue@gmail.com>

From: Tonghao Zhang <xiangxia.m.yue@gmail.com>
Date: Thu, 31 May 2018 03:14:01 -0700

> Use the % instead of while, and it may simple code and improve
> the calculating. The real_num_tx_queues has been checked when
> allocating and setting it.
> 
> Signed-off-by: Tonghao Zhang <xiangxia.m.yue@gmail.com>

The loop is there to avoid the expensive modulus operation,
not to avoid the real_num_tx_queues == 0 case.

^ permalink raw reply

* Re: pull request (net): ipsec 2018-05-31
From: David Miller @ 2018-06-01 17:26 UTC (permalink / raw)
  To: steffen.klassert; +Cc: herbert, netdev
In-Reply-To: <20180531102326.5728-1-steffen.klassert@secunet.com>

From: Steffen Klassert <steffen.klassert@secunet.com>
Date: Thu, 31 May 2018 12:23:24 +0200

> 1) Avoid possible overflow of the offset variable
>    in  _decode_session6(), this fixes an infinite
>    lookp there. From Eric Dumazet.
> 
> 2) We may use an error pointer in the error path of
>    xfrm_bundle_create(). Fix this by returning this
>    pointer directly to the caller.
> 
> Please pull or let me know if there are problems.

Pulled, thanks Steffen.

^ permalink raw reply

* Re: [PATCH V2 mlx5-next 0/2] Mellanox, mlx5 new device events
From: David Miller @ 2018-06-01 17:08 UTC (permalink / raw)
  To: leonro; +Cc: dledford, saeedm, netdev, linux-rdma, jgg
In-Reply-To: <20180601162126.GB2843@mtr-leonro.mtl.com>

From: Leon Romanovsky <leonro@mellanox.com>
Date: Fri, 1 Jun 2018 19:21:26 +0300

> Of course, it is harmless for both of you to pull, but it looks like
> extra work which is not needed for you.

Just put net-next or rdma-next in the subject line(s) and that will
make it very clear what it expected to happen.

^ permalink raw reply

* Re: [PATCH iproute2] iplink_vrf: Save device index from response for return code
From: Phil Sutter @ 2018-06-01 17:05 UTC (permalink / raw)
  To: dsahern; +Cc: stephen, netdev, David Ahern, Hangbin Liu
In-Reply-To: <20180601155016.3524-1-dsahern@kernel.org>

On Fri, Jun 01, 2018 at 08:50:16AM -0700, dsahern@kernel.org wrote:
> From: David Ahern <dsahern@gmail.com>
> 
> A recent commit changed rtnl_talk_* to return the response message in
> allocated memory so callers need to free it. The change to name_is_vrf
> did not save the device index which is pointing to a struct inside the
> now allocated and freed memory resulting in garbage getting returned
> in some cases.
> 
> Fix by using a stack variable to save the return value and only set
> it to ifi->ifi_index after all checks are done and before the answer
> buffer is freed.
> 
> Fixes: 86bf43c7c2fdc ("lib/libnetlink: update rtnl_talk to support malloc buff at run time")
> Cc: Hangbin Liu <liuhangbin@gmail.com>
> Cc: Phil Sutter <phil@nwl.cc>
> Signed-off-by: David Ahern <dsahern@gmail.com>

Acked-by: Phil Sutter <phil@nwl.cc>

Thanks, Phil

^ permalink raw reply

* [PATCH net] net: hns: Fix the process of adding broadcast addresses to tcam
From: Salil Mehta @ 2018-06-01 17:00 UTC (permalink / raw)
  To: davem
  Cc: salil.mehta, yisen.zhuang, lipeng321, mehta.salil, netdev,
	linux-kernel, linuxarm, Xi Wang

From: Xi Wang <wangxi11@huawei.com>

If the multicast mask value in device tree is configured not all
0xff, the broadcast mac will be lost from tcam table after the
execution of command 'ifconfig up'. The address is appended by
hns_ae_start, but will be clear later by hns_nic_set_rx_mode
called in dev_open process.

This patch fixed it by not use the multicast mask when add a
broadcast address.

Fixes: b5996f11ea54 ("net: add Hisilicon Network Subsystem basic ethernet support")
Signed-off-by: Xi Wang <wangxi11@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
---
 drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c | 23 +++++++++++++++++-----
 1 file changed, 18 insertions(+), 5 deletions(-)

diff --git a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c
index e0bc79e..a09a071c 100644
--- a/drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c
+++ b/drivers/net/ethernet/hisilicon/hns/hns_dsaf_main.c
@@ -1648,6 +1648,15 @@ int hns_dsaf_rm_mac_addr(
 				      mac_entry->addr);
 }
 
+static void hns_dsaf_setup_mc_mask(struct dsaf_device *dsaf_dev,
+						u8 port_num, u8 *mask, u8 *addr)
+{
+	if (MAC_IS_BROADCAST(addr))
+		memset(mask, 0xff, ETH_ALEN);
+	else
+		memcpy(mask, dsaf_dev->mac_cb[port_num]->mc_mask, ETH_ALEN);
+}
+
 static void hns_dsaf_mc_mask_bit_clear(char *dst, const char *src)
 {
 	u16 *a = (u16 *)dst;
@@ -1676,7 +1685,6 @@ int hns_dsaf_add_mac_mc_port(struct dsaf_device *dsaf_dev,
 	struct dsaf_drv_tbl_tcam_key tmp_mac_key;
 	struct dsaf_tbl_tcam_data tcam_data;
 	u8 mc_addr[ETH_ALEN];
-	u8 *mc_mask;
 	int mskid;
 
 	/*chechk mac addr */
@@ -1687,9 +1695,12 @@ int hns_dsaf_add_mac_mc_port(struct dsaf_device *dsaf_dev,
 	}
 
 	ether_addr_copy(mc_addr, mac_entry->addr);
-	mc_mask = dsaf_dev->mac_cb[mac_entry->in_port_num]->mc_mask;
 	if (!AE_IS_VER1(dsaf_dev->dsaf_ver)) {
+		u8 mc_mask[ETH_ALEN];
+
 		/* prepare for key data setting */
+		hns_dsaf_setup_mc_mask(dsaf_dev, mac_entry->in_port_num,
+			mc_mask, mac_entry->addr);
 		hns_dsaf_mc_mask_bit_clear(mc_addr, mc_mask);
 
 		/* config key mask */
@@ -1844,7 +1855,6 @@ int hns_dsaf_del_mac_mc_port(struct dsaf_device *dsaf_dev,
 	struct dsaf_drv_tbl_tcam_key mask_key, tmp_mac_key;
 	struct dsaf_tbl_tcam_data *pmask_key = NULL;
 	u8 mc_addr[ETH_ALEN];
-	u8 *mc_mask;
 
 	if (!(void *)mac_entry) {
 		dev_err(dsaf_dev->dev,
@@ -1861,14 +1871,17 @@ int hns_dsaf_del_mac_mc_port(struct dsaf_device *dsaf_dev,
 
 	/* always mask vlan_id field */
 	ether_addr_copy(mc_addr, mac_entry->addr);
-	mc_mask = dsaf_dev->mac_cb[mac_entry->in_port_num]->mc_mask;
 
 	if (!AE_IS_VER1(dsaf_dev->dsaf_ver)) {
+		u8 mc_mask[ETH_ALEN];
+
 		/* prepare for key data setting */
+		hns_dsaf_setup_mc_mask(dsaf_dev, mac_entry->in_port_num,
+			mc_mask, mac_entry->addr);
 		hns_dsaf_mc_mask_bit_clear(mc_addr, mc_mask);
 
 		/* config key mask */
-		hns_dsaf_set_mac_key(dsaf_dev, &mask_key, 0x00, 0xff, mc_addr);
+		hns_dsaf_set_mac_key(dsaf_dev, &mask_key, 0x00, 0xff, mc_mask);
 
 		mask_key.high.val = le32_to_cpu(mask_key.high.val);
 		mask_key.low.val = le32_to_cpu(mask_key.low.val);
-- 
2.7.4

^ permalink raw reply related

* Re: [PATCH 08/18] rhashtable: clean up dereference of ->future_tbl.
From: Herbert Xu @ 2018-06-01 16:54 UTC (permalink / raw)
  To: NeilBrown; +Cc: Thomas Graf, netdev, linux-kernel
In-Reply-To: <152782824957.30340.14092720576731091742.stgit@noble>

On Fri, Jun 01, 2018 at 02:44:09PM +1000, NeilBrown wrote:
> Using rht_dereference_bucket() to dereference
> ->future_tbl looks like a type error, and could be confusing.
> Using rht_dereference_rcu() to test a pointer for NULL
> adds an unnecessary barrier - rcu_access_pointer() is preferred
> for NULL tests when no lock is held.
> 
> This uses 3 different ways to access ->future_tbl.
> - if we know the mutex is held, use rht_dereference()
> - if we don't hold the mutex, and are only testing for NULL,
>   use rcu_access_pointer()
> - otherwise (using RCU protection for true dereference),
>   use rht_dereference_rcu().
> 
> Note that this includes a simplification of the call to
> rhashtable_last_table() - we don't do an extra dereference
> before the call any more.
> 
> Signed-off-by: NeilBrown <neilb@suse.com>

Acked-by: Herbert Xu <herbert@gondor.apana.org.au>
-- 
Email: Herbert Xu <herbert@gondor.apana.org.au>
Home Page: http://gondor.apana.org.au/~herbert/
PGP Key: http://gondor.apana.org.au/~herbert/pubkey.txt

^ permalink raw reply

* [PATCH net-next 06/11] net: hns3: Fix for hclge_reset running repeatly problem
From: Salil Mehta @ 2018-06-01 16:52 UTC (permalink / raw)
  To: davem
  Cc: salil.mehta, yisen.zhuang, lipeng321, mehta.salil, netdev,
	linux-kernel, linuxarm, Yunsheng Lin
In-Reply-To: <20180601165211.46372-1-salil.mehta@huawei.com>

From: Yunsheng Lin <linyunsheng@huawei.com>

When hardware sends the HCLGE_VECTOR0_EVENT_RST event through
hclge_misc_irq_handle, currently driver enables misc_vector in
the interrupt handle, and hardware generates the same interrupt
for the same reset event again and again until the reset is
complete, which causes hclge_reset running repeatly problem.

This patch fixes by enabling the misc_vector after reset is
complete.

Fixes: 4ed340ab8f49 ("net: hns3: Add reset process in hclge_main")
Signed-off-by: Yunsheng Lin <linyunsheng@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
---
 .../ethernet/hisilicon/hns3/hns3pf/hclge_main.c    | 40 ++++++++++++++++++----
 1 file changed, 34 insertions(+), 6 deletions(-)

diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
index 746987f..fb44b1e 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3pf/hclge_main.c
@@ -2587,9 +2587,11 @@ static irqreturn_t hclge_misc_irq_handle(int irq, void *data)
 		break;
 	}
 
-	/* we should clear the source of interrupt */
-	hclge_clear_event_cause(hdev, event_cause, clearval);
-	hclge_enable_vector(&hdev->misc_vector, true);
+	/* clear the source of interrupt if it is not cause by reset */
+	if (event_cause != HCLGE_VECTOR0_EVENT_RST) {
+		hclge_clear_event_cause(hdev, event_cause, clearval);
+		hclge_enable_vector(&hdev->misc_vector, true);
+	}
 
 	return IRQ_HANDLED;
 }
@@ -2777,6 +2779,33 @@ static enum hnae3_reset_type hclge_get_reset_level(struct hclge_dev *hdev,
 	return rst_level;
 }
 
+static void hclge_clear_reset_cause(struct hclge_dev *hdev)
+{
+	u32 clearval = 0;
+
+	switch (hdev->reset_type) {
+	case HNAE3_IMP_RESET:
+		clearval = BIT(HCLGE_VECTOR0_IMPRESET_INT_B);
+		break;
+	case HNAE3_GLOBAL_RESET:
+		clearval = BIT(HCLGE_VECTOR0_GLOBALRESET_INT_B);
+		break;
+	case HNAE3_CORE_RESET:
+		clearval = BIT(HCLGE_VECTOR0_CORERESET_INT_B);
+		break;
+	default:
+		dev_warn(&hdev->pdev->dev, "Unsupported reset event to clear:%d",
+			 hdev->reset_type);
+		break;
+	}
+
+	if (!clearval)
+		return;
+
+	hclge_write_dev(&hdev->hw, HCLGE_MISC_RESET_STS_REG, clearval);
+	hclge_enable_vector(&hdev->misc_vector, true);
+}
+
 static void hclge_reset(struct hclge_dev *hdev)
 {
 	/* perform reset of the stack & ae device for a client */
@@ -2789,6 +2818,8 @@ static void hclge_reset(struct hclge_dev *hdev)
 		hclge_reset_ae_dev(hdev->ae_dev);
 		hclge_notify_client(hdev, HNAE3_INIT_CLIENT);
 		rtnl_unlock();
+
+		hclge_clear_reset_cause(hdev);
 	} else {
 		/* schedule again to check pending resets later */
 		set_bit(hdev->reset_type, &hdev->reset_pending);
@@ -5661,9 +5692,6 @@ static int hclge_reset_ae_dev(struct hnae3_ae_dev *ae_dev)
 		return ret;
 	}
 
-	/* Enable MISC vector(vector0) */
-	hclge_enable_vector(&hdev->misc_vector, true);
-
 	dev_info(&pdev->dev, "Reset done, %s driver initialization finished.\n",
 		 HCLGE_DRIVER_NAME);
 
-- 
2.7.4

^ permalink raw reply related

* [PATCH net-next 03/11] net: hns3: Add repeat address checking for setting mac address
From: Salil Mehta @ 2018-06-01 16:52 UTC (permalink / raw)
  To: davem
  Cc: salil.mehta, yisen.zhuang, lipeng321, mehta.salil, netdev,
	linux-kernel, linuxarm, Jian Shen
In-Reply-To: <20180601165211.46372-1-salil.mehta@huawei.com>

From: Jian Shen <shenjian15@huawei.com>

Add checking for new mac address. It doesn't need to config
the mac vlan table if it's already in use.

Signed-off-by: Jian Shen <shenjian15@huawei.com>
Signed-off-by: Peng Li <lipeng321@huawei.com>
Signed-off-by: Salil Mehta <salil.mehta@huawei.com>
---
 drivers/net/ethernet/hisilicon/hns3/hns3_enet.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
index 0a6876a..fe54564 100644
--- a/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
+++ b/drivers/net/ethernet/hisilicon/hns3/hns3_enet.c
@@ -1132,6 +1132,12 @@ static int hns3_nic_net_set_mac_address(struct net_device *netdev, void *p)
 	if (!mac_addr || !is_valid_ether_addr((const u8 *)mac_addr->sa_data))
 		return -EADDRNOTAVAIL;
 
+	if (ether_addr_equal(netdev->dev_addr, mac_addr->sa_data)) {
+		netdev_info(netdev, "already using mac address %pM\n",
+			    mac_addr->sa_data);
+		return 0;
+	}
+
 	ret = h->ae_algo->ops->set_mac_addr(h, mac_addr->sa_data, false);
 	if (ret) {
 		netdev_err(netdev, "set_mac_address fail, ret=%d!\n", ret);
-- 
2.7.4

^ permalink raw reply related


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox