examples: move alignment attribute on types for MSVCMove location of __rte_aligned(a) to new conventional location. The newplacement between {struct,union} and the tag allows the desiredalignment
examples: move alignment attribute on types for MSVCMove location of __rte_aligned(a) to new conventional location. The newplacement between {struct,union} and the tag allows the desiredalignment to be imparted on the type regardless of the toolchain beingused for both C and C++. Additionally, it avoids confusion by Doxygenwhen generating documentation.Signed-off-by: Tyler Retzlaff <roretzla@linux.microsoft.com>Reviewed-by: Morten Brørup <mb@smartsharesystems.com>Acked-by: Morten Brørup <mb@smartsharesystems.com>Acked-by: Akhil Goyal <gakhil@marvell.com>
show more ...
examples/multi_process: fix build on Ubuntu 20.04Two warnings are reported by gcc 9.3.0 on Ubuntu 20.04.When producing a printable mac address the buffer was appropriately sizedfor holding the m
examples/multi_process: fix build on Ubuntu 20.04Two warnings are reported by gcc 9.3.0 on Ubuntu 20.04.When producing a printable mac address the buffer was appropriately sizedfor holding the mac address exactly, but the actual snprintf included a'\n' character at the end, which means that the snprintf technically isgetting truncated i.e. the \n would not be added due to lack of space.This gets flagged as a problem by modern versions of gcc, e.g. on Ubuntu20.04.main.c:77:37: warning: ‘__builtin___snprintf_chk’ output truncated before the last format character [-Wformat-truncation=] 77 | "%02x:%02x:%02x:%02x:%02x:%02x\n", | ^Since the \n is getting stripped anyway, we can fix the issue by justremoving it. In the process we can switch to using the standard ethernetaddress formatting function from rte_ether.h.The other warning is about possible string truncation when getting theRX queue name:In file included from init.c:36:init.c: In function ‘init’:../shared/common.h:38:28: warning: ‘%u’ directive output may be truncated writing between 1 and 10 bytes into a region of size 8 [-Wformat-truncation=] 38 | #define MP_CLIENT_RXQ_NAME "MProc_Client_%u_RX" | ^~~~~~~~~~~~~~~~~~~~../shared/common.h:52:35: note: in expansion of macro ‘MP_CLIENT_RXQ_NAME’ 52 | snprintf(buffer, sizeof(buffer), MP_CLIENT_RXQ_NAME, id); | ^~~~~~~~~~~~~~~~~~This is a false positive, as the value of the "id" is limited to 255,being stored in the app as a uint8_t value, removing the possibility ofthe %u being replaced by anything other then 3 characters max (rather thanup to 10 as thought by the compiler). Therefore, the warning can be easilyremoved by changing the type of the "id" parameter to the local functionfrom "unsigned" to "uint8_t" also, ensuring the compiler is aware of therange limit.Fixes: af75078fece3 ("first public release")Cc: stable@dpdk.orgSigned-off-by: Bruce Richardson <bruce.richardson@intel.com>Acked-by: Radu Nicolau <radu.nicolau@intel.com>
fix off-by-one errors in snprintfsnprintf guarantees to always correctly place a null terminatorin the buffer string. So manually placing a null terminatorin a buffer right after a call to snprin
fix off-by-one errors in snprintfsnprintf guarantees to always correctly place a null terminatorin the buffer string. So manually placing a null terminatorin a buffer right after a call to snprintf is redundant code.Additionally, there is no need to use 'sizeof(buffer) - 1' in snprintf as thismeans we are not using the last character in the buffer. 'sizeof(buffer)' isenough.Cc: stable@dpdk.orgSigned-off-by: Michael Santana <msantana@redhat.com>Acked-by: Bruce Richardson <bruce.richardson@intel.com>Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
examples: use SPDX tag for Intel copyright filesReplace the BSD license header with the SPDX tag for fileswith only an Intel copyright on them.Signed-off-by: Bruce Richardson <bruce.richardson@i
examples: use SPDX tag for Intel copyright filesReplace the BSD license header with the SPDX tag for fileswith only an Intel copyright on them.Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
ethdev: increase port id rangeExtend port_id definition from uint8_t to uint16_t in lib and driversdata structures, specifically rte_eth_dev_data. Modify the APIs,drivers and app using port_id at
ethdev: increase port id rangeExtend port_id definition from uint8_t to uint16_t in lib and driversdata 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 someunnecessary cast operations.release_17_11 and deprecation docs have been updated in this patch.Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
examples: do not probe pci twiceSince commit a155d430119 ("support link bonding device initialization"),rte_eal_pci_probe() is called in rte_eal_init().So it doesn't have to be called by applicat
examples: do not probe pci twiceSince commit a155d430119 ("support link bonding device initialization"),rte_eal_pci_probe() is called in rte_eal_init().So it doesn't have to be called by application anymore.It has been fixed for testpmd in commit 2950a769315,and this patch remove it from other applications.Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>Acked-by: David Marchand <david.marchand@6wind.com>Acked-by: Neil Horman <nhorman@tuxdriver.com>
eal: deprecate rte_snprintfThe function rte_snprintf serves no useful purpose. It is thesame as snprintf() for all valid inputs. Deprecate it andreplace all uses in current code.Leave the tests
eal: deprecate rte_snprintfThe function rte_snprintf serves no useful purpose. It is thesame as snprintf() for all valid inputs. Deprecate it andreplace all uses in current code.Leave the tests for the deprecated function in place.Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
remove trailing whitespacesThis commit removes trailing whitespace from lines in files. Almost allfiles are affected, as the BSD license copyright header had trailingwhitespace on 4 lines in it [
remove trailing whitespacesThis commit removes trailing whitespace from lines in files. Almost allfiles are affected, as the BSD license copyright header had trailingwhitespace on 4 lines in it [hence the number of files reporting 8 lineschanged in the diffstat].Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>Acked-by: Neil Horman <nhorman@tuxdriver.com>[Thomas: remove spaces before tabs in libs][Thomas: remove more trailing spaces in non-C files]Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
ethdev: remove rte_pmd_init_all functionNow that we've converted all the pmds in dpdk to use the driver registrationmacro, rte_pmd_init_all has become empty. As theres no reason to keep it around
ethdev: remove rte_pmd_init_all functionNow that we've converted all the pmds in dpdk to use the driver registrationmacro, rte_pmd_init_all has become empty. As theres no reason to keep it aroundanymore, just remove it and fix up all the eample callers.Signed-off-by: Neil Horman <nhorman@tuxdriver.com>Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>
update Intel copyright years to 2014Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
doc: whitespace changes in licensesSigned-off-by: Intel
update copyright date to 2013Signed-off-by: Intel
ethdev: init all builtin driversSigned-off-by: Intel
remove version in all filesSigned-off-by: Intel
first public releaseversion 1.2.3Signed-off-by: Intel