Commit Graph

9343 Commits

Author SHA1 Message Date
Jingjing Wu
cfd662d22e net/i40e: fix interrupt throttling setting in PF
As no matter the PF host driver is DPDK or other kernel drivers,
they are sharing the same virtchnnl interfaces to communicate to VFs.
To follow the generic interface, DPDK PF need to set Interrupt
Throttling (ITR) index according to the rxitr_idx from virtchnnl
instead of ITR_NONE.

Fixes: 6d59e4ea74 ("net/i40e: change version number to support Linux VF")
Cc: stable@dpdk.org

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
2017-10-06 02:49:47 +02:00
Beilei Xing
975ffea6f6 net/i40e: remove DPDK PF version specific code
This patch removes unused code related to DPDK PF version.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
2017-10-06 02:49:47 +02:00
Beilei Xing
4c7213beca net/i40e: remove virtual channel command for VSI queue
This patch removes specific virtual channel command
VIRTCHNL_OP_CONFIG_VSI_QUEUES_EXT.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
2017-10-06 02:49:47 +02:00
Beilei Xing
28be95598b net/i40e: remove virtual channel command for VLAN pvid
Since there's no specific version number to distinguish
DPDK PF and Linux kernel PF, DPDK VF won't recognize if
host is DPDK PF or kernel PF. The specific virtual channel
commands for DPDK pf can be deleted.
This patch removes I40E_VIRTCHNL_OP_CFG_VLAN_PVID.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
2017-10-06 02:49:47 +02:00
Matan Azrad
852be6520b net/failsafe: fix parameters parsing
The corrupted code used wrongly snprintf return value as the
number of characters actually copied, in spite of the meaning
is the number of characters which would be generated for the
given input.

It caused to remain zerod bytes between the failsafe command line
non sub device parameters indicates end of string.

Hence, when rte_kvargs_parse tried to parse all parameters, it
got end of string after the first one and the others weren't parsed.

So, if the mac parameters was the first in command line it was
taken while hotplug_poll was left default, and vice versa.

The fix updates the buffer index by dedicated variable contains
the copy size, by the way validates the comma separation.

Fixes: a46f8d584e ("net/failsafe: add fail-safe PMD")
Cc: stable@dpdk.org

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
2017-10-06 02:49:47 +02:00
Shahaf Shuler
9f9bebae55 net/mlx5: don't map doorbell register to write combining
By default, Verbs maps the doorbell register to write combining.
Working with write combining is useful for drivers which use blue flame
for the doorbell write.

Since mlx5 PMD uses only doorbells and write combining mapping requires
an extra memory barrier to flush the doorbell after its write, setting
the mapping to un-cached by default.

Such change is expected to reduce the max and average round trip latency.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Signed-off-by: Alexander Solganik <solganik@gmail.com>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
2017-10-06 02:49:47 +02:00
Shahaf Shuler
f9fbd2b3ad net/mlx5: replace memory barrier type
The reason for the requirement of a barrier between the txq writes
and the doorbell record writes is to avoid a case where the device
reads the doorbell record's new value before the txq writes are flushed
to memory.

The current use of rte_wmb is not necessary, and can be replaced by
rte_io_wmb which is more relaxed.

Replacing the rte_wmb is also expected to improve the throughput.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Signed-off-by: Alexander Solganik <solganik@gmail.com>
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
2017-10-06 02:49:47 +02:00
RongQiang Xie
ef86e67ad5 net/qede: fix possible null pointer dereference
In function qede_rss_reta_update(), the pointer params returned from
call to function rte_zmalloc() may be NULL and will be dereferenced.
So, should judge if the params is NULL or not.

Fixes: 8b3ee85efe ("net/qede: fix RSS table entries for 100G adapter")
Cc: stable@dpdk.org

Signed-off-by: RongQiang Xie <xie.rongqiang@zte.com.cn>
Acked-by: Harish Patil <harish.patil@cavium.com>
2017-10-06 02:49:47 +02:00
Gaetan Rivet
495ca7888a net/failsafe: safer subdev iterator
The sub_device iterator macro should follow the general gist of the
tailq API for an easier understanding and safer use.

