All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2] 9p: Remove INET dependency
@ 2023-05-03 14:11 Jason Andryuk
  2023-05-04 10:58 ` Christian Schoenebeck
  0 siblings, 1 reply; 4+ messages in thread
From: Jason Andryuk @ 2023-05-03 14:11 UTC (permalink / raw)
  To: Eric Van Hensbergen, Latchesar Ionkov, Dominique Martinet,
	Christian Schoenebeck
  Cc: Jason Andryuk, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, v9fs, linux-kernel, netdev

9pfs can run over assorted transports, so it doesn't have an INET
dependency.  Drop it and remove the includes of linux/inet.h.

NET_9P_FD/trans_fd.o builds without INET or UNIX and is unusable over
plain file descriptors.  However, tcp and unix functionality is still
built and would generate runtime failures if used.  Add imply INET and
UNIX to NET_9P_FD, so functionality is enabled by default but can still
be explicitly disabled.

This allows configuring 9pfs over Xen with INET and UNIX disabled.

Signed-off-by: Jason Andryuk <jandryuk@gmail.com>
---
v2
Add imply INET and UNIX
---
 fs/9p/Kconfig          | 2 +-
 fs/9p/vfs_addr.c       | 1 -
 fs/9p/vfs_dentry.c     | 1 -
 fs/9p/vfs_dir.c        | 1 -
 fs/9p/vfs_file.c       | 1 -
 fs/9p/vfs_inode.c      | 1 -
 fs/9p/vfs_inode_dotl.c | 1 -
 fs/9p/vfs_super.c      | 1 -
 net/9p/Kconfig         | 2 ++
 9 files changed, 3 insertions(+), 8 deletions(-)

diff --git a/fs/9p/Kconfig b/fs/9p/Kconfig
index d7bc93447c85..0c63df574ee7 100644
--- a/fs/9p/Kconfig
+++ b/fs/9p/Kconfig
@@ -1,7 +1,7 @@
 # SPDX-License-Identifier: GPL-2.0-only
 config 9P_FS
 	tristate "Plan 9 Resource Sharing Support (9P2000)"
-	depends on INET && NET_9P
+	depends on NET_9P
 	select NETFS_SUPPORT
 	help
 	  If you say Y here, you will get experimental support for
diff --git a/fs/9p/vfs_addr.c b/fs/9p/vfs_addr.c
index 6f46d7e4c750..425956eb9fde 100644
--- a/fs/9p/vfs_addr.c
+++ b/fs/9p/vfs_addr.c
@@ -12,7 +12,6 @@
 #include <linux/file.h>
 #include <linux/stat.h>
 #include <linux/string.h>
-#include <linux/inet.h>
 #include <linux/pagemap.h>
 #include <linux/sched.h>
 #include <linux/swap.h>
diff --git a/fs/9p/vfs_dentry.c b/fs/9p/vfs_dentry.c
index 65fa2df5e49b..f16f73581634 100644
--- a/fs/9p/vfs_dentry.c
+++ b/fs/9p/vfs_dentry.c
@@ -13,7 +13,6 @@
 #include <linux/pagemap.h>
 #include <linux/stat.h>
 #include <linux/string.h>
-#include <linux/inet.h>
 #include <linux/namei.h>
 #include <linux/sched.h>
 #include <linux/slab.h>
diff --git a/fs/9p/vfs_dir.c b/fs/9p/vfs_dir.c
index 3d74b04fe0de..52bf87934650 100644
--- a/fs/9p/vfs_dir.c
+++ b/fs/9p/vfs_dir.c
@@ -13,7 +13,6 @@
 #include <linux/stat.h>
 #include <linux/string.h>
 #include <linux/sched.h>
-#include <linux/inet.h>
 #include <linux/slab.h>
 #include <linux/uio.h>
 #include <linux/fscache.h>
diff --git a/fs/9p/vfs_file.c b/fs/9p/vfs_file.c
index 44c15eb2b908..367a851eaa82 100644
--- a/fs/9p/vfs_file.c
+++ b/fs/9p/vfs_file.c
@@ -14,7 +14,6 @@
 #include <linux/file.h>
 #include <linux/stat.h>
 #include <linux/string.h>
-#include <linux/inet.h>
 #include <linux/list.h>
 #include <linux/pagemap.h>
 #include <linux/utsname.h>
diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c
index 1d523bec0a94..502ac74e4959 100644
--- a/fs/9p/vfs_inode.c
+++ b/fs/9p/vfs_inode.c
@@ -15,7 +15,6 @@
 #include <linux/pagemap.h>
 #include <linux/stat.h>
 #include <linux/string.h>
-#include <linux/inet.h>
 #include <linux/namei.h>
 #include <linux/sched.h>
 #include <linux/slab.h>
diff --git a/fs/9p/vfs_inode_dotl.c b/fs/9p/vfs_inode_dotl.c
index 331ed60d8fcb..a7da49906d99 100644
--- a/fs/9p/vfs_inode_dotl.c
+++ b/fs/9p/vfs_inode_dotl.c
@@ -13,7 +13,6 @@
 #include <linux/pagemap.h>
 #include <linux/stat.h>
 #include <linux/string.h>
-#include <linux/inet.h>
 #include <linux/namei.h>
 #include <linux/sched.h>
 #include <linux/slab.h>
diff --git a/fs/9p/vfs_super.c b/fs/9p/vfs_super.c
index 266c4693e20c..10449994a972 100644
--- a/fs/9p/vfs_super.c
+++ b/fs/9p/vfs_super.c
@@ -12,7 +12,6 @@
 #include <linux/file.h>
 #include <linux/stat.h>
 #include <linux/string.h>
-#include <linux/inet.h>
 #include <linux/pagemap.h>
 #include <linux/mount.h>
 #include <linux/sched.h>
diff --git a/net/9p/Kconfig b/net/9p/Kconfig
index deabbd376cb1..00ebce9e5a65 100644
--- a/net/9p/Kconfig
+++ b/net/9p/Kconfig
@@ -17,6 +17,8 @@ if NET_9P
 
 config NET_9P_FD
 	default NET_9P
+	imply INET
+	imply UNIX
 	tristate "9P FD Transport"
 	help
 	  This builds support for transports over TCP, Unix sockets and
-- 
2.40.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] 9p: Remove INET dependency
  2023-05-03 14:11 [PATCH v2] 9p: Remove INET dependency Jason Andryuk
@ 2023-05-04 10:58 ` Christian Schoenebeck
  2023-05-04 11:55   ` Jason Andryuk
  0 siblings, 1 reply; 4+ messages in thread
From: Christian Schoenebeck @ 2023-05-04 10:58 UTC (permalink / raw)
  To: Eric Van Hensbergen, Latchesar Ionkov, Dominique Martinet,
	Jason Andryuk, David S. Miller
  Cc: Eric Dumazet, Jakub Kicinski, Paolo Abeni, v9fs, linux-kernel, netdev

On Wednesday, May 3, 2023 4:11:20 PM CEST Jason Andryuk wrote:
> 9pfs can run over assorted transports, so it doesn't have an INET
> dependency.  Drop it and remove the includes of linux/inet.h.
> 
> NET_9P_FD/trans_fd.o builds without INET or UNIX and is unusable over

s/unusable/usable/ ?

> plain file descriptors.  However, tcp and unix functionality is still
> built and would generate runtime failures if used.  Add imply INET and
> UNIX to NET_9P_FD, so functionality is enabled by default but can still
> be explicitly disabled.
> 
> This allows configuring 9pfs over Xen with INET and UNIX disabled.
> 
> Signed-off-by: Jason Andryuk <jandryuk@gmail.com>
> ---
> v2
> Add imply INET and UNIX



^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] 9p: Remove INET dependency
  2023-05-04 10:58 ` Christian Schoenebeck
