summaryrefslogtreecommitdiff
path: root/lib/librte_ip_frag
AgeCommit message (Collapse)Author
2019-11-20build: align symbols with global ABI versionPawel Modrak
Merge all versions in linker version script files to DPDK_20.0. This commit was generated by running the following command: :~/DPDK$ buildtools/update-abi.sh 20.0 Signed-off-by: Pawel Modrak <pawelx.modrak@intel.com> Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com> Acked-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Thomas Monjalon <thomas@monjalon.net>
2019-11-20build: remove individual library versionsAnatoly Burakov
Since the library versioning for both stable and experimental ABI's is now managed globally, the LIBABIVER and version variables no longer serve any useful purpose, and can be removed. The replacement in Makefiles was done using the following regex: ^(#.*\n)?LIBABIVER\s*:=\s*\d+\n(\s*\n)? (LIBABIVER := numbers, optionally preceded by a comment and optionally succeeded by an empty line) The replacement for meson files was done using the following regex: ^(#.*\n)?version\s*=\s*\d+\n(\s*\n)? (version = numbers, optionally preceded by a comment and optionally succeeded by an empty line) [David]: those variables are manually removed for the files: - drivers/common/qat/Makefile - lib/librte_eal/meson.build [David]: the LIBABIVER is restored for the external ethtool example library. Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com> Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Thomas Monjalon <thomas@monjalon.net>
2019-07-16ip_frag: remove remaining IP checkum offload flagSunil Kumar Kori
Currently PKT_TX_IP_CKSUM is being set into mbuf->ol_flags during fragmentation operation implicitly by the library. Because of this, application is forced to use checksum offload whether it is supported by platform or not. Also documentation does not provide any expected value of ol_flags in returned fragmented mbufs so application will never come to know that which offloads are enabled. So transmission may be failed for the platforms which does not support checksum offload. So removing mentioned flag from the library. Mentioned change is part of http://patches.dpdk.org/patch/53475. Changes for reassembly operation is already accepted. This patch set implements the similar change for fragmentation operation. Fixes: e29fc44370c2 ("ip_frag: remove IP checkum offload flag") Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
2019-07-08ip_frag: remove IP checkum offload flagSunil Kumar Kori
Currently PKT_TX_IP_CKSUM is being set into mbuf->ol_flags during fragmentation and reassemble operation implicitly. Because of this, application is forced to use checksum offload whether it is supported by platform or not. Also documentation does not provide any expected value of ol_flags in returned mbuf (reassembled or fragmented) so application will never come to know that which offloads are enabled. So transmission may be failed for the platforms which does not support checksum offload. Also, IPv6 does not contain any checksum field in header so setting mbuf->ol_flags with PKT_TX_IP_CKSUM is itself invalid. So removing mentioned flag from the library. Signed-off-by: Sunil Kumar Kori <skori@marvell.com> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2019-06-29enforce experimental tag at beginning of declarationsDavid Marchand
Putting a '__attribute__((deprecated))' in the middle of a function prototype does not result in the expected result with gcc (while clang is fine with this syntax). $ cat deprecated.c void * __attribute__((deprecated)) incorrect() { return 0; } __attribute__((deprecated)) void *correct(void) { return 0; } int main(int argc, char *argv[]) { incorrect(); correct(); return 0; } $ gcc -o deprecated.o -c deprecated.c deprecated.c: In function ‘main’: deprecated.c:3:1: warning: ‘correct’ is deprecated (declared at deprecated.c:2) [-Wdeprecated-declarations] int main(int argc, char *argv[]) { incorrect(); correct(); return 0; } ^ Move the tag on a separate line and make it the first thing of function prototypes. This is not perfect but we will trust reviewers to catch the other not so easy to detect patterns. sed -i \ -e '/^\([^#].*\)\?__rte_experimental */{' \ -e 's//\1/; s/ *$//; i\' \ -e __rte_experimental \ -e '/^$/d}' \ $(git grep -l __rte_experimental -- '*.h') Special mention for rte_mbuf_data_addr_default(): There is either a bug or a (not yet understood) issue with gcc. gcc won't drop this inline when unused and rte_mbuf_data_addr_default() calls rte_mbuf_buf_addr() which itself is experimental. This results in a build warning when not accepting experimental apis from sources just including rte_mbuf.h. For this specific case, we hide the call to rte_mbuf_buf_addr() under the ALLOW_EXPERIMENTAL_API flag. Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com> Signed-off-by: David Marchand <david.marchand@redhat.com>
2019-06-29remove experimental tags from all symbol definitionsDavid Marchand
We had some inconsistencies between functions prototypes and actual definitions. Let's avoid this by only adding the experimental tag to the prototypes. Tests with gcc and clang show it is enough. git grep -l __rte_experimental |grep \.c$ |while read file; do sed -i -e '/^__rte_experimental$/d' $file; sed -i -e 's/ *__rte_experimental//' $file; sed -i -e 's/__rte_experimental *//' $file; done Signed-off-by: David Marchand <david.marchand@redhat.com> Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com> Acked-by: Neil Horman <nhorman@tuxdriver.com>
2019-06-27ip_frag: fix IPv6 fragment size calculationKonstantin Ananyev
Take into account IPv6 fragment extension header when calculating data size for each fragment. Fixes: 7a838c8798a9 ("ip_frag: fix IPv6 when MTU sizes not aligned to 8 bytes") Fixes: 0aa31d7a5929 ("ip_frag: add IPv6 fragmentation support") Cc: stable@dpdk.org Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2019-05-24net: add rte prefix to IP definesOlivier Matz
Add 'RTE_' prefix to defines: - rename IPv4( as RTE_IPv4(. - rename IPV4_MAX_PKT_LEN as RTE_IPV4_MAX_PKT_LEN. - rename IPV4_HDR_IHL_MASK as RTE_IPV4_HDR_IHL_MASK. - rename IPV4_IHL_MULTIPLIER as RTE_IPV4_IHL_MULTIPLIER. - rename IPV4_HDR_DF_SHIFT as RTE_IPV4_HDR_DF_SHIFT. - rename IPV4_HDR_MF_SHIFT as RTE_IPV4_HDR_MF_SHIFT. - rename IPV4_HDR_FO_SHIFT as RTE_IPV4_HDR_FO_SHIFT. - rename IPV4_HDR_DF_FLAG as RTE_IPV4_HDR_DF_FLAG. - rename IPV4_HDR_MF_FLAG as RTE_IPV4_HDR_MF_FLAG. - rename IPV4_HDR_OFFSET_MASK as RTE_IPV4_HDR_OFFSET_MASK. - rename IPV4_HDR_OFFSET_UNITS as RTE_IPV4_HDR_OFFSET_UNITS. - rename IPV4_ANY as RTE_IPV4_ANY. - rename IPV4_LOOPBACK as RTE_IPV4_LOOPBACK. - rename IPV4_BROADCAST as RTE_IPV4_BROADCAST. - rename IPV4_ALLHOSTS_GROUP as RTE_IPV4_ALLHOSTS_GROUP. - rename IPV4_ALLRTRS_GROUP as RTE_IPV4_ALLRTRS_GROUP. - rename IPV4_MAX_LOCAL_GROUP as RTE_IPV4_MAX_LOCAL_GROUP. - rename IPV4_MIN_MCAST as RTE_IPV4_MIN_MCAST. - rename IPV4_MAX_MCAST as RTE_IPV4_MAX_MCAST. - rename IS_IPV4_MCAST as RTE_IS_IPV4_MCAST. - rename IPV6_HDR_FL_SHIFT as RTE_IPV6_HDR_FL_SHIFT. - rename IPV6_HDR_TC_SHIFT as RTE_IPV6_HDR_TC_SHIFT. - rename IPV6_HDR_FL_MASK as RTE_IPV6_HDR_FL_MASK. - rename IPV6_HDR_TC_MASK as RTE_IPV6_HDR_TC_MASK. Signed-off-by: Olivier Matz <olivier.matz@6wind.com> Reviewed-by: Stephen Hemminger <stephen@networkplumber.org> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-05-24net: add rte prefix to IP structureOlivier Matz
Add 'rte_' prefix to structures: - rename struct ipv4_hdr as struct rte_ipv4_hdr. - rename struct ipv6_hdr as struct rte_ipv6_hdr. Signed-off-by: Olivier Matz <olivier.matz@6wind.com> Reviewed-by: Stephen Hemminger <stephen@networkplumber.org> Reviewed-by: Maxime Coquelin <maxime.coquelin@redhat.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-05-03doc: fix spelling reported by aspell in commentsJohn McNamara
Fix spelling errors in the doxygen docs. Signed-off-by: John McNamara <john.mcnamara@intel.com>
2018-12-19ip_frag: fix IPv6 when MTU sizes not aligned to 8 bytesChas Williams
The same issue was fixed on for the ipv4 version of this routine in commit 8d4d3a4f7337 ("ip_frag: handle MTU sizes not aligned to 8 bytes"). Briefly, the size of an ipv6 header is always 40 bytes. With an MTU of 1500, this will never produce a multiple of 8 bytes for the frag_size and this routine can never succeed. Since RTE_ASSERTS are disabled by default, this failure is typically ignored. To fix this, round down to the nearest 8 bytes and use this when producing the fragments. Fixes: 0aa31d7a5929 ("ip_frag: add IPv6 fragmentation support") Cc: stable@dpdk.org Signed-off-by: Chas Williams <chas3@att.com> Acked-by: Luca Boccassi <bluca@debian.org> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2018-11-26fix indentation in symbol mapsThomas Monjalon
Signed-off-by: Thomas Monjalon <thomas@monjalon.net> Acked-by: Allain Legacy <allain.legacy@windriver.com>
2018-11-06ip_frag: use key length for key comparisonKonstantin Ananyev
Right now reassembly code relies on src_dst[] being all zeroes to determine is it free/occupied entry in the fragments table. This is suboptimal and error prone - user can crash DPDK ip_reassembly app by something like the following scapy script: x=Ether(src=...,dst=...)/IP(dst='0.0.0.0',src='0.0.0.0',id=0)/('X'*1000) frags=fragment(x, fragsize=500) sendp(frags, iface=...) To overcome that issue and reduce overhead of 'key invalidate' and 'key is empty' operations - add key_len into keys comparision procedure. Fixes: 4f1a8f633862 ("ip_frag: add IPv6 reassembly") Cc: stable@dpdk.org Reported-by: Ryan E Hall <ryan.e.hall@intel.com> Reported-by: Alexander V Gutkin <alexander.v.gutkin@intel.com> Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2018-11-06ip_frag: check fragment length of incoming packetKonstantin Ananyev
Under some conditions ill-formed fragments might cause reassembly code to corrupt mbufs and/or crash. Let say the following fragments sequence: <ofs=0,len=100, flags=MF> <ofs=96,len=100, flags=MF> <ofs=200,len=0,flags=MF> <ofs=200,len=100,flags=0> can trigger the problem. To overcome such situation, added check that fragment length of incoming value is greater than zero. Fixes: 601e279df074 ("ip_frag: move fragmentation/reassembly headers into a library") Fixes: 4f1a8f633862 ("ip_frag: add IPv6 reassembly") Cc: stable@dpdk.org Reported-by: Ryan E Hall <ryan.e.hall@intel.com> Reported-by: Alexander V Gutkin <alexander.v.gutkin@intel.com> Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2018-10-28ip_frag: fix overflow in key comparisonLi Han
in struct ip_frag_key,src_dst[] type is uint64_t. but "val" which to store the calc restult ,type is uint32_t. we may lost high 32 bit key. and function return value is int, but it won't return < 0. Signed-off-by: Li Han <han.li1@zte.com.cn> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2018-09-19ip_frag: add function to delete expired entriesAlex Kiselev
A fragmented packets is supposed to live no longer than max_cycles, but the lib deletes an expired packet only occasionally when it scans a bucket to find an empty slot while adding a new packet. Therefore a fragment might sit in the table forever. Signed-off-by: Alex Kiselev <alex@therouter.net> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2018-05-14ip_frag: fix some debug logsLi Han
In ip_frag_process, some IP_FRAG_LOG content is wrong. Fixes: 4f1a8f633862 ("ip_frag: add IPv6 reassembly") Cc: stable@dpdk.org Signed-off-by: Li Han <han.li1@zte.com.cn> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2018-04-15ip_frag: fix double free of chained mbufsAllain Legacy
The first mbuf and the last mbuf to be visited in the preceding loop are not set to NULL in the fragmentation table. This creates the possibility of a double free when the fragmentation table is later freed with rte_ip_frag_table_destroy(). Fixes: 95908f52393d ("ip_frag: free mbufs on reassembly table destroy") Cc: stable@dpdk.org Signed-off-by: Allain Legacy <allain.legacy@windriver.com> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2018-01-30build: replace license text with SPDX tagBruce Richardson
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Reviewed-by: Luca Boccassi <bluca@debian.org>
2018-01-30lib: build with mesonBruce Richardson
Add non-EAL libraries to DPDK build. The compat lib is a special case, along with the previously-added EAL, but all other libs can be build using the same set of commands, where the individual meson.build files only need to specify their dependencies, source files, header files and ABI versions. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Reviewed-by: Harry van Haaren <harry.van.haaren@intel.com> Acked-by: Keith Wiles <keith.wiles@intel.com> Acked-by: Luca Boccassi <luca.boccassi@gmail.com>
2018-01-17lib: fix missing includes in exported headersAdrien Mazarguil
Many exported headers rely on definitions found in rte_config.h without including it, as shown by the following command: grep -L '^#include <rte_config.h>' -- \ $(grep -Rl \ $(sed -n '/^#define \([^ ]\+\).*$/{s//\1/;H;};${x;s/\n//;s/\n/\\|/g;p;}' \ build/include/rte_config.h) \ -- build/include/) We cannot assume external applications will include rte_config.h on their own, neither directly nor through a -include parameter like DPDK does internally. This not only causes obvious compilation failures that can be reproduced with check-includes.sh such as: [...]/rte_memory.h:88:43: error: ‘RTE_CACHE_LINE_SIZE’ was not declared in this scope #define __rte_cache_aligned __rte_aligned(RTE_CACHE_LINE_SIZE) ^ It also results in less visible issues, for instance rte_hash_crc.h relying on RTE_ARCH_X86_64's presence to provide dedicated inline functions. This patch partially reverts the commit below and adds missing include lines to the remaining files. Fixes: f1a7a5c5f404 ("remove include of generated config header") Cc: stable@dpdk.org Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com> Acked-by: Thomas Monjalon <thomas@monjalon.net>
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 <bruce.richardson@intel.com>
2017-11-13lib: fix typosPavel Shirshov
Signed-off-by: Pavel Shirshov <pavel.shirshov@gmail.com>
2017-10-24mk: do not generate LDLIBS from directory dependenciesOlivier Matz
The list of libraries in LDLIBS was generated from the DEPDIRS-xyz variable. This is valid when the subdirectory name match the library name, but it's not always the case, especially for PMDs. The patches removes this feature and explicitly adds the proper libraries in LDLIBS. Some DEPDIRS-xyz variables become useless, remove them. Reported-by: Gage Eads <gage.eads@intel.com> Signed-off-by: Olivier Matz <olivier.matz@6wind.com> Reviewed-by: Gage Eads <gage.eads@intel.com>
2017-08-31ip_frag: rename map file to standardized nameBruce Richardson
The filenames of the linker map files for DPDK libraries, all follow a standard format: rte_<libname>_version.map. The ip_frag version, however, was missing an underscore in the name, so was non-standard. By changing this, we no longer need the build system to explicitly be given the name of the mapfile, as it can determine it from the directory/library name. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-07-04ip_frag: check for x86 rather than SSE4Bruce Richardson
Since SSE4 is now part of the minimum requirements for DPDK, we don't need to check for its presence any more. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2017-06-22ip_frag: handle MTU sizes not aligned to 8 bytesAllain Legacy
The rte_ipv4_fragment_packet API expects that the link/interface MTU value passed in be divisible by 8 bytes. Given the name of the parameter is "mtu" rather than "frag_size" it is not necessarily the case that it will be divisible by 8. An MTU of 1500 happens to produce a max fragment size of 1480 (1500 - sizeof(ipv4_hdr)) which is divisible by 8 but other MTU values such as 1600 or 9000 do not produce values that are divisible by 8. Unfortunately, the API checks that the frag_size value produced is divisible by 8 with a call to RTE_ASSERT which is only enabled when the RTE_LOG_LEVEL >= RTE_LOG_DEBUG. In cases where the log level is set normally the code silently continues and produces IP fragments that have invalid fragment offset values. An application may not have control over what MTU a user selects and rather than have each application adjust the MTU to pass a suitable value to the fragmentation API this change modifies the fragmentation API to handle cases where the "mtu" argument is not divisible by 8 and automatically adjust the internal "frag_size". Signed-off-by: Allain Legacy <allain.legacy@windriver.com> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2017-06-22ip_frag: free mbufs on reassembly table destroyDahir Osman
The rte_ip_frag_table_destroy procedure simply releases the memory for the table without freeing the packet buffers that may be referenced in the hash table for in-flight or incomplete packet reassembly operations. To prevent leaked mbufs go through the list of fragments and free each one individually. Fixes: 416707812c03 ("ip_frag: refactor reassembly code into a proper library") Cc: stable@dpdk.org Reported-by: Matt Peters <matt.peters@windriver.com> Signed-off-by: Allain Legacy <allain.legacy@windriver.com> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2017-06-14fix typos using codespell utilityJerin Jacob
Fixing typos across dpdk source code using codespell utility. Skipped the ethdev driver's base code fixes to keep the base code intact. Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com> Acked-by: John McNamara <john.mcnamara@intel.com>
2017-03-27mk: optimize directory dependenciesOlivier Matz
Before this patch, the management of dependencies between directories had several issues: - the generation of .depdirs, done at configuration is slow: it can take more than one minute on some slow targets (usually ~10s on a standard PC without -j). - for instance, it is possible to express a dependency like: - app/foo depends on lib/librte_foo - and lib/librte_foo depends on app/bar But this won't work because the directories are traversed with a depth-first algorithm, so we have to choose between doing 'app' before or after 'lib'. - the script depdirs-rule.sh is too complex. - we cannot use "make -d" for debug, because the output of make is used for the generation of .depdirs. This patch moves the DEPDIRS-* variables in the upper Makefile, making the dependencies much easier to calculate. A DEPDIRS variable is still used to process library dependencies in LDLIBS. After this commit, "make config" is almost immediate. Signed-off-by: Olivier Matz <olivier.matz@6wind.com> Tested-by: Robin Jarry <robin.jarry@6wind.com> Tested-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2016-11-07ip_frag: fix IP reassembly regressionWenzhuo Lu
After changing pkt[0] to pkt[], the example IP reassembly is not working. It's weird because this change is fine. There should be no difference between them. As a workaround, revert this change. Fixes: 347a1e037fd3 ("lib: use C99 syntax for zero-size arrays") Reported-by: Huilong Xu <huilongx.xu@intel.com> Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2016-10-05ip_frag: fix missing dependency on hash libraryPanu Matilainen
Not sure what exactly changed and where, but I've started getting build failures on Fedora rawhide i386: lib/librte_ip_frag/ip_frag_internal.c:36:23: fatal error: rte_jhash.h: No such file or directory #include <rte_jhash.h> ^ Looking at librte_ip_frag, it clearly depends on librte_hash so its probably more a question of something commonly masking the issue. Signed-off-by: Panu Matilainen <pmatilai@redhat.com>
2016-09-13lib: use C99 syntax for zero-size arraysAdrien 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. The extension keyword is used whenever the C99 syntax cannot do it. This commit prevents the following errors: error: ISO C forbids zero-size array `[...]' Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2016-07-16ip_frag: fix doxygen formattingHiroyuki Mikita
This commit fixes some functions missing in API documentation. Signed-off-by: Hiroyuki Mikita <h.mikita89@gmail.com>
2016-06-29mk: fix internal dependenciesThomas Monjalon
Some libraries were missing their dependency on eal, mbuf, mempool, ring and kvargs. It is revealed by the linker option "-z defs". Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2016-06-13mk: fix missing internal dependenciesChristian Ehrhardt
This patch adds missing DEPDIRS to avoid any library referring to symbols they are not linked against. Signed-off-by: Christian Ehrhardt <christian.ehrhardt@canonical.com>
2016-05-02eal: add assert macro for debugThomas Monjalon
The macro RTE_VERIFY always checks a condition. It is optimized with "unlikely" hint. While this macro is well suited for test applications, it is preferred in libraries and examples to enable such check in debug mode. That's why the macro RTE_ASSERT is introduced to call RTE_VERIFY only if built with debug logs enabled. A lot of assert macros were duplicated and enabled with a specific flag. Removing these #ifdef allows to test these code branches more easily and avoid dead code pitfalls. The ENA_ASSERT is kept (in debug mode only) because it has more parameters to log. Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
2016-05-02ip_frag: fix double free of chained mbufsChaeyong Chong
If any fragment hole is found in ipv4_frag_reassemble() and ipv6_frag_reassemble(), whole ip_frag_pkt mbufs are moved to death-row. Any mbufs already chained to another mbuf are freed multiple times as there are still in ip_frag_pkt array. Signed-off-by: Chaeyong Chong <cychong@gmail.com> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2016-02-10remove extra parentheses in return statementHuawei Xie
fix the error reported by checkpatch: "ERROR: return is not a function, parentheses are not required" remove parentheses in return like: "return (logical expressions)" remove parentheses in return a function like: "return (rte_mempool_lookup(...))" Fixes: 6307b909b8e0 ("lib: remove extra parenthesis after return") Signed-off-by: Huawei Xie <huawei.xie@intel.com>
2015-10-25mbuf: move chaining from ip_frag librarySimon Kagstrom
Chaining/segmenting mbufs can be useful in many places, so make it global. Signed-off-by: Simon Kagstrom <simon.kagstrom@netinsight.net> Signed-off-by: Johan Faltstrom <johan.faltstrom@netinsight.net> Acked-by: Olivier Matz <olivier.matz@6wind.com>
2015-10-08ip_frag: fix bit-fields in ipv6 fragment extensionPiotr Azarewicz
Previous implementation won't work on every environment. The order of allocation of bit-fields within a unit (high-order to low-order or low-order to high-order) is implementation-defined. Solution: used bytes instead of bit fields. Signed-off-by: Piotr Azarewicz <piotrx.t.azarewicz@intel.com> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com> Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
2015-06-24mbuf: use offset macroCyril Chemparathy
This patch simply applies the transform previously committed in scripts/cocci/mtod-offset.cocci. No other modifications have been made here. Signed-off-by: Cyril Chemparathy <cchemparathy@ezchip.com> Acked-by: Olivier Matz <olivier.matz@6wind.com>
2015-06-24eal: add and use unaligned integer typesCyril Chemparathy
On machines that are strict on pointer alignment, current code breaks on GCC's -Wcast-align checks on casts from narrower to wider types. This patch introduces new unaligned_uint(16|32|64)_t types, which correctly retain alignment in such cases. Strict alignment architectures will need to define CONFIG_RTE_ARCH_STRICT_ALIGN in order to effect these new types. Signed-off-by: Cyril Chemparathy <cchemparathy@ezchip.com> Acked-by: Olivier Matz <olivier.matz@6wind.com>
2015-06-23lib: remove extra parenthesis after returnFerruh Yigit
Remove extra parenthesis from return statements. Signed-off-by: Ferruh Yigit <ferruhy@gmail.com>
2015-06-02ip_frag: fix build with gcc 5.1Bruce Richardson
On Fedora 22, with GCC 5.1, errors are reported due to array accesses being potentially out of bounds. This commit fixes this by adding in an extra bounds check to the loop counter. Signed-off-by: Bruce Richardson <bruce.richardson@intel.com> Acked-by: Neil Horman <nhorman@tuxdriver.com>
2015-05-11ip_frag: remove inclusion of mbuf headerBruce Richardson
The ip_frag 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 <bruce.richardson@intel.com> Acked-by: Olivier Matz <olivier.matz@6wind.com>
2015-03-10tailq: remove unneeded inclusionsDavid Marchand
Only keep inclusion where really needed. Signed-off-by: David Marchand <david.marchand@6wind.com> Acked-by: Neil Horman <nhorman@tuxdriver.com>
2015-02-23mbuf: remove build option to disable refcntSergio Gonzalez Monroy
This patch removes all references to RTE_MBUF_REFCNT, setting the refcnt field in the mbuf struct permanently. Signed-off-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com> Acked-by: Olivier Matz <olivier.matz@6wind.com> Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2015-02-03mk: add library version extensionNeil Horman
To differentiate libraries that break ABI, we add a library version number suffix to the library, which must be incremented when a given libraries ABI is broken. This patch enforces that addition, sets the initial abi soname extension to 1 for each library and creates a symlink to the base SONAME so that the test applications will link properly. Signed-off-by: Neil Horman <nhorman@tuxdriver.com> Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>
2015-02-03lib: provide initial versioningNeil Horman
Add linker version script files to each DPDK library to put a stake in the ground from which we can start cleaning up API's Signed-off-by: Neil Horman <nhorman@tuxdriver.com> Acked-by: Sergio Gonzalez Monroy <sergio.gonzalez.monroy@intel.com>