Hello all,
While I was browsing through the nsim code (plugins/nsim),
in nsim_inline() we are copying the packet data to ep->data like below
clib_memcpy (ep->data, vlib_buffer_get_current (b[0]),
ep->current_length);
and in nsim_input.c the same packet is transferring to TX
clib_memcpy (b0->data, ep->data, ep->current_length)
The data is defined in the below structure
typedef struct
{
f64 tx_time;
u32 tx_sw_if_index;
u32 current_length;
CLIB_CACHE_LINE_ALIGN_MARK (pad);
u8 data[WHEEL_ENTRY_DATA_SIZE];
} nsim_wheel_entry_t;
I am just wondering if there is any special reason why 'data' as such
is copied here from the vlib buffer to the wheel buffer, instead of
using the pointer(copying just the address), and thus avoiding a
packet copy?
Is it not possible to keep the packet in vlib buffer itself till it
is transmitted NIC/DPDK TX after a delay?
Thanks and Regards,
Raj
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#12040): https://lists.fd.io/g/vpp-dev/message/12040
Mute This Topic: https://lists.fd.io/mt/29581029/21656
Group Owner: [email protected]
Unsubscribe: https://lists.fd.io/g/vpp-dev/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-