@ 2023-05-04 11:55   ` Jason Andryuk
  2023-05-05 12:39     ` Simon Horman
  0 siblings, 1 reply; 4+ messages in thread
From: Jason Andryuk @ 2023-05-04 11:55 UTC (permalink / raw)
  To: Christian Schoenebeck
  Cc: Eric Van Hensbergen, Latchesar Ionkov, Dominique Martinet,
	David S. Miller, Eric Dumazet, Jakub Kicinski, Paolo Abeni, v9fs,
	linux-kernel, netdev

On Thu, May 4, 2023 at 6:58 AM Christian Schoenebeck
<linux_oss@crudebyte.com> wrote:
>
> On Wednesday, May 3, 2023 4:11:20 PM CEST Jason Andryuk wrote:
> > 9pfs can run over assorted transports, so it doesn't have an INET
> > dependency.  Drop it and remove the includes of linux/inet.h.
> >
> > NET_9P_FD/trans_fd.o builds without INET or UNIX and is unusable over
>
> s/unusable/usable/ ?

Whoops!  Yes, you are correct.  Thanks for catching that.

Regards,
Jason

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] 9p: Remove INET dependency
  2023-05-04 11:55   ` Jason Andryuk
@ 2023-05-05 12:39     ` Simon Horman
  0 siblings, 0 replies; 4+ messages in thread
From: Simon Horman @ 2023-05-05 12:39 UTC (permalink / raw)
  To: Jason Andryuk
  Cc: Christian Schoenebeck, Eric Van Hensbergen, Latchesar Ionkov,
	Dominique Martinet, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, v9fs, linux-kernel, netdev

On Thu, May 04, 2023 at 07:55:17AM -0400, Jason Andryuk wrote:
> On Thu, May 4, 2023 at 6:58 AM Christian Schoenebeck
> <linux_oss@crudebyte.com> wrote:
> >
> > On Wednesday, May 3, 2023 4:11:20 PM CEST Jason Andryuk wrote:
> > > 9pfs can run over assorted transports, so it doesn't have an INET
> > > dependency.  Drop it and remove the includes of linux/inet.h.
> > >
> > > NET_9P_FD/trans_fd.o builds without INET or UNIX and is unusable over
> >
> > s/unusable/usable/ ?
> 
> Whoops!  Yes, you are correct.  Thanks for catching that.

That notwithstanding, this looks good to me.

Reviewed-by: Simon Horman <simon.horman@corigine.com>


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-05-05 12:39 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-05-03 14:11 [PATCH v2] 9p: Remove INET dependency Jason Andryuk
2023-05-04 10:58 ` Christian Schoenebeck
2023-05-04 11:55   ` Jason Andryuk
2023-05-05 12:39     ` Simon Horman

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.