Mellanox PMDs do not differentiate IP header with or without options, so
the advertised packet type for an IPv4 should not be RTE_PTYPE_L3_IPV4,
which explicitly means "does not contain any header option".
Change the driver to set
RTE_PTYPE(_INNER)_L3_IPV4_EXT_UNKNOWN or
RTE_PTYPE(_INNER)_L3_IPV6_EXT_UNKNOWN flags for all IPv4/IPv6 packets
received.
Fixes: 429df3803a16 ("mlx4: replace some offload flags with packet type") Fixes: 67fa62bc672d ("mlx5: support checksum offload") Signed-off-by: Samuel Gauthier <samuel.gauthier@6wind.com> Signed-off-by: Matthieu Ternisien d'Ouville <matthieu.tdo@6wind.com> Signed-off-by: Olivier Matz <olivier.matz@6wind.com> Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Retrieving link status information through the link update callback should
be quick and non-blocking.
Mellanox PMDs retrieve this information through ioctl() calls on the
related kernel netdevice. This appears to take a long time to
complete and may cause significant slowdowns in applications.
While these system calls cannot be accelerated, removing the lock on the
private structure allows applications to perform other control operations
from separate threads in the meantime. This function remains safe without
locking as it does not write the private structure, it is only used to
retrieve the name of the netdevice.
Chas Williams [Thu, 5 Jan 2017 13:53:44 +0000 (08:53 -0500)]
net/af_packet: support 802.1Q VLAN
AF_PACKET has some flags to check on the receive side for 802.1Q
information. If present, we copy into the mbuf. For transmit, we
insert any 802.1Q information into the packet before copying to the ring.
Signed-off-by: Chas Williams <ciwillia@brocade.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Emmanuel Roullit [Sun, 15 Jan 2017 19:50:37 +0000 (20:50 +0100)]
net/cxgbe: fix parenthesis on bitwise operation
clang reports the following error:
error: logical not is only applied to the left hand side of this bitwise
operator. [-Werror,-Wlogical-not-parentheses]
Wei Dai [Thu, 12 Jan 2017 14:53:29 +0000 (22:53 +0800)]
net/ixgbe/base: use clause 22 MDIO functions for Marvell PHYs
Set the MDIO (Management Data Input/Output Interface) read/write
function pointers for Marvell PHYs on some X550 platforms to use
the clause 22 functions. Marvell PHYs do not support clause 45.
John Daley [Mon, 9 Jan 2017 23:04:28 +0000 (15:04 -0800)]
net/enic: support TSO
The enic TSO implementation requires that the length of the Eth/IP/TCP
headers be passed to the NIC. Other than that, it's just a matter of
setting the mss and offload mode on a per packet basis.
In TSO mode, IP and TCP checksums are offloaded even if not requested
with mb->ol_flags.
Wenzhuo Lu [Tue, 10 Jan 2017 02:19:11 +0000 (10:19 +0800)]
net/ixgbe: fix VMDq function name
The function name ixgbe_vmdq_mode_check is not right.
This function checks if Virtualization Technology is
enabled. It's for both VMDq and IOV.
Others may be misled by the current name.
Fixes: fe3a45fd4104 ("ixgbe: add VMDq support") Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com> Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
Yong Wang [Mon, 9 Jan 2017 13:48:52 +0000 (08:48 -0500)]
net/i40e: remove redundant statement and braces
In function "reassemble_packets()", the statement "end = secondlast;"
is redundant since there is another assignment "start = end = NULL;"
3 lines below. BTW, I removed the redundant braces in the conditional
statement "if (end->data_len > rxq->crc_len)".
Signed-off-by: Yong Wang <wang.yong19@zte.com.cn> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
When using the same file descriptor for both rx and tx, the
eth_dev_stop function would close the same fd twice. This
change prevents that from happening.
Fixes: 364e08f2bbc0 ("af_packet: add PMD for AF_PACKET-based virtual devices") Signed-off-by: Timmons C. Player <timmons.player@spirent.com> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Ilya Maximets [Wed, 19 Oct 2016 14:07:17 +0000 (17:07 +0300)]
net/ixgbe: allow bulk alloc for the max size desc ring
The only reason why bulk alloc disabled for the rings with
more than (IXGBE_MAX_RING_DESC - RTE_PMD_IXGBE_RX_MAX_BURST)
descriptors is the possible out-of-bound access to the dma
memory. But it's the artificial limit and can be easily
avoided by allocating of RTE_PMD_IXGBE_RX_MAX_BURST more
descriptors in memory. This will not interfere the HW and,
as soon as all rings' memory zeroized, Rx functions will
work correctly.
This change allows to use vectorized Rx functions with
4096 descriptors in Rx ring which is important to achieve
zero packet drop rate in high-load installations.
Ilya Maximets [Wed, 19 Oct 2016 14:07:16 +0000 (17:07 +0300)]
net/i40e: allow bulk alloc for the max size desc ring
The only reason why bulk alloc disabled for the rings with
more than (I40E_MAX_RING_DESC - RTE_PMD_I40E_RX_MAX_BURST)
descriptors is the possible out-of-bound access to the dma
memory. But it's the artificial limit and can be easily
avoided by allocating of RTE_PMD_I40E_RX_MAX_BURST more
descriptors in memory. This will not interfere the HW and,
as soon as all rings' memory zeroized, Rx functions will
work correctly.
This change allows to use vectorized Rx functions with
4096 descriptors in Rx ring which is important to achieve
zero packet drop rate in high-load installations.
Harish Patil [Fri, 6 Jan 2017 08:16:47 +0000 (00:16 -0800)]
net/qede: fix PF fastpath status block index
Allocate double the number of fastpath status block index
since the PF RX/TX queues are not sharing the status block.
This is an interim solution till other parts of the code
is modified to handle the same.
Fixes: f1e4b6c0acee ("net/qede: fix status block index for VF queues") Signed-off-by: Harish Patil <harish.patil@qlogic.com>
Harish Patil [Fri, 6 Jan 2017 08:16:46 +0000 (00:16 -0800)]
net/qede: fix minimum buffer size and scatter Rx check
- Fix minimum RX buffer size to 1024B
- Force enable scatter/gather mode if given RX buf size is lesser than MTU
- Adjust RX buffer size to cache-line size with overhead included
Harish Patil [Fri, 6 Jan 2017 08:16:45 +0000 (00:16 -0800)]
net/qede: fix scatter-gather
- Make qede_process_sg_pkts() inline and add unlikely check
- Fix mbuf segment chaining logic in qede_process_sg_pkts()
- Change qede_encode_sg_bd() to return total segments required
- Fix first TX buffer descriptor's length
- Replace repetitive code using a macro
Fixes: bec0228816c0 ("net/qede: support scatter gather") Signed-off-by: Harish Patil <harish.patil@qlogic.com>
Beilei Xing [Fri, 6 Jan 2017 05:27:12 +0000 (13:27 +0800)]
net/i40e: add flow create function
This patch adds i40e_flow_create function to create a
rule. It will check if a flow matches ethertype filter
or flow director filter or tunnel filter, if the flow
matches some kind of filter, then set the filter to HW.
Beilei Xing [Fri, 6 Jan 2017 05:27:11 +0000 (13:27 +0800)]
net/i40e: parse tunnel filter
This patch adds i40e_flow_parse_tunnel_filter to check
if a rule is a tunnel rule according to items of the
flow pattern, and the function also gets the tunnel info.
Beilei Xing [Fri, 6 Jan 2017 05:27:10 +0000 (13:27 +0800)]
net/i40e: parse flow director filter
This patch adds i40e_flow_parse_fdir_filter to check
if a rule is a flow director rule according to the
flow pattern, and the function also gets the flow
director info.
Beilei Xing [Fri, 6 Jan 2017 05:27:09 +0000 (13:27 +0800)]
net/i40e: add flow validate function
This patch adds i40e_flow_validation function to check if
a flow is valid according to the flow pattern.
i40e_flow_parse_ethertype_filter is added first, it also
gets the ethertype info.
i40e_flow.c is added to handle all generic filter events.
Beilei Xing [Fri, 6 Jan 2017 05:27:06 +0000 (13:27 +0800)]
net/i40e: restore ethertype filter
Add support of restoring ethertype filter in case filter
dropped accidentally, as all filters need to be added and
removed by user obviously for generic filter API.
Beilei Xing [Fri, 6 Jan 2017 05:27:05 +0000 (13:27 +0800)]
net/i40e: store flow director filter
Currently there's no flow director filter stored in SW. This
patch stores flow director filters in SW with cuckoo hash,
also adds protection if a flow director filter has been added.
Beilei Xing [Fri, 6 Jan 2017 05:27:04 +0000 (13:27 +0800)]
net/i40e: store tunnel filter
Currently there's no tunnel filter stored in SW.
This patch stores tunnel filter in SW with cuckoo
hash, also adds protection if a tunnel filter has
been added.
Beilei Xing [Fri, 6 Jan 2017 05:27:03 +0000 (13:27 +0800)]
net/i40e: store ethertype filter
Currently there's no ethertype filter stored in SW.
This patch stores ethertype filter with cuckoo hash
in SW, also adds protection if an ethertype filter
has been added.
Rasesh Mody [Thu, 5 Jan 2017 07:04:07 +0000 (23:04 -0800)]
net/qede/base: dcbx changes for base driver
This patch includes changes for DCBX like:
- Return empty parameters for oper-params query when negotiation is not
complete
- Use the ieee specific mask value for reading the ethtype value in the
ieee dcbx mode
- Endian-ness conversion is not needed for priority<->TC field, as the
data is already being read/written by ecore in the bigendian way
- While writing the ets config, base driver incorrectly merges the input
values with the operational values. The values should be either set
or unset
- CEE selection field must be set regardless CEE/IEEE mode
- Fail the dcbx query for VF interfaces
- Semantic changes
Rasesh Mody [Thu, 5 Jan 2017 07:04:04 +0000 (23:04 -0800)]
net/qede/base: add support for new firmware
Add support for 8.14.x.x firmware.
The new firmware adds support for external PHY BCM8485x; configures
fixed link speed with transceiver/cable not supporting negotiation;
supports engine swap; supports overriding PCIe preset equalization
value; checks pause too long for ports and reads die temperature
every second for shutdown threshold.
It includes change in FLR flow when there is a SW initiated FLR.
Rasesh Mody [Thu, 5 Jan 2017 07:03:59 +0000 (23:03 -0800)]
net/qede/base: retrieve FW crash dump info
As part of device probe, check if management FW crash dump logs are
available. If available, then log an warning message and update the
epoch value too. A new struct ecore_mdump_info is added to populate
dump info including the new "reason" field by reading shared memory
region.
Rasesh Mody [Thu, 5 Jan 2017 07:03:51 +0000 (23:03 -0800)]
net/qede/base: improve Tx-switching performance
In order to improve Tx switching performance an additional HSI parameter
called same-as-last-id is introduced. This resource allows FW caching the
txqs packet properties. Driver needs to set same-as-last-id to be equal to
the qzone.