path: root/lib/librte_kni/rte_kni.h
AgeCommit message (Collapse)Author
2018-10-26kni: add function to set link state on kernel interfaceDan Gora
Add a new API function to KNI, rte_kni_update_link() to allow DPDK applications to update the link status for KNI network interfaces in the linux kernel. Signed-off-by: Dan Gora <> Acked-by: Ferruh Yigit <>
2018-10-02kni: allocate memory dynamically for each deviceIgor Ryzhov
Long time ago preallocation of memory for KNI was introduced in commit 0c6bc8e. It was done because of lack of ability to free previously allocated memzones, which led to memzone exhaustion. Currently memzones can be freed and this patch uses this ability for dynamic KNI memory allocation. Signed-off-by: Igor Ryzhov <> Acked-by: Ferruh Yigit <>
2018-02-01kni: set initial value for MTUHemant Agrawal
Configure initial application provided mtu on the KNI interface. Signed-off-by: Hemant Agrawal <> Acked-by: Ferruh Yigit <>
2018-02-01kni: support promiscuous mode setHemant Agrawal
Inform userspace app about promisc mode change Signed-off-by: Hemant Agrawal <> Acked-by: Ferruh Yigit <>
2018-02-01kni: support MAC address changeHemant Agrawal
This patch adds following: 1. Option to configure the mac address during create. Generate random address only if the user has not provided any valid address. 2. Inform usespace, if mac address is being changed in linux. 3. Implement default handling of mac address change in the corresponding ethernet device. Signed-off-by: Hemant Agrawal <> Acked-by: Ferruh Yigit <>
2018-01-04lib: use SPDX tag for Intel copyright filesBruce Richardson
Replace the BSD license header with the SPDX tag for files with only an Intel copyright on them. Signed-off-by: Bruce Richardson <>
2017-11-13lib: fix typosPavel Shirshov
Signed-off-by: Pavel Shirshov <>
2017-11-07lib: fix some typosThomas Monjalon
Signed-off-by: Thomas Monjalon <> Signed-off-by: Rami Rosen <>
2017-10-06ethdev: increase port id rangeZhiyong Yang
Extend port_id definition from uint8_t to uint16_t in lib and drivers data structures, specifically rte_eth_dev_data. Modify the APIs, drivers and app using port_id at the same time. Fix some checkpatch issues from the original code and remove some unnecessary cast operations. release_17_11 and deprecation docs have been updated in this patch. Signed-off-by: Zhiyong Yang <> Acked-by: Adrien Mazarguil <> Reviewed-by: Ferruh Yigit <>
2016-11-07doc: fix typosAlain Leon
Fixes typos present in the documentation and code comments. Signed-off-by: Alain Leon <> Acked-by: John McNamara <>
2016-09-13lib: work around nonstandard bit-fieldsAdrien Mazarguil
Exported header files used by applications should allow the strictest compiler flags. Language extensions used in many places must be explicitly marked or removed to avoid warnings and compilation failures. This commit prevents the following errors: error: type of bit-field `[...]' is a GCC extension Note: the standard does not require implementations to issue a diagnostic message with these, and such errors do not occur with recent GCC or clang versions. However, GCC 4.7 is still common and using the extension keyword is easier than checking compiler version. Signed-off-by: Adrien Mazarguil <>
2016-06-14kni: describe mempool capacity requirementAlex Wang
Function like 'rte_kni_rx_burst()' keeps allocating 'MAX_MBUF_BURST_NUM' mbufs to kni fifo queue unless the queue's capacity ('KNI_FIFO_COUNT_MAX') is reached. So, if the mempool is under-provisioned, user may run into "Out of Memory" logs from KNI code. This commit documents the need to provision mempool capacity of more than "2 x KNI_FIFO_COUNT_MAX" for each KNI interface. Signed-off-by: Alex Wang <> Acked-by: Ferruh Yigit <> Acked-by: John McNamara <>
2016-06-14kni: fix inverted function commentsAlex Wang
The 'mbufs' alloc/free descriptions for 'rte_kni_tx_burst()' and 'rte_kni_rx_burst()' should be inverted. Fixes: 3fc5ca2 ("kni: initial import") Signed-off-by: Alex Wang <> Acked-by: Ferruh Yigit <>
2016-01-28lib: remove keyword extern for functionsFerruh Yigit
Remove "extern" keywords in header files, the ones for function prototypes Signed-off-by: Ferruh Yigit <>
2015-09-03kni: remove deprecated functionsStephen Hemminger
These functions were tagged as deprecated in 2.0 so they can be removed in 2.2. The library version is incremented. Signed-off-by: Stephen Hemminger <> Acked-by: Helin Zhang <> [Thomas: update doc and version] Signed-off-by: Thomas Monjalon <> Acked-by: Neil Horman <>
2015-06-19doc: fix doxygen warningsThomas Monjalon
Signed-off-by: Thomas Monjalon <> Acked-by: Bruce Richardson <>
2015-06-16kni: query the name of an instanceBruce Richardson
When a KNI object is created, a name is assigned to it which is stored internally. There is also an API function to look up a KNI object by name, but there is no API to query the current name of an existing KNI object. This patch adds just such an API. Signed-off-by: Bruce Richardson <> Acked-by: Helin Zhang <>
2015-06-12kni: fix whitespaceStephen Hemminger
Ran this code base through a script which: - removes trailing whitespace - removes space before tabs - removes blank lines at end of file Signed-off-by: Stephen Hemminger <> Acked-by: Helin Zhang <>
2015-05-29kni: fix missing header dependenciesBruce Richardson
The file rte_kni.h depends upon a number of other headers, some of which are missing from the #include lines. The following #includes are added: * rte_memory.h - for the definition of phys_addr_t * rte_mempool.h - for the definition of mempool struct and the mempool create function. Signed-off-by: Bruce Richardson <> Acked-by: Marc Sune <>
2015-05-11kni: remove inclusion of mbuf headerBruce Richardson
The kni header file includes the mbuf header file, but it does not need to do so as it only uses pointers to the struct rte_mbuf type, and does not use any of the mbuf internals, nor any of the mbuf functions or macros. Therefore the inclusion is unnecessary, and can be replaced by a forward declaration of the mbuf type. Signed-off-by: Bruce Richardson <> Acked-by: Olivier Matz <>
2014-10-21kni: memzone pool for alloc and releaseMarc Sune
The previous implementation of rte_kni_alloc() was allocating memzones with a name composed of a fixed string and the interface name. When an application was allocating and deallocating multiple interfaces with different names, memzones were quickly exhausted, even though memzones from deallocated interfaces were never used anymore (unless an interface with the same name was re-allocated). As a result, the application was unable to allocate more KNI interfaces with different names. This patch implements the KNI memzone pool in order to prevent memzone exhaustion when allocating/deallocating KNI interfaces. It adds a new API call, rte_kni_init(max_kni_ifaces) that shall be called before any call to rte_kni_alloc() if KNI is used. The memzones are pre-allocated with interface- independent names so that they can be reused. Signed-off-by: Marc Sune <> Acked-by: Helin Zhang <>
2014-06-11remove trailing whitespacesBruce Richardson
This commit removes trailing whitespace from lines in files. Almost all files are affected, as the BSD license copyright header had trailing whitespace on 4 lines in it [hence the number of files reporting 8 lines changed in the diffstat]. Signed-off-by: Bruce Richardson <> Acked-by: Neil Horman <> [Thomas: remove spaces before tabs in libs] [Thomas: remove more trailing spaces in non-C files] Signed-off-by: Thomas Monjalon <>
2014-05-16spelling fixesStephen Hemminger
Signed-off-by: Stephen Hemminger <> Acked-by: Bruce Richardson <>
2014-02-25kni: add kni close functionBruce Richardson
KNI close function added. Signed-off-by: Bruce Richardson <>
2014-02-25update Intel copyright years to 2014Bruce Richardson
Signed-off-by: Bruce Richardson <>
2013-10-09kni: allow multiple threadsIntel
In this new mode, each KNI device has its own kernel thread for Rx. The core affinity is configurable. Signed-off-by: Intel
2013-10-09kni: identify device by nameIntel
Some old API functions based on port_id are deprecated. Signed-off-by: Intel
2013-10-09kni: minor changesIntel
Signed-off-by: Intel
2013-10-09doc: whitespace changes in licensesIntel
Signed-off-by: Intel
2013-09-17kni: fix multi-process supportIntel
Signed-off-by: Intel
2013-07-25update copyright date to 2013Intel
Signed-off-by: Intel
2013-07-25kni: initial importIntel
Signed-off-by: Intel