From 6714657050881a32d929a6a39da2f02a66433e39 Mon Sep 17 00:00:00 2001 From: Christian Ehrhardt Date: Thu, 8 Dec 2016 16:36:38 +0100 Subject: refresh d/p/fix-vhost-user-socket-permission.patch Some of the code was moved in a reorg and now is in lib/librte_vhost/socket.c. That was part of the vhost client/server move. Change-Id: I04d39ae793ba87744b3fdc7fd6a187e7a3f21105 Signed-off-by: Christian Ehrhardt --- .../patches/fix-vhost-user-socket-permission.patch | 50 ++++++++-------------- 1 file changed, 17 insertions(+), 33 deletions(-) (limited to 'debian/patches') diff --git a/debian/patches/fix-vhost-user-socket-permission.patch b/debian/patches/fix-vhost-user-socket-permission.patch index e75cbc25..1978ac2d 100644 --- a/debian/patches/fix-vhost-user-socket-permission.patch +++ b/debian/patches/fix-vhost-user-socket-permission.patch @@ -29,11 +29,9 @@ Forwarded: yes Author: Christian Ehrhardt Last-Update: 2016-09-28 -diff --git a/doc/guides/testpmd_app_ug/run_app.rst b/doc/guides/testpmd_app_ug/run_app.rst -index 7712bd2..28776b9 100644 --- a/doc/guides/testpmd_app_ug/run_app.rst +++ b/doc/guides/testpmd_app_ug/run_app.rst -@@ -156,6 +156,25 @@ See the DPDK Getting Started Guides for more information on these options. +@@ -156,6 +156,25 @@ Use malloc instead of hugetlbfs. @@ -59,11 +57,9 @@ index 7712bd2..28776b9 100644 Testpmd Command-line Options ---------------------------- -diff --git a/lib/librte_eal/common/eal_common_options.c b/lib/librte_eal/common/eal_common_options.c -index 481c732..2126140 100644 --- a/lib/librte_eal/common/eal_common_options.c +++ b/lib/librte_eal/common/eal_common_options.c -@@ -95,6 +95,8 @@ eal_long_options[] = { +@@ -95,6 +95,8 @@ {OPT_VFIO_INTR, 1, NULL, OPT_VFIO_INTR_NUM }, {OPT_VMWARE_TSC_MAP, 0, NULL, OPT_VMWARE_TSC_MAP_NUM }, {OPT_XEN_DOM0, 0, NULL, OPT_XEN_DOM0_NUM }, @@ -72,7 +68,7 @@ index 481c732..2126140 100644 {0, 0, NULL, 0 } }; -@@ -166,6 +168,8 @@ eal_reset_internal_config(struct internal_config *internal_cfg) +@@ -166,6 +168,8 @@ #endif internal_cfg->vmware_tsc_map = 0; internal_cfg->create_uio_dev = 0; @@ -81,11 +77,9 @@ index 481c732..2126140 100644 } static int -diff --git a/lib/librte_eal/common/eal_internal_cfg.h b/lib/librte_eal/common/eal_internal_cfg.h -index 5f1367e..bdf34e3 100644 --- a/lib/librte_eal/common/eal_internal_cfg.h +++ b/lib/librte_eal/common/eal_internal_cfg.h -@@ -83,6 +83,8 @@ struct internal_config { +@@ -83,6 +83,8 @@ volatile enum rte_intr_mode vfio_intr_mode; const char *hugefile_prefix; /**< the base filename of hugetlbfs files */ const char *hugepage_dir; /**< specific hugetlbfs directory to use */ @@ -94,11 +88,9 @@ index 5f1367e..bdf34e3 100644 unsigned num_hugepage_sizes; /**< how many sizes on this system */ struct hugepage_info hugepage_info[MAX_HUGEPAGE_SIZES]; -diff --git a/lib/librte_eal/common/eal_options.h b/lib/librte_eal/common/eal_options.h -index a881c62..1161083 100644 --- a/lib/librte_eal/common/eal_options.h +++ b/lib/librte_eal/common/eal_options.h -@@ -83,6 +83,10 @@ enum { +@@ -83,6 +83,10 @@ OPT_VMWARE_TSC_MAP_NUM, #define OPT_XEN_DOM0 "xen-dom0" OPT_XEN_DOM0_NUM, @@ -109,13 +101,11 @@ index a881c62..1161083 100644 OPT_LONG_MAX_NUM }; -diff --git a/lib/librte_eal/common/include/rte_eal.h b/lib/librte_eal/common/include/rte_eal.h -index a71d6f5..506cf24 100644 --- a/lib/librte_eal/common/include/rte_eal.h +++ b/lib/librte_eal/common/include/rte_eal.h -@@ -252,6 +252,11 @@ static inline int rte_gettid(void) - return RTE_PER_LCORE(_thread_id); - } +@@ -256,6 +256,11 @@ + #define RTE_INIT(func) \ + static void __attribute__((constructor, used)) func(void) +/** + * Set owner/permissions on sockets if requested on EAL commandline @@ -125,8 +115,6 @@ index a71d6f5..506cf24 100644 #ifdef __cplusplus } #endif -diff --git a/lib/librte_eal/linuxapp/eal/eal.c b/lib/librte_eal/linuxapp/eal/eal.c -index 3fb2188..dc84c5b 100644 --- a/lib/librte_eal/linuxapp/eal/eal.c +++ b/lib/librte_eal/linuxapp/eal/eal.c @@ -53,6 +53,9 @@ @@ -139,7 +127,7 @@ index 3fb2188..dc84c5b 100644 #include #include -@@ -344,6 +347,8 @@ eal_usage(const char *prgname) +@@ -354,6 +357,8 @@ " --"OPT_CREATE_UIO_DEV" Create /dev/uioX (usually done by hotplug)\n" " --"OPT_VFIO_INTR" Interrupt mode for VFIO (legacy|msi|msix)\n" " --"OPT_XEN_DOM0" Support running on Xen dom0 without hugetlbfs\n" @@ -148,7 +136,7 @@ index 3fb2188..dc84c5b 100644 "\n"); /* Allow the application to print its usage message too if hook is set */ if ( rte_application_usage_hook ) { -@@ -601,6 +606,14 @@ eal_parse_args(int argc, char **argv) +@@ -611,6 +616,14 @@ internal_config.create_uio_dev = 1; break; @@ -163,7 +151,7 @@ index 3fb2188..dc84c5b 100644 default: if (opt < OPT_LONG_MIN_NUM && isprint(opt)) { RTE_LOG(ERR, EAL, "Option %c is not supported " -@@ -943,3 +956,172 @@ rte_eal_check_module(const char *module_name) +@@ -943,3 +956,172 @@ /* Module has been found */ return 1; } @@ -336,11 +324,9 @@ index 3fb2188..dc84c5b 100644 + vhost_set_ownership(path); + } +} -diff --git a/lib/librte_eal/linuxapp/eal/rte_eal_version.map b/lib/librte_eal/linuxapp/eal/rte_eal_version.map -index db8c984..bb92e57 100644 --- a/lib/librte_eal/linuxapp/eal/rte_eal_version.map +++ b/lib/librte_eal/linuxapp/eal/rte_eal_version.map -@@ -139,6 +139,7 @@ DPDK_2.2 { +@@ -139,6 +139,7 @@ rte_keepalive_register_core; rte_xen_dom0_supported; rte_xen_mem_phy2mch; @@ -348,11 +334,9 @@ index db8c984..bb92e57 100644 } DPDK_2.1; -diff --git a/lib/librte_vhost/vhost_user/vhost-net-user.c b/lib/librte_vhost/vhost_user/vhost-net-user.c -index b35594d..dbdb8ad 100644 ---- a/lib/librte_vhost/vhost_user/vhost-net-user.c -+++ b/lib/librte_vhost/vhost_user/vhost-net-user.c -@@ -79,6 +79,8 @@ struct vhost_user { +--- a/lib/librte_vhost/socket.c ++++ b/lib/librte_vhost/socket.c +@@ -78,6 +78,8 @@ pthread_mutex_t mutex; }; @@ -361,11 +345,11 @@ index b35594d..dbdb8ad 100644 #define MAX_VIRTIO_BACKLOG 128 static void vhost_user_server_new_connection(int fd, void *data, int *remove); -@@ -699,6 +701,7 @@ +@@ -519,6 +521,7 @@ vsocket->is_server = true; ret = vhost_user_create_server(vsocket); } -+ rte_eal_set_socket_permissions(path); ++ rte_eal_set_socket_permissions(path); if (ret < 0) { free(vsocket->path); free(vsocket); -- cgit 1.2.3-korg