Once the loop has finished, the iterator should be set to NULL.
If no sub_device was iterated upon, the iterator should still be NULL.

Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
2017-10-06 02:49:47 +02:00
RongQiang Xie
7f4a1aa143 net/enic: fix possible null pointer dereference
In enic_alloc_consistent() function, if rte_malloc for mze is failed,
!mze is true, memzone should be freed and function should return NULL.

Fixes: da5f560be9 ("net/enic: fix memory freeing")
Cc: stable@dpdk.org

Signed-off-by: RongQiang Xie <xie.rongqiang@zte.com.cn>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-10-06 02:49:47 +02:00
Shahaf Shuler
c771499209 net/mlx5: extend debug logs verbosity
Extend debug logs verbosity by printing the full completion with error
along with the entire txq in case of error. For the Rx case no logs were
added since such errors are counted and recovered by the Rx data path.

Such prints are essential to understand the root cause for the error.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Signed-off-by: Xueming Li <xuemingl@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
2017-10-06 02:49:47 +02:00
Wenzhuo Lu
5f866488dd app/testpmd: fix wrong API of adding VF MAC
When adding a VF MAC address, rte_eth_dev_mac_addr_add is called.
It's not right, because this API is used to add a MAC address for
a VMDq pool not a VF. Although it can work on ixgbe as VMDq pool
and VF mean the same thing on ixgbe.

Fixes: 7741e4cf16 ("app/testpmd: VMDq and DCB updates")

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-10-06 02:49:47 +02:00
Wenzhuo Lu
8f5dbd4ed9 net/i40e: new API to add VF MAC address from PF
Currently, rte_eth_dev_mac_addr_add is used by a testpmd CLI
to add a MAC address for VF. But the parameter 'pool' of this
API means the VMDq pool, not VF.
So, it's wrong to use it to add the VF MAC address.

This patch provides a new API that can be used to
add VF MAC address on i40e.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-10-06 02:49:47 +02:00
Matan Azrad
b5743da31e net/mlx5: fix locking in xstats functions
The corrupted code didn't unlock the spinlock in xstats
get and reset functions error flow.

Hence, if these errors happened, the device spinlock was
left locked and many mlx5 device functionalities were blocked.

The fix unlocks the spinlock in the missed places.

Fixes: e62bc9e706 ("net/mlx5: fix extended statistics")
Cc: stable@dpdk.org

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
2017-10-06 02:49:47 +02:00
RongQiang Xie
c4e9863c4d net/ixgbe: check memory allocation result
In the function ixgbe_flow_create(), the value ntuple_filter_ptr,
ethertype_filter_ptr, syn_filter_ptr, fdir_rule_ptr and l2_tn_filter_ptr
use rte_zmalloc().

malloc may return NULL, so we should check if the return value is NULL
or success.

Signed-off-by: RongQiang Xie <xie.rongqiang@zte.com.cn>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-10-06 02:49:47 +02:00
Wei Dai
a8e54b4451 net/ixgbe: fix mapping of user priority to TC
This patch fixes the mapping of user priority to traffic class
in Rx/Tx path of DCB configuration. Each DCB traffic class
should include all user priorities mapping to it in both Rx and
Tx path.

Fixes: 0807f80d35 ("ixgbe: DCB / flow control")
Cc: stable@dpdk.org

Signed-off-by: Wei Dai <wei.dai@intel.com>
2017-10-06 02:49:47 +02:00
Nélio Laranjeiro
0245de1a25 net/mlx5: remove old MLNX OFED 3.3 verification
This version of MLNX_OFED is no more supported.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2017-10-06 02:49:47 +02:00
Nélio Laranjeiro
50dc413aa3 net/mlx5: remove multiple drop RSS queues
Since MLNX_OFED 4.1 this code is no more useful.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2017-10-06 02:49:47 +02:00
Nélio Laranjeiro
6096a4603d net/mlx5: fix non working secondary process by removing it
Secondary process is a copy/paste of the mlx4 drivers, it was never
tested and it even segfault at the secondary process start in the
mlx5_pci_probe().

This makes more sense to wipe this non working feature to re-write a
working and functional version.

