Ignore:
Timestamp:
Mar 18, 2020, 11:16:59 PM (4 years ago)
Author:
alain
Message:

Introduce remote_buf.c/.h & socket.c/.h files.
Update dev_nic.c/.h files.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/kernel/kern/rpc.h

    r641 r657  
    22 * rpc.h - RPC (Remote Procedure Call) operations definition.
    33 *
    4  * Author  Alain Greiner (2016,2017,2018)
     4 * Author  Alain Greiner (2016,2017,2018,2019,2020)
    55 *
    66 * Copyright (c) UPMC Sorbonne Universites
     
    6868    RPC_THREAD_USER_CREATE        = 6,
    6969    RPC_THREAD_KERNEL_CREATE      = 7,
    70     RPC_VFS_FS_UPDATE_DENTRY      = 8,
     70    RPC_UNDEFINED_8               = 8,
    7171    RPC_PROCESS_SIGACTION         = 9,
    7272
    73     RPC_VFS_INODE_CREATE          = 10,
    74     RPC_VFS_INODE_DESTROY         = 11,
    75     RPC_VFS_DENTRY_CREATE         = 12,
    76     RPC_VFS_DENTRY_DESTROY        = 13,
    77     RPC_VFS_FILE_CREATE           = 14,
    78     RPC_VFS_FILE_DESTROY          = 15,
    79     RPC_VFS_FS_NEW_DENTRY         = 16,
    80     RPC_VFS_FS_ADD_DENTRY         = 17,
    81     RPC_VFS_FS_REMOVE_DENTRY      = 18,
    82     RPC_VFS_INODE_LOAD_ALL_PAGES  = 19,
    83 
    84     RPC_UNDEFINED_20              = 20,   //
    85     RPC_UNDEFINED_21              = 21,   //
    86     RPC_UNDEFINED_22              = 22,   //
    87     RPC_UNDEFINED_23              = 23,   //
    88     RPC_MAPPER_SYNC               = 24,
    89     RPC_VMM_RESIZE_VSEG           = 25,
    90     RPC_VMM_REMOVE_VSEG           = 26,
    91     RPC_VMM_CREATE_VSEG           = 27,
    92     RPC_VMM_SET_COW               = 28,
    93     RPC_UNDEFINED_29              = 29,   //
    94 
    95     RPC_MAX_INDEX                 = 30,
     73    RPC_UNDEFINED_10              = 10,   //
     74    RPC_UNDEFINED_11              = 11,   //
     75    RPC_UNDEFINED_12              = 12,   //
     76    RPC_UNDEFINED_13              = 13,   //
     77    RPC_UNDEFINED_14              = 14,   //
     78    RPC_VMM_RESIZE_VSEG           = 15,
     79    RPC_VMM_REMOVE_VSEG           = 16,
     80    RPC_VMM_CREATE_VSEG           = 17,
     81    RPC_VMM_SET_COW               = 18,
     82    RPC_UNDEFINED_19              = 19,   //
     83
     84    RPC_MAX_INDEX                 = 20,
    9685}
    9786rpc_index_t;
     
    288277
    289278/***********************************************************************************
    290  * [8] The RPC_VFS_FS_UPDATE_DENTRY allows a client thread to request a remote
    291  * cluster to update the <size> field of a directory entry in the mapper of a
    292  * remote directory inode, identified by the <inode> local pointer.
    293  * The target entry name is identified by the <dentry> local pointer.
    294  ***********************************************************************************
    295  * @ cxy     : server cluster identifier.
    296  * @ inode   : [in] local pointer on remote directory inode.
    297  * @ dentry  : [in] local pointer on remote dentry.
    298  * @ size    : [in] new size value.
    299  * @ error   : [out] error status (0 if success).
    300  **********************************************************************************/
    301 void rpc_vfs_fs_update_dentry_client( cxy_t                 cxy,
    302                                       struct vfs_inode_s  * inode,
    303                                       struct vfs_dentry_s * dentry,
    304                                       uint32_t              size,
    305                                       error_t             * error );
    306 
    307 void rpc_vfs_fs_update_dentry_server( xptr_t xp );
     279 * [8] undefined
     280 **********************************************************************************/
    308281
    309282/***********************************************************************************
    310283 * [9] The RPC_PROCESS_SIGACTION allows a client thread to request a remote cluster
    311284 * to execute a given sigaction, defined by the <action_type> for a given process,
    312  * identified by the <pid> argument.
     285 * identified by the <pid> argument.  When this RPC is used in parallel mode,
     286 * the rpc_process_sigaction_client() function is not used.
    313287 ***********************************************************************************
    314288 * @ cxy     : server cluster identifier.
     
    323297
    324298/***********************************************************************************
    325  * [10] The RPC_VFS_INODE_CREATE creates an inode and the associated mapper in a
    326  * remote cluster. The parent dentry must have been previously created.
    327  * It returns an extended pointer on the created inode.
    328  ***********************************************************************************
    329  * @ cxy        :  server cluster identifier.
    330  * @ fs_type    : [in]  file system type.
    331  * @ inode_type : [in]  file system type.
    332  * @ attr       : [in]  inode attributes.
    333  * @ rights     : [in]  access rights
    334  * @ uid        : [in]  user ID
    335  * @ gid        : [in]  group ID
    336  * @ inode_xp   : [out] buffer for extended pointer on created inode.
    337  * @ error      : [out] error status (0 if success).
    338  **********************************************************************************/
    339 void rpc_vfs_inode_create_client( cxy_t      cxy,
    340                                   uint32_t   fs_type,
    341                                   uint32_t   attr,   
    342                                   uint32_t   rights, 
    343                                   uint32_t   uid,
    344                                   uint32_t   gid,
    345                                   xptr_t   * inode_xp,
    346                                   error_t  * error );
    347 
    348 void rpc_vfs_inode_create_server( xptr_t xp );
     299 * [10] undefined
     300 **********************************************************************************/
    349301
    350302/***********************************************************************************
    351  * [11] The RPC_VFS_INODE_DESTROY releases memory allocated for an inode descriptor
    352  * and for the associated mapper in a remote cluster.
    353  ***********************************************************************************
    354  * @ cxy       :  server cluster identifier
    355  * @ inode     : [in]  local pointer on inode.
    356  **********************************************************************************/
    357 void rpc_vfs_inode_destroy_client( cxy_t                cxy,
    358                                    struct vfs_inode_s * inode );
    359 
    360 void rpc_vfs_inode_destroy_server( xptr_t xp );
     303 * [11] undefined
     304 **********************************************************************************/
    361305
    362306/***********************************************************************************
    363  * [12] The RPC_VFS_DENTRY_CREATE creates a dentry in a remote cluster.
    364  * It returns an extended pointer on the created dentry.
    365  ***********************************************************************************
    366  * @ cxy        :  server cluster identifier
    367  * @ type       : [in]  file system type.
    368  * @ name       : [in]  directory entry name.
    369  * @ dentry_xp  : [out] buffer for extended pointer on created dentry.
    370  * @ error      : [out] error status (0 if success).
    371  **********************************************************************************/
    372 void rpc_vfs_dentry_create_client( cxy_t                  cxy,
    373                                    uint32_t               type,
    374                                    char                 * name,   
    375                                    xptr_t               * dentry_xp,
    376                                    error_t              * error );
    377 
    378 void rpc_vfs_dentry_create_server( xptr_t xp );
     307 * [12] undefined                                                       
     308 **********************************************************************************/
    379309
    380310/***********************************************************************************
    381  * [13] The RPC_VFS_DENTRY_DESTROY remove a denfry from the parent inode XHTAB,
    382  * and releases memory allocated for the dentry descriptor in a remote cluster.
    383  ***********************************************************************************
    384  * @ cxy       :  server cluster identifier
    385  * @ dentry     : [in]  local pointer on dentry.
    386  **********************************************************************************/
    387 void rpc_vfs_dentry_destroy_client( cxy_t                 cxy,
    388                                     struct vfs_dentry_s * dentry );
    389 
    390 void rpc_vfs_dentry_destroy_server( xptr_t xp );
    391 
    392 /***********************************************************************************
    393  * [14] The RPC_VFS_FILE_CREATE creates a file descriptor in a remote cluster.
    394  * It returns an extended pointer on the created file structure.
    395  ***********************************************************************************
    396  * @ cxy        :  server cluster identifier
    397  * @ inode      : [in]  local pointer on parent inode.
    398  * @ file_attr  : [in]  new file attributes.
    399  * @ file_xp    : [out] buffer for extended pointer on created file.
    400  * @ error      : [out] error status (0 if success).
    401  **********************************************************************************/
    402 void rpc_vfs_file_create_client( cxy_t                  cxy,
    403                                  struct vfs_inode_s   * inode,
    404                                  uint32_t               file_attr,
    405                                  xptr_t               * file_xp,
    406                                  error_t              * error );
    407 
    408 void rpc_vfs_file_create_server( xptr_t xp );
    409 
    410 /***********************************************************************************
    411  * [15] The RPC_VFS_FILE_DESTROY releases memory allocated for a file descriptor
    412  * in a remote cluster.
    413  ***********************************************************************************
    414  * @ cxy       :  server cluster identifier
    415  * @ file       : [in]  local pointer on file.
    416  **********************************************************************************/
    417 void rpc_vfs_file_destroy_client( cxy_t               cxy,
    418                                   struct vfs_file_s * file );
    419 
    420 void rpc_vfs_file_destroy_server( xptr_t xp );
    421 
    422 /***********************************************************************************
    423  * [16] The RPC_VFS_FS_GET_DENTRY calls the vfs_fs_new_dentry()
    424  * function in a remote cluster containing a parent inode directory to scan the
    425  * associated mapper, find a directory entry identified by its name, and update
    426  * both the - existing - child inode and dentry.
    427  ***********************************************************************************
    428  * @ cxy            : server cluster identifier
    429  * @ parent_inode   : [in]  local pointer on parent inode.
    430  * @ name           : [in]  local pointer on child name (in client cluster).
    431  * @ child_inode_xp : [in]  extended pointer on child inode (in another cluster).
    432  * @ error          : [out] error status (0 if success).
    433  **********************************************************************************/
    434 void rpc_vfs_fs_new_dentry_client( cxy_t                cxy,
    435                                    struct vfs_inode_s * parent_inode,
    436                                    char               * name,
    437                                    xptr_t               child_inode_xp,
    438                                    error_t            * error );
    439 
    440 void rpc_vfs_fs_new_dentry_server( xptr_t xp );
    441 
    442 /***********************************************************************************
    443  * [17] The RPC_VFS_FS_ADD_DENTRY calls the vfs_fs_add_dentry() function in a
    444  * remote cluster containing a directory inode and mapper, to add a new dentry
    445  * in the mapper of this directory.
    446  ***********************************************************************************
    447  * @ cxy            : server cluster identifier
    448  * @ parent         : [in]  local pointer on directory inode.
    449  * @ dentry         : [in]  local pointer on dentry.
    450  * @ error          : [out] error status (0 if success).
    451  **********************************************************************************/
    452 void rpc_vfs_fs_add_dentry_client( cxy_t,
    453                                    struct vfs_inode_s  * parent,
    454                                    struct vfs_dentry_s * dentry,
    455                                    error_t             * error );
    456 
    457 void rpc_vfs_fs_add_dentry_server( xptr_t xp );
    458 
    459 /***********************************************************************************
    460  * [18] The RPC_VFS_FS_REMOVE_DENTRY calls the vfs_fs_remove_dentry() function in a
    461  * remote cluster containing a directory inode and mapper, to remove a dentry from
    462  * the mapper of this directory.
    463  ***********************************************************************************
    464  * @ cxy            : server cluster identifier
    465  * @ parent         : [in]  local pointer on directory inode.
    466  * @ dentry         : [in]  local pointer on dentry.
    467  * @ error          : [out] error status (0 if success).
    468  **********************************************************************************/
    469 void rpc_vfs_fs_remove_dentry_client( cxy_t,
    470                                       struct vfs_inode_s  * parent,
    471                                       struct vfs_dentry_s * dentry,
    472                                       error_t             * error );
    473 
    474 void rpc_vfs_fs_remove_dentry_server( xptr_t xp );
    475 
    476 /***********************************************************************************
    477  * [19] The RPC_VFS_INODE_LOAD_ALL_PAGES calls the vfs_inode_load_all_pages()
    478  * function a remote cluster containing an inode to load all pages in the
    479  * associated mapper. 
    480  ***********************************************************************************
    481  * @ cxy     : server cluster identifier
    482  * @ inode   : [in]  local pointer on inode in server cluster.
    483  * @ error   : [out] error status (0 if success).
    484  **********************************************************************************/
    485 void rpc_vfs_inode_load_all_pages_client( cxy_t                cxy,
    486                                           struct vfs_inode_s * inode,
    487                                           error_t            * error );
    488 
    489 void rpc_vfs_inode_load_all_pages_server( xptr_t xp );
    490 
    491 /***********************************************************************************
    492  * [20] undefined
    493  **********************************************************************************/
    494 
    495 /***********************************************************************************
    496  * [21] undefined
    497  **********************************************************************************/
    498 
    499 /***********************************************************************************
    500  * [22] undefined
    501  **********************************************************************************/
    502 
    503 /***********************************************************************************
    504  * [23] undefined
    505  **********************************************************************************/
    506 
    507 /***********************************************************************************
    508  * [24] The RPC_MAPPER_SYNC allows a client thread to synchronize on disk
    509  * all dirty pages of a remote mapper.
    510  ***********************************************************************************
    511  * @ cxy       : server cluster identifier.
    512  * @ mapper    : [in] local pointer on mapper in server cluster.
    513  * @ error       : [out] error status (0 if success).
    514  **********************************************************************************/
    515 void rpc_mapper_sync_client( cxy_t             cxy,
    516                              struct mapper_s * mapper,
    517                              error_t         * error );
    518 
    519 void rpc_mapper_sync_server( xptr_t xp );
    520 
    521 /***********************************************************************************
    522  * [25] The RPC_VMM_RESIZE_VSEG allows a client thread to request a remote cluster
     311 * [13] undefined                                       
     312 **********************************************************************************/
     313
     314/***********************************************************************************
     315 * [14] undefined
     316 **********************************************************************************/
     317
     318/***********************************************************************************
     319 * [15] The RPC_VMM_RESIZE_VSEG allows a client thread to request a remote cluster
    523320 * to resize a vseg identified by the <base> argument in a process descriptor
    524321 * identified by the <pid> argument, as defined by the <new_base> and <new_size>
     
    540337
    541338/***********************************************************************************
    542  * [26] The RPC_VMM_REMOVE_VSEG allows a client thread  to request a remote cluster
     339 * [16] The RPC_VMM_REMOVE_VSEG allows a client thread  to request a remote cluster
    543340 * to delete a vseg identified by the <vaddr> argument in a process descriptor
    544341 * identified by the <pid> argument.
     
    556353
    557354/***********************************************************************************
    558  * [27] The RPC_VMM_CREATE_VSEG allows a client thread to request the remote
     355 * [17] The RPC_VMM_CREATE_VSEG allows a client thread to request the remote
    559356 * reference cluster of a given process to allocate and register in the reference
    560357 * process VMM a new vseg descriptor.
     
    587384
    588385/***********************************************************************************
    589  * [28] The RPC_VMM_SET_COW allows a client thread to request the remote reference
     386 * [18] The RPC_VMM_SET_COW allows a client thread to request the remote reference
    590387 * cluster to set the COW flag and reset the WRITABLE flag of all GPT entries for
    591388 * the DATA, MMAP and REMOTE vsegs of process identified by the <process> argument.
     
    602399
    603400/***********************************************************************************
    604  * [29] undefined
     401 * [19] undefined
    605402 **********************************************************************************/
    606403
Note: See TracChangeset for help on using the changeset viewer.