aboutsummaryrefslogtreecommitdiffstats
path: root/src/vlibmemory
AgeCommit message (Expand)AuthorFilesLines
2019-11-18api: configurable binary api client rx pthread fcnDave Barach2-19/+39
2019-11-07api: fix dead client scan heap issueNathan Skrzypczak1-0/+4
2019-10-25dhcp: fix crash on unicast renewal sendNeale Ranns1-0/+1
2019-10-09api: comment, simplify and fix api socket readVratko Polak1-48/+80
2019-10-08api: add bapi thread handle to api main structure.IJsbrand Wijnands1-1/+9
2019-10-02vlib: improve summary vector-rate statisticsDave Barach1-1/+1
2019-09-30api: fix use-after-freeBenoƮt Ganne1-3/+3
2019-09-16api: autogenerate api trace print/endianOle Troan1-1/+2
2019-09-04api: memclnt api use string type.Ole Troan1-6/+6
2019-08-27api: revert use string type for strings in memclnt.apiOle Troan6-35/+28
2019-08-27api: use string type for strings in memclnt.apiOle Troan6-28/+35
2019-08-20vppapigen: remove support for legacy typedefsPaul Vinciguerra1-1/+1
2019-08-08api: vppapitrace JSON/API trace converterOle Troan3-56/+38
2019-08-08api: api socket respect unix runtime directoryOle Troan2-20/+12
2019-08-02vppinfra: Expose function setting __os_thread_indexNathan Skrzypczak1-20/+1
2019-07-24api: Disable tracing of memclnt_keepalive messagesDave Barach1-6/+11
2019-07-16api: enable binary API event logging in vatDave Barach1-1/+22
2019-07-03api: remove garbage from sockclnt_create replyVratko Polak3-2/+25
2019-06-14api: add mp-safe/barrier-sync indication to elogsDave Barach1-0/+1
2019-06-12infra: fix minor memory leak in "api trace..."Dave Barach1-5/+8
2019-05-16init / exit function orderingDave Barach3-10/+7
2019-05-09bapi: separate init shm reply from fd exchangeFlorin Coras1-1/+17
2019-04-23API: Python and Unix domain socket improvementOle Troan2-4/+2
2019-04-16API: Handle pthread cond signal case where signal is missed.Ole Troan1-2/+2
2019-04-10API: Fix shared memory only action handlers.Ole Troan2-1/+1
2019-04-05make the output of "show api dump file <filename> compare-current" doxygen-fr...Andrew Yourtchenko1-5/+9
2019-04-05vlib: fix "foo_msg" and "foo_msg_reply" in API message table triggering the "...Andrew Yourtchenko1-2/+2
2019-03-21api trace: cli bug fixezkexma1-2/+2
2019-03-07vlibmemory: coverity woesSteven Luong1-1/+1
2019-02-26VPP-1574: minimize RPC barrier sync callsDave Barach1-3/+20
2019-02-21API: client does not set root permissions on shm segmentNeale Ranns1-4/+2
2019-02-05sock api: allow to start client with no rx_threadTomasz Kulasek4-4/+33
2019-01-23Initialize gc_mark_timestamp to zero to avoid garbage values.Brian Nesbitt1-0/+1
2019-01-05socket API: Use pool index instead of handle in sock_delete handlerOle Troan1-1/+1
2019-01-02Fixes for buliding for 32bit targets:David Johnson1-4/+4
2018-12-31binary api clients: wait for vpp to startDave Barach1-0/+29
2018-12-22bapi/vat: fix socket transport for vatFlorin Coras1-2/+9
2018-12-05bapi: add options to have vpp cleanup client registrationFlorin Coras4-20/+28
2018-12-03vcl: handle worker process exitFlorin Coras2-7/+15
2018-12-01Delete shared memory segment files when vpp startsDave Barach1-0/+22
2018-11-18Complain if a client binary API queue is fullDave Barach1-0/+8
2018-11-14Remove c-11 memcpy checks from perf-critical codeDave Barach3-5/+5
2018-11-13vlib rename vlib_frame_args(...) to vlib_frame_scalar_args(..)Damjan Marion1-2/+2
2018-11-01Move RPC calls off the binary API input queueDave Barach3-29/+50
2018-10-25Revert "Keep RPC traffic off the shared-memory API queue"Florin Coras3-38/+29
2018-10-24Keep RPC traffic off the shared-memory API queueDave Barach3-29/+38
2018-10-23c11 safe string handling supportDave Barach7-30/+30
2018-10-03sock api: fix registrations and client readsFlorin Coras5-28/+69
2018-10-02PAPI: Use UNIX domain sockets instead of shared memoryOle Troan5-39/+94
2018-09-19socket api: do not delay sending of messagesFlorin Coras2-64/+35
span> n_left, uword most_likely_size); /* *INDENT-OFF* */ typedef CLIB_PACKED (struct { u64 a; u32 b; u16 c; }) eh_copy_t; /* *INDENT-ON* */ always_inline void _vnet_rewrite_one_header (vnet_rewrite_header_t * h0, void *packet0, int max_size, int most_likely_size) { vnet_rewrite_data_t *p0 = packet0; vnet_rewrite_data_t *rw0 = (vnet_rewrite_data_t *) (h0->data + max_size); word n_left0; /* 0xfefe => poisoned adjacency => crash */ ASSERT (h0->data_bytes != 0xfefe); if (PREDICT_TRUE (h0->data_bytes == sizeof (eh_copy_t))) { eh_copy_t *s, *d; s = (eh_copy_t *) (h0->data + max_size - sizeof (eh_copy_t)); d = (eh_copy_t *) (((u8 *) packet0) - sizeof (eh_copy_t)); clib_memcpy (d, s, sizeof (eh_copy_t)); return; } #define _(i) \ do { \ if (most_likely_size > ((i)-1)*sizeof (vnet_rewrite_data_t)) \ vnet_rewrite_copy_one (p0, rw0, (i)); \ } while (0) _(4); _(3); _(2); _(1); #undef _ n_left0 = (int) (((int) h0->data_bytes - most_likely_size) + (sizeof (rw0[0]) - 1)) / (int) sizeof (rw0[0]); if (PREDICT_FALSE (n_left0 > 0)) vnet_rewrite_copy_slow_path (p0, rw0, n_left0, most_likely_size); } always_inline void _vnet_rewrite_two_headers (vnet_rewrite_header_t * h0, vnet_rewrite_header_t * h1, void *packet0, void *packet1, int max_size, int most_likely_size) { vnet_rewrite_data_t *p0 = packet0; vnet_rewrite_data_t *p1 = packet1; vnet_rewrite_data_t *rw0 = (vnet_rewrite_data_t *) (h0->data + max_size); vnet_rewrite_data_t *rw1 = (vnet_rewrite_data_t *) (h1->data + max_size); word n_left0, n_left1; int slow_path; /* 0xfefe => poisoned adjacency => crash */ ASSERT (h0->data_bytes != 0xfefe); ASSERT (h1->data_bytes != 0xfefe); /* Arithmetic calculation: bytes0 == bytes1 == 14 */ slow_path = h0->data_bytes ^ h1->data_bytes; slow_path += h0->data_bytes ^ sizeof (eh_copy_t); if (PREDICT_TRUE (slow_path == 0)) { eh_copy_t *s0, *d0, *s1, *d1; s0 = (eh_copy_t *) (h0->data + max_size - sizeof (eh_copy_t)); d0 = (eh_copy_t *) (((u8 *) packet0) - sizeof (eh_copy_t)); clib_memcpy (d0, s0, sizeof (eh_copy_t)); s1 = (eh_copy_t *) (h1->data + max_size - sizeof (eh_copy_t)); d1 = (eh_copy_t *) (((u8 *) packet1) - sizeof (eh_copy_t)); clib_memcpy (d1, s1, sizeof (eh_copy_t)); return; } #define _(i) \ do { \ if (most_likely_size > ((i)-1)*sizeof (vnet_rewrite_data_t)) \ { \ vnet_rewrite_copy_one (p0, rw0, (i)); \ vnet_rewrite_copy_one (p1, rw1, (i)); \ } \ } while (0) _(4); _(3); _(2); _(1); #undef _ n_left0 = (int) (((int) h0->data_bytes - most_likely_size) + (sizeof (rw0[0]) - 1)) / (int) sizeof (rw0[0]); n_left1 = (int) (((int) h1->data_bytes - most_likely_size) + (sizeof (rw1[0]) - 1)) / (int) sizeof (rw1[0]); if (PREDICT_FALSE (n_left0 > 0 || n_left1 > 0)) { vnet_rewrite_copy_slow_path (p0, rw0, n_left0, most_likely_size); vnet_rewrite_copy_slow_path (p1, rw1, n_left1, most_likely_size); } } #define vnet_rewrite_one_header(rw0,p0,most_likely_size) \ _vnet_rewrite_one_header (&((rw0).rewrite_header), (p0), \ sizeof ((rw0).rewrite_data), \ (most_likely_size)) #define vnet_rewrite_two_headers(rw0,rw1,p0,p1,most_likely_size) \ _vnet_rewrite_two_headers (&((rw0).rewrite_header), &((rw1).rewrite_header), \ (p0), (p1), \ sizeof ((rw0).rewrite_data), \ (most_likely_size)) always_inline void _vnet_fixup_one_header (vnet_rewrite_header_t * h0, u8 * addr, u32 addr_len, u8 * packet0, int clear_first_bit) { /* location to write to in the packet */ u8 *p0 = packet0 - h0->dst_mcast_offset; u8 *p1 = p0; /* location to write from in the L3 dest address */ u8 *a0 = addr + addr_len - h0->dst_mcast_n_bytes; clib_memcpy (p0, a0, h0->dst_mcast_n_bytes); if (clear_first_bit) *p1 &= 0x7f; } #define vnet_fixup_one_header(rw0,addr,p0,clear_first_bit) \ _vnet_fixup_one_header (&((rw0).rewrite_header), \ (u8*)(addr), sizeof((*addr)), \ (u8*)(p0), (clear_first_bit)) #define VNET_REWRITE_FOR_SW_INTERFACE_ADDRESS_BROADCAST ((void *) 0) /** Deprecated */ void vnet_rewrite_for_sw_interface (struct vnet_main_t *vnm, vnet_link_t packet_type, u32 sw_if_index, u32 node_index, void *dst_address, vnet_rewrite_header_t * rw, u32 max_rewrite_bytes); u32 vnet_tx_node_index_for_sw_interface (struct vnet_main_t *vnm, u32 sw_if_index); void vnet_rewrite_init (struct vnet_main_t *vnm, u32 sw_if_index, u32 this_node, u32 next_node, vnet_rewrite_header_t * rw); u8 *vnet_build_rewrite_for_sw_interface (struct vnet_main_t *vnm, u32 sw_if_index, vnet_link_t packet_type, const void *dst_address); void vnet_update_adjacency_for_sw_interface (struct vnet_main_t *vnm, u32 sw_if_index, u32 ai); /* Parser for unformat header & rewrite string. */ unformat_function_t unformat_vnet_rewrite; format_function_t format_vnet_rewrite; format_function_t format_vnet_rewrite_header; serialize_function_t serialize_vnet_rewrite, unserialize_vnet_rewrite; #endif /* included_vnet_rewrite_h */ /* * fd.io coding-style-patch-verification: ON * * Local Variables: * eval: (c-set-style "gnu") * End: */