X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fsvm%2Fsvm_common.h;h=c650165b4cf810472fab7ddcd108a3c246d05ee5;hb=7866c4595b65f54f491ffc4e92b1f8cf94d6f142;hp=1f184432967be328accb1cc76cc0128274e20111;hpb=58eb866b15a45514dc356170f28640d6c9db8034;p=vpp.git diff --git a/src/svm/svm_common.h b/src/svm/svm_common.h index 1f184432967..c650165b4cf 100644 --- a/src/svm/svm_common.h +++ b/src/svm/svm_common.h @@ -83,9 +83,9 @@ typedef struct svm_map_region_args_ * Base should be "out of the way," and size should be big enough to * cover everything we plan to put here. */ -#define SVM_GLOBAL_REGION_BASEVA 0x30000000 #define SVM_GLOBAL_REGION_SIZE (64<<20) #define SVM_GLOBAL_REGION_NAME "/global_vm" +u64 svm_get_global_region_base_va (); /* * Memory shared across individual router instances. @@ -105,12 +105,16 @@ typedef struct svm_subregion_t *subregions; /* subregion pool */ uword *name_hash; u8 *root_path; + int uid; + int gid; } svm_main_region_t; void *svm_region_find_or_create (svm_map_region_args_t * a); void svm_region_init (void); -void svm_region_init_chroot (const char *root_path); +void svm_region_init_mapped_region (svm_map_region_args_t * a, + svm_region_t * rp); +int svm_region_init_chroot (const char *root_path); void svm_region_init_chroot_uid_gid (const char *root_path, int uid, int gid); void svm_region_init_args (svm_map_region_args_t * a); void svm_region_exit (void);