The extended unified packet type is now part of the standard ABI.
As mbuf struct is changed, the mbuf library version is incremented.
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: Neil Horman <nhorman@tuxdriver.com>
Niantic HW expects Header Buffer Address in the RXD to be word aligned.
So, if mbuf's buf_physaddr is not word aligned then
RX path will not work properly.
Right now, in ixgbe PMD we always setup Packet Buffer Address(PBA) and
Header Buffer Address (HBA) to the same value:
buf_physaddr + RTE_PKTMBUF_HEADROOM.
As ixgbe PMD doesn't support split header feature anyway,
the issue can be fixed just by always setting HBA in the RXD to zero.
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
This patch adds management of PKT_RX_FDIR and PKT_RX_RSS_HASH ol_flags in
vPMD for unified packet type as well as for 16 bit field packet_type when
RTE_NEXT_ABI is not defined.
Signed-off-by: Tomasz Kulasek <tomaszx.kulasek@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
The check for split packets to be reassembled in the vector ixgbe PMD
was incorrectly only checking the first 16 elements of the array instead
of all 32. This is fixed by changing the uint32_t values to be uint64_t
instead.
Fixes: cf4b4708a8 ("ixgbe: improve slow-path perf with vector scattered Rx")
Reported-by: Zoltan Kiss <zoltan.kiss@linaro.org>
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
The vector/SSE pmd used a different element type for the tx queue sw_ring
entries. This led to lots of typecasts in the code which required specific
use of bracketing, leading to subtle errors.
For example, in the original code:
txe = (struct ixgbe_tx_entry_v *)&txq->sw_ring[i];
instead needs to be written as:
txe = &((struct ixgbe_tx_entry_v *)txq->sw_ring)[i];
We can eliminate this problem, by having two software ring pointers in the
structure for the two different element types.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
The function inside the vector/SSE poll-mode driver for releasing
the mbufs on the TX queues had the same name as another function
inside the regular PMD. To keep consistency and avoid confusion,
rename the vector PMD version to have a "_vec" suffix.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
The calculations of what mbufs were valid in the RX and TX queues were
incorrect when freeing the mbufs for the vector PMD. This led to crashes
due to invalid reference counts when mbuf debugging was turned on, and
possibly other more subtle problems (such as mbufs being freed when in use)
in other cases.
To fix this, the following changes were made:
* correct counts and post-loop values in the TX release function for the
vector code.
* create a new separate RX release function for the RX vector code, since the
tracking of what mbufs are valid or not is different for that code path
Fixes: c95584dc2b ("ixgbe: new vectorized functions for Rx/Tx")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
The bug fix was incorrect as it did not take account of the fact that
the mbufs that were previously freed may have since be re-allocated.
Reverts: b35d0d80f0 ("ixgbe: check mbuf refcnt when clearing a ring")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Signed-off-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
In order to unify the packet type, the field of 'packet_type' in
'struct rte_mbuf' needs to be extended from 16 to 32 bits.
Accordingly, some fields in 'struct rte_mbuf' are re-organized to support
this change for Vector PMD.
As 'struct rte_kni_mbuf' for KNI should be right mapped to
'struct rte_mbuf', it should be modified accordingly.
In ixgbe PMD driver, corresponding changes are added for the mbuf changes,
especially the bit masks of packet type for 'ol_flags' are replaced by
unified packet type. In addition, more packet types (UDP, TCP and SCTP)
are supported in vectorized ixgbe PMD.
To avoid breaking ABI compatibility, all the changes would be enabled by
RTE_NEXT_ABI.
Note that around 2% performance drop (64B) was observed of doing 4 ports
(1 port per 82599 card) IO forwarding on the same SNB core.
Signed-off-by: Helin Zhang <helin.zhang@intel.com>
Signed-off-by: Cunming Liang <cunming.liang@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
The function to clear the TX ring when a port was being closed, e.g. on
exit in testpmd, was not checking the mbuf refcnt before freeing it.
Since the function in the vector driver to clear the ring after TX does
not set the pointer to NULL post-free, this caused crashes if mbuf
debugging was turned on.
To reproduce the issue, ensure the follow config variables are set:
RTE_IXGBE_INC_VECTOR
RTE_LIBRTE_MBUF_DEBUG
Then compile up and run testpmd using 10G ports with the vector driver.
Start traffic and let some flow through, then type "stop" and "quit" at
the testpmd prompt, and crash will occur. Output below:
testpmd> quit
Stopping port 0...done
Stopping port 1...PANIC in rte_mbuf_sanity_check():
bad ref cnt
[New Thread 0x7fffabfff700 (LWP 145312)]
[New Thread 0x7fffb47fe700 (LWP 145311)]
[New Thread 0x7fffb4fff700 (LWP 145310)]
[New Thread 0x7ffff6cd5700 (LWP 145309)]
18: [/home/bruce/dpdk.org/x86_64-native-linuxapp-gcc/app/testpmd(_start+0x29)
<....snip for brevity...>
Program received signal SIGABRT, Aborted.
0x00007ffff7120a98 in raise () from /lib64/libc.so.6
A similar error occurs when clearing the RX ring, which is also fixed by
this patch.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
As well as the fast-path functions in the rxtx code, there are also
functions which set up and tear down the descriptor rings. Since these
are not performance critical functions, there is no need to have them
extensively optimized, so we add __attribute__((cold)) to their
definitions. This has the side-effect of making debugging them easier as
the compiler does not optimize them as heavily, so more variables are
accessible by default in gdb.
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
move ixgbe PMD to drivers/net directory.
As part of the move, we rename the ixgbe directory, containing the
ixgbe "base driver" code, from "ixgbe" to "base".
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: John McNamara <john.mcnamara@intel.com>
Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>