diff options
author | Dave Barach <dave@barachs.net> | 2019-04-03 11:20:06 -0400 |
---|---|---|
committer | Florin Coras <florin.coras@gmail.com> | 2019-04-11 01:19:56 +0000 |
commit | 7c91007e1e13b56a29236bd076891709eaa21754 (patch) | |
tree | e6d78635a3b53f6db4b0bfa563d98254c464da6f /src/plugins/nsim/nsim.api | |
parent | 10dc2eabd6e8a266405aef270a819794a3ddd333 (diff) |
Make the loss / delay sim available as an output feature
Add binary api and debug cli support.
Rewrite for speed: enqueue vlib_buffer_t's to the wheel, instead of
memcpy'ing data. Quad-loop the output feature / x-connect (interior)
node. Prefetch wheel entries in the input node.
Save packet-generator-based unit-test setup in extras/nsim.
Simple config example:
set nsim delay 20 ms bandwidth 1 gbit packet-size 1024
nsim output-feature enable-disable GigabitEthernet3/0/0
Change-Id: I852a32d4eb596e7e2aa1d9b30bf3b53525e39fd1
Signed-off-by: Dave Barach <dave@barachs.net>c
Diffstat (limited to 'src/plugins/nsim/nsim.api')
-rw-r--r-- | src/plugins/nsim/nsim.api | 27 |
1 files changed, 25 insertions, 2 deletions
diff --git a/src/plugins/nsim/nsim.api b/src/plugins/nsim/nsim.api index 7bb84bafacd..42531cd2e0f 100644 --- a/src/plugins/nsim/nsim.api +++ b/src/plugins/nsim/nsim.api @@ -3,7 +3,7 @@ * @brief VPP control-plane API messages for the network delay simulator */ -option version = "1.1.0"; +option version = "2.1.0"; /** \brief enable / disable the network delay simulation cross-connect @param client_index - opaque cookie to identify the sender @@ -12,7 +12,7 @@ option version = "1.1.0"; @param sw_if_index0 - one interface to cross-connect @param sw_if_index1 - the other interface to cross-connect */ -autoreply define nsim_enable_disable +autoreply define nsim_cross_connect_enable_disable { /* Client identifier, set from api_main.my_client_index */ u32 client_index; @@ -28,6 +28,27 @@ autoreply define nsim_enable_disable u32 sw_if_index1; }; +/** \brief enable / disable the network delay simulation output feature + @param client_index - opaque cookie to identify the sender + @param context - sender context, to match reply w/ request + @param enable_disable - enable or disable the feature + @param sw_if_index0 - interface +*/ +autoreply define nsim_output_feature_enable_disable +{ + /* Client identifier, set from api_main.my_client_index */ + u32 client_index; + + /* Arbitrary context, so client can match reply to request */ + u32 context; + + /* Enable / disable the feature on the interfaces */ + u8 enable_disable; + + /* Interface handles */ + u32 sw_if_index; +}; + /** \brief configure the network delay simulation cross-connect @param client_index - opaque cookie to identify the sender @param context - sender context, to match reply w/ request @@ -49,3 +70,5 @@ autoreply define nsim_configure u64 bandwidth_in_bits_per_second; u32 packets_per_drop; }; + + |