X-Git-Url: https://gerrit.fd.io/r/gitweb?a=blobdiff_plain;f=src%2Fvnet%2Finterface.api;h=172f6afb818f75df82c69ea5c93c6ede52b5d011;hb=005ef97f80e2327e6f6e6383e9c6a197a0d8b1f8;hp=02d7a505a511950199a420022a6a13c54a2b4ac3;hpb=e0792fdff6a9cc141f1cb4c6c1d2ac478cf44ee2;p=vpp.git diff --git a/src/vnet/interface.api b/src/vnet/interface.api index 02d7a505a51..172f6afb818 100644 --- a/src/vnet/interface.api +++ b/src/vnet/interface.api @@ -14,7 +14,7 @@ * limitations under the License. */ -option version = "3.2.0"; +option version = "3.2.3"; import "vnet/interface_types.api"; import "vnet/ethernet/ethernet_types.api"; @@ -40,6 +40,20 @@ autoreply define sw_interface_set_flags vl_api_if_status_flags_t flags; }; +/** \brief Set interface promiscuous mode + @param client_index - opaque cookie to identify the sender + @param context - sender context, to match reply w/ request + @param sw_if_index - index of the interface to set flags on + @param promisc_on - promiscuous mode is on ? +*/ +autoreply define sw_interface_set_promisc +{ + u32 client_index; + u32 context; + vl_api_interface_index_t sw_if_index; + bool promisc_on; +}; + /** \brief Set interface physical MTU @param client_index - opaque cookie to identify the sender @param context - sender context, to match reply w/ request @@ -131,6 +145,7 @@ autoreply define want_interface_events @param pbb_b_vlanid - B-tag vlanid @param pbb_i_sid - I-tag service id @param interface_name - name of the interface + @param interface_dev_type - device type of the interface @param tag - an ascii tag */ define sw_interface_details @@ -186,6 +201,7 @@ define sw_interface_details /* Interface name */ string interface_name[64]; + string interface_dev_type[64]; string tag[64]; }; @@ -202,7 +218,7 @@ define sw_interface_dump { u32 client_index; u32 context; - vl_api_interface_index_t sw_if_index; + vl_api_interface_index_t sw_if_index [default=0xFFFFFFFF]; bool name_filter_valid; string name_filter[]; }; @@ -226,6 +242,43 @@ autoreply define sw_interface_add_del_address vl_api_address_with_prefix_t prefix; }; +/** \brief IP interface address replace begin + + The use-case is that, for some unspecified reason, the control plane + has a different set of interface addresses than VPP + currently has. The CP would thus like to 'replace' VPP's set + only by specifying what the new set shall be, i.e. it is not + going to delete anything that already eixts, rather, is wants any + unspecified interface addresses to be deleted implicitly. + The CP declares the start of this procedure with this replace_begin + API Call, and when it has populated all addresses it wants, it calls + the below replace_end API. From this point on it is of course free + to add and delete interface addresses as usual. + The underlying mechanism by which VPP implements this replace is + intentionally left unspecified. + + @param client_index - opaque cookie to identify the sender + @param context - sender context, to match reply w/ request +*/ +autoreply define sw_interface_address_replace_begin +{ + u32 client_index; + u32 context; +}; + +/** \brief IP interface address replace end + + see ip_interface_address_replace_begin description. + + @param client_index - opaque cookie to identify the sender + @param context - sender context, to match reply w/ request +*/ +autoreply define sw_interface_address_replace_end +{ + u32 client_index; + u32 context; +}; + /** \brief Associate the specified interface with a fib table @param client_index - opaque cookie to identify the sender @param context - sender context, to match reply w/ request @@ -405,6 +458,45 @@ autoreply define sw_interface_set_rx_placement bool is_main; }; +/** \brief Set an interface's tx-placement + Tx-Queue placement on specific thread is operational for only hardware + interface. It will not set queue - thread placement for sub-interfaces, + p2p and pipe interfaces. + @param client_index - opaque cookie to identify the sender + @param context - sender context, to match reply w/ request + @param sw_if_index - the interface whose tx-placement will be set + @param queue_id - the queue number whose tx-placement will be set. + @param array_size - the size of the thread indexes array + @param threads - the thread indexes of main and worker(s) threads + whom tx-placement will be at. +*/ +autoendian autoreply define sw_interface_set_tx_placement +{ + u32 client_index; + u32 context; + vl_api_interface_index_t sw_if_index; + u32 queue_id; + u32 array_size; + u32 threads[array_size]; + option vat_help = "> queue [threads | mask ]"; +}; + +/** \brief Set custom interface name + Set custom interface name for the interface. + @param client_index - opaque cookie to identify the sender + @param context - sender context, to match reply w/ request + @param sw_if_index - the interface whose name will be set + @param name - the custom interface name to be set +k +*/ +autoreply define sw_interface_set_interface_name +{ + u32 client_index; + u32 context; + vl_api_interface_index_t sw_if_index; + string name[64]; +}; + /** \brief dump the rx queue placement of interface(s) @param sw_if_index - optional interface index for which queue placement to be requested. sw_if_index = ~0 will dump placement information for all @@ -443,6 +535,60 @@ define sw_interface_rx_placement_details vl_api_rx_mode_t mode; }; +service { + rpc sw_interface_tx_placement_get returns sw_interface_tx_placement_get_reply + stream sw_interface_tx_placement_details; +}; + +/** \brief get the tx queue placement of interface(s) + @param cursor - optional, it allows client to continue a dump + @param sw_if_index - optional interface index for which queue placement to + be requested. sw_if_index = ~0 will get the placement information for all + interfaces. It will not get information related to sub-interfaces, p2p + and pipe interfaces. +*/ +autoendian define sw_interface_tx_placement_get +{ + u32 client_index; + u32 context; + u32 cursor; + vl_api_interface_index_t sw_if_index; + option vat_help = "[interface | sw_if_index ]"; +}; + +autoendian define sw_interface_tx_placement_get_reply +{ + u32 context; + i32 retval; + u32 cursor; +}; + +/** \brief show the interface's queue - thread placement + This api is used to display the interface and queue worker + thread placement. One message per tx-queue per interface will + be sent to client. + Each message will contain information about tx-queue id of an + interface, interface index, thread on which this tx-queue is + placed and mode of tx-queue. + @param client_index - opaque cookie to identify the sender + @param context - sender context, to match reply w/ request + @param sw_if_index - the interface whose tx-placement will be dumped + @param queue_id - the queue id + @param shared - the queue is shared on other threads + @param array_size - the size of the threads array + @param threads - the main and worker(s) thread index(es) whom tx-placement are at. +*/ +autoendian define sw_interface_tx_placement_details +{ + u32 client_index; + u32 context; + vl_api_interface_index_t sw_if_index; + u32 queue_id; + u8 shared; + u32 array_size; + u32 threads[array_size]; +}; + /* Gross kludge, DGMS */ autoreply define interface_name_renumber {