vppinfra session: file platform independent private data 82/29082/2
authorFlorin Coras <fcoras@cisco.com>
Thu, 24 Sep 2020 18:58:28 +0000 (11:58 -0700)
committerDave Barach <openvpp@barachs.net>
Fri, 25 Sep 2020 14:46:38 +0000 (14:46 +0000)
Type: improvement

Signed-off-by: Florin Coras <fcoras@cisco.com>
Change-Id: Id43b0b6db2b42ee5801236df0bd7f7225e1e081c

src/vnet/session/application_namespace.h
src/vnet/session/session_api.c
src/vppinfra/file.h

index 14bea61..ddc6d08 100644 (file)
@@ -102,15 +102,15 @@ typedef struct app_ns_api_handle_
       /** socket index for files and clib file index for sockets */
       u32 u_index;
     };
-    uword as_uword;
+    u64 as_u64;
   };
 #define aah_app_ns_index l_index
 #define aah_app_wrk_index l_index
 #define aah_sock_index u_index
 #define aah_file_index u_index
-} __attribute__ ((aligned (sizeof (uword)))) app_ns_api_handle_t;
+} __attribute__ ((aligned (sizeof (u64)))) app_ns_api_handle_t;
 
-STATIC_ASSERT (sizeof (app_ns_api_handle_t) == sizeof (uword), "not uword");
+STATIC_ASSERT (sizeof (app_ns_api_handle_t) == sizeof (u64), "not u64");
 
 static inline clib_socket_t *
 appns_sapi_alloc_socket (app_namespace_t * app_ns)
index e7f95d2..12aea49 100644 (file)
@@ -1638,14 +1638,14 @@ sapi_sock_accept_ready (clib_file_t * scf)
   cf.file_descriptor = ccs->fd;
   /* File points to app namespace and socket */
   handle.aah_sock_index = appns_sapi_socket_index (app_ns, ccs);
-  cf.private_data = handle.as_uword;
+  cf.private_data = handle.as_u64;
   cf.description = format (0, "app sock conn fd: %d", ccs->fd);
 
   /* Poll until we get an attach message. Socket points to file and
    * application that owns the socket */
   handle.aah_app_wrk_index = APP_INVALID_INDEX;
   handle.aah_file_index = clib_file_add (&file_main, &cf);
-  ccs->private_data = handle.as_uword;
+  ccs->private_data = handle.as_u64;
 
   return err;
 
index 48412dd..09dd2fd 100644 (file)
@@ -61,7 +61,7 @@ typedef struct clib_file
   u32 polling_thread_index;
 
   /* Data available for function's use. */
-  uword private_data;
+  u64 private_data;
 
   /* Functions to be called when read/write data becomes ready. */
   clib_file_function_t *read_function, *write_function, *error_function;