Fixes: a48deada65 ("mlx5: allow operation in secondary processes")

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2017-10-06 02:49:47 +02:00
Nélio Laranjeiro
d052f5358b net/mlx5: remove pedantic pragma
Those are useless since DPDK headers have been cleaned up.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2017-10-06 02:49:47 +02:00
Nélio Laranjeiro
7618b7e643 net/mlx5: remove flow drop useless if branches
Those two if statements are useless as there is a verification on the drop
field of the flow to jump to the end of the function just above.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
2017-10-06 02:49:47 +02:00
Nélio Laranjeiro
2dc76e40ef net/mlx5: cleanup Rx ring in free functions
Vector PMD returns buffers to the application without setting the pointers
in the Rx queue to null nor allocating them.  When the PMD cleanup the ring
it needs to take a special care to those pointers to not free the mbufs
before the application have used them nor if the application have already
freed them.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
2017-10-06 02:49:47 +02:00
Nélio Laranjeiro
301271bc16 net/mlx5: prepare vector Rx ring at setup time
To use the vector, it needs to add to the PMD Rx mbuf ring four extra mbuf
to avoid memory corruption.  This additional mbuf are added on dev_start()
whereas all other mbuf are allocated on queue setup.

This patch brings this allocation back to the same place as other mbuf
allocation.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
2017-10-06 02:49:47 +02:00
Nélio Laranjeiro
5e8494c3ae net/mlx5: avoid reusing old queue's mbuf on reconfigure
This patch prepare the merge of fake mbuf allocation needed by the vector
code with rxq_alloc_elts() where all mbuf of the queues should be
allocated.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
2017-10-06 02:49:47 +02:00
Alejandro Lucero
1d5d4ab903 net/nfp: support new firmware medatada API
We need to support how firmware metadata was handled until now and also
the new API, since NFP NFD 3.0 firmware versions. The new metadata API
adds flexibility for working with different metadata types and, mainly,
to allow adding metadata from different firmware components independently.

Although this patch just supports one type handled by the PMD, future uses
regarding firmware apps will extend this support.

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
2017-10-06 02:49:47 +02:00
Alejandro Lucero
f78f0e64f7 net/nfp: handle packets with length 0 as usual ones
A DPDK app could, whatever the reason, send packets with size 0.
The PMD is not sending those packets, which does make sense,
but the problem is the mbuf is not released either. That leads
to mbufs not being available, because the app trusts the
PMD will do it.

Although this is a problem related to app wrong behavior, we
should harden the PMD in this regard. Not sending a packet with
size 0 could be problematic, needing special handling inside the
PMD xmit function. It could be a burst of those packets, which can
be easily handled, but it could also be a single packet in a burst,
what is harder to handle.

It would be simpler to just send that kind of packets, which will
likely be dropped by the hw at some point. The main problem is how
the fw/hw handles the DMA, because a dma read to a hypothetical 0x0
address could trigger an IOMMU error. It turns out, it is safe to
send a descriptor with packet size 0 to the hardware: the DMA never
happens, from the PCIe point of view.

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
2017-10-06 02:49:47 +02:00
Wei Dai
2ce718e809 net/ixgbe: add VLAN info in queue info msg to VF
This patch is to align with PF kernel driver version 5.1.3 to add the
number of queues to transmit VLAN packets in msg of queue info to VF.

If DCB is enabled, it is the number of DCB traffic classes.
If DCB is not enabled and default VLAN is enabled, it is 1.
For other cases, it is 0.

Signed-off-by: Wei Dai <wei.dai@intel.com>
2017-10-06 02:49:47 +02:00
Shijith Thotton
9ed3f38770 net/liquidio: remove FLR request to PF driver
igb_uio and vfio-pci does pci reset during open and release of device.
So FLR request to LiquidIO PF driver during init and close in PMD is not
required.

See commit b58eedfc7d ("igb_uio: issue FLR during open and release of
device file")

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
2017-10-06 02:49:47 +02:00
Matan Azrad
d8d89966c9 net/failsafe: fix Tx sub device deactivating
The corrupted code couldn't recognize that all sub devices
were not ready for Tx traffic when failsafe PMD was trying
to switch device because of an unreachable condition using.

Hence, the current Tx sub device variable was not updated
correctly.

The fix removed the unreachable branch and added new one
in the right place respecting the original intent.

Fixes: ebea83f899 ("net/failsafe: add plug-in support")
Fixes: 598fb8aec6 ("net/failsafe: support device removal")
Cc: stable@dpdk.org

Signed-off-by: Matan Azrad <matan@mellanox.com>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
2017-10-06 02:49:47 +02:00
Yong Wang
e5857e1091 doc/failsafe: fix typos
Fixes: a46f8d584e ("net/failsafe: add fail-safe PMD")
Cc: stable@dpdk.org

Signed-off-by: Yong Wang <wang.yong19@zte.com.cn>
Acked-by: Gaetan Rivet <gaetan.rivet@6wind.com>
2017-10-06 02:49:47 +02:00
Xiaoyun Li
16048c4cb7 net/i40e: fix PF notify issue when VF is not up
This patch stops PF from sending message to VF when VF's admin queue
isn't enabled, namely VF isn't up.

Fixes: 4861cde461 ("i40e: new poll mode driver")
Cc: stable@dpdk.org

Signed-off-by: Xiaoyun Li <xiaoyun.li@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
2017-10-06 02:49:47 +02:00
Alejandro Lucero
7dcb19d78f net/nfp: fix Rx interrupt when multiqueue
intr_vec was not properly configured. This is not a problem when
just one queue is supported but it fails with multiqueue.

Some minor refactoring also done for hardware interrupt configuration.

Fixes: ea121b2831 ("net/nfp: add Rx interrupts")
Cc: stable@dpdk.org

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
2017-10-06 02:49:47 +02:00
Alejandro Lucero
e1102e36fa net/nfp: fix RSS
Redirection table was not being updated properly.
There is also a problem when configuring RSS.

Fixes: 934e4c60fb ("nfp: add RSS")
Cc: stable@dpdk.org

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
2017-10-06 02:49:47 +02:00
Alejandro Lucero
f08d93d4d8 net/nfp: write MAC address to configuration bar
If not a valid mac present in configuration bar, PMD creates a random
one. It needs to be passed to the NIC.

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
2017-10-06 02:49:47 +02:00
Qi Zhang
273dcde1c3 net/i40e: fix flow control watermark mismatch
Flow control watermark is not read out correctly,
that may cause an application who not intend to change
watermark but does change it with a rte_eth_dev_flow_ctrl_set
call right after rte_eth_dev_flow_ctrl_get.

The idea fix is, during init, the watermark is set with default value,
so it is not necessary to read out from hw register during flow_ctl_get,
But due to I40E_GLRPB_GHW limitation, it is shared by different ports on
the same device, it is possible the value is changed on another port,
but local variable not sync, so we have to read out register every
flow_ctl_get.

Fixes: f53577f069 ("i40e: support flow control")
Cc: stable@dpdk.org

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Kevin Traynor <ktraynor@redhat.com>
2017-10-06 02:49:47 +02:00
Daniel Mrzyglod
7f109dbac5 net/i40e: fix return code not checked
Calling i40e_vsi_delete_mac without checking return
value (as is done elsewhere 5 out of 6 times)

Coverity issue: 140735
Fixes: 43c89d5a4f ("net/i40e: set VF MAC from PF")

Signed-off-by: Daniel Mrzyglod <danielx.t.mrzyglod@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-10-06 02:49:47 +02:00
Wei Zhao
a2ba854ec6 net/ixgbe: fix MAC VLAN filter fail problem
Add a mode type check for MAC VLAN mode, if fdir is
in this mode, it do not need to do sanity check for x550.

Fixes: dc0c16105d ("ixgbe: fix X550 flow director check")
Cc: stable@dpdk.org

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
2017-10-06 02:49:47 +02:00
Ferruh Yigit
76f5f48c51 net/ark: remove empty header file
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Ed Czeck <ed.czeck@atomicrules.com>
2017-10-06 02:49:47 +02:00
Shreyansh Jain
16bbc98a3e bus/fslmc: update MC to 10.3.x
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-10-06 01:26:00 +02:00
Shreyansh Jain
828d51d8fc bus/fslmc: refactor scan and probe functions
Scan now searches for devices through sysfs interface and adds them
to a list for later initialization. During probe, each device is
initialized accroding to its property.

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Reviewed-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-10-06 01:08:58 +02:00
Shreyansh Jain
10f1614f36 drivers: refactor DPAA2 object definition
Initially, DPAA2 objects (except ETH and CRYPTO) were defined from VFIO
layer. This patch moves that into Bus definition.
This patch also realigns the object types with the new device types.

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Reviewed-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-10-06 01:08:46 +02:00
Shreyansh Jain
bad555df14 net/dpaa2: update driver type field
Shifting from existing device identifier to driver type field.

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Reviewed-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-10-06 01:08:40 +02:00
Shreyansh Jain
b0ed9e329b crypto/dpaa2_sec: update driver type field
Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Reviewed-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-10-06 01:08:33 +02:00
Shreyansh Jain
bd8e994ef3 bus/fslmc: introduce new device type enumerator
Existing devices and drivers depended on device ID rather than type.
A new enumerator for all DPAA2 devices is introduced in this patch.

At this point, the probe would not be able to link DPAA2 devices
with the driver and I/O would not work. Subsequent patches will
fix this.

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Reviewed-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-10-06 01:08:23 +02:00
Shreyansh Jain
c1b1b9b902 bus/fslmc: support only single group and container
Currently DPAA2 code doesn't support multiple groups and containers.
Remove such provision in code to simplify code.

Signed-off-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Reviewed-by: Santosh Shukla <santosh.shukla@caviumnetworks.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-10-06 01:07:48 +02:00
Lukasz Majczak
1e0a17ac4c eal: fix auxv open check for ARM and PPC
The assertion of return value from the open() function is done against
0, while it is a correct value - open() returns -1 in case of an error.
It causes problems while trying to run as a daemon, in which case, this
call to open() will return 0 as a valid descriptor.

Fixes: b94e5c9406 ("eal/arm: add CPU flags for ARMv7")
Fixes: 97523f822b ("eal/arm: add CPU flags for ARMv8")
Fixes: 9ae1553856 ("eal/ppc: cpu flag checks for IBM Power")
Cc: stable@dpdk.org

Signed-off-by: Lukasz Majczak <lma@semihalf.com>
Acked-by: Jan Viktorin <viktorin@rehivetech.com>
Acked-by: Chao Zhu <chaozhu@linux.vnet.ibm.com>
2017-10-06 00:15:43 +02:00
Bruce Richardson
016c32bd3e eal: cleanup strerror function
When compiled on Ubuntu with extra warnings enabled, the rte_strerror()
function triggered a warning about an unused return value from
strerror_r(). Rather than always have this warning disabled, we fix this,
and in the process do some cleanup of the code so as to reduce the
complexity of the fix, e.g. not having the #ifdef macros inside the
snprintf call.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Harry van Haaren <harry.van.haaren@intel.com>
2017-10-05 23:54:39 +02:00
Kuba Kozak
96128b365e vfio: fix close unchecked file descriptor
Add file descriptor value check before calling close() function.

Coverity issue: 141297
Fixes: 811b6b2506 ("vfio: fix file descriptor leak in multi-process")
Cc: stable@dpdk.org

Signed-off-by: Kuba Kozak <kubax.kozak@intel.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Patrick MacArthur <patrick@patrickmacarthur.net>
2017-10-05 23:41:42 +02:00
Chas Williams
0c57f40e66 hash: document jhash boundary behavior
Due to the uint32_t accesses in the hash computation, keys that aren't
aligned to a uint32_t boundary or multiples of uint32_t in length, may
see accesses beyond the end of the key.  This may cross a page boundary.

Signed-off-by: Chas Williams <chas3@att.com>
Acked-by: Luca Boccassi <bluca@debian.org>
Acked-by: John McNamara <john.mcnamara@intel.com>
2017-10-05 23:37:52 +02:00
Olivier Matz
b081c1dd2e net: fix inner L2 length in packet type parser
The inner L2 length returned by rte_net_get_ptype() is not
properly initialized. If the caller does not zero the header
lengths structure, the inner_l2 field will be undefined.

Fix it by initializing inner_l2 to 0 when parsing a inner layer.

Fixes: 2c15c5377d ("net: support NVGRE in software packet type parser")
Cc: stable@dpdk.org

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
2017-10-05 23:34:45 +02:00