Commit Graph

2074 Commits

Author SHA1 Message Date
Wei Zhao
72c135a89f net/ixgbe: create consistent filter
This patch adds a function to create the flow directory filter.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:41:43 +01:00
Wei Zhao
11777435c7 net/ixgbe: parse flow director filter
check if the rule is a flow director rule, and get the flow director info.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:41:43 +01:00
Wei Zhao
99e7003831 net/ixgbe: parse L2 tunnel filter
check if the rule is a L2 tunnel rule, and get the L2 tunnel info.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:41:43 +01:00
Wei Zhao
429f6ebb42 net/ixgbe: parse TCP SYN filter
check if the rule is a TCP SYN rule, and get the SYN info.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:41:43 +01:00
Wei Zhao
eb3539fc85 net/ixgbe: parse ethertype filter
check if the rule is a ethertype rule, and get the ethertype info.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:41:43 +01:00
Wei Zhao
672be56d76 net/ixgbe: parse n-tuple filter
Add rule validate function and check if the rule is a n-tuple rule,
and get the n-tuple info.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:41:43 +01:00
Wei Zhao
62a65c2ef6 net/ixgbe: flush all the filters
Add support for flush all the filters in SW.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:41:43 +01:00
Wei Zhao
a42882591e net/ixgbe: store and restore L2 tunnel configuration
Add support for store and restore L2 tunnel filter in SW.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:41:43 +01:00
Wei Zhao
a30ef77052 net/ixgbe: restore L2 tunnel filter
Add support for restoring L2 tunnel filter in SW.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:41:43 +01:00
Wei Zhao
acd1d4dfa9 net/ixgbe: restore flow director filter
Add support for storing flow director filter in SW.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:41:43 +01:00
Wei Zhao
8b39890ab1 net/ixgbe: restore TCP SYN filter
Add support for restoring TCP SYN filter in SW.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:41:43 +01:00
Wei Zhao
a51f64eda3 net/ixgbe: restore ether type filter
Add support for restoring ether type filter in SW.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:41:43 +01:00
Wei Zhao
e6a410c268 net/ixgbe: restore n-tuple filter
Add support for restoring n-tuple filter in SW.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:41:43 +01:00
Wei Zhao
d0c0c416ef net/ixgbe: store L2 tunnel filter
Add support for storing L2 tunnel filter in SW.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:41:43 +01:00
Wei Zhao
080e3c0ee9 net/ixgbe: store flow director filter
Add support for storing flow director filter in SW.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:41:42 +01:00
Wei Zhao
6ae3bdab28 net/ixgbe: store TCP SYN filter
Add support for storing TCP SYN filter in SW.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:41:42 +01:00
Olivier Matz
6ffc32808d net/nfp: fix VLAN offload flags check
Fix typo when checking that no VLAN offload flags are passed at port
initialization.

By the way, also fix a typo in the log.

Fixes: d4a27a3b09 ("nfp: add basic features")

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Alejandro Lucero <alejandro.lucero@netronome.com>
2017-01-17 19:41:42 +01:00
Wei Dai
37f8f7e841 net/ixgbe/base: update shared code version to 2017.01.05
Update version of shared code to 2017-01-05 in README.

Signed-off-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:41:42 +01:00
Wei Dai
a85e378cc6 net/ixgbe/base: add debug traces
Add some traces in the reset_hw logic and semaphore acquisition logic
to help debugging.

Signed-off-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:41:42 +01:00
Wei Dai
96dae4644a 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.

Signed-off-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:41:42 +01:00
Wei Dai
18f5a572d8 net/ixgbe/base: support Marvell 1000BASE-T PHYs
Add initial support for Marvell 1000BASE-T PHYs on some X550 platforms.

Firmware owns the link config for Marvell PHYs on these platforms,
software should not touch it.

Also these platforms are not capable of speeds lower than 1Gb.

Signed-off-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:41:42 +01:00
Wei Dai
37e7cb1e35 net/ixgbe/base: configure speeds for KR/KX backplane
Ensure that the advertised link speeds are configured for KR/KX
backplane on some new platform.

Without this patch the link remains at 1G when resuming from low power
after being downshifted by LPLU (Low Power Link Up).

This patch ensures that the advertised speeds are not changed for
2.5G configurations.

Signed-off-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:41:42 +01:00
Wei Dai
fff3eeb0a6 net/ixgbe/base: remove a compiler warning
Remove warning for "mac->led_link_act = i" where led_link_act is u8.

Signed-off-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:41:42 +01:00
Wei Dai
8bead349c6 net/ixgbe/base: support XFI backplane for X550
Add initial support for a XFI backplane interface on some new platforms.

The XFI backplane requires a custom tuned link. Hardware/Firmware owns
the link config for XF backplane and software must not interfere.

Signed-off-by: Wei Dai <wei.dai@intel.com>
2017-01-17 19:41:42 +01:00
Bernard Iremonger
21e5e138cd net/ixgbe: fix API parameter checking
Add checks to rte_pmd_ixgbe_* API's to ensure that the port
is an ixgbe port.

Fixes: 49e248223e ("net/ixgbe: add API for VF management")

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-01-17 19:41:42 +01:00
John Daley
9d0fe07b4e net/enic: remove unnecessary function parameter attributes
Remove __rte_unused attributes in function declaration when
the parameters really are used.

Fixes: dfbd6a9cb5 ("net/enic: extend flow director support for 1300 series")

Signed-off-by: John Daley <johndale@cisco.com>
2017-01-17 19:41:42 +01:00
John Daley
453d15059b net/enic: use new Rx checksum flags
Use the new L3 and L4 ..CKSUM_GOOD  and ..CKSUM_UNKNOWN flags to
distinguish good checksums from unknown ones.

Signed-off-by: John Daley <johndale@cisco.com>
2017-01-17 19:41:42 +01:00
Michał Mirosław
6a0076431f net/i40e: improve message grep-ability
Join message lines for easier grepping.
PRIxXX are left glued to strings as they are in other parts of the file.

Signed-off-by: Michał Mirosław <michal.miroslaw@atendesoftware.pl>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-01-17 19:41:42 +01:00
Michał Mirosław
d75547718c net/i40e: return errno when interrupt setup fails
Signed-off-by: Michał Mirosław <michal.miroslaw@atendesoftware.pl>
Reviewed-by: Jingjing Wu <jingjing.wu@intel.com>
2017-01-17 19:41:42 +01:00
John Daley
026afc76b0 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.

Signed-off-by: John Daley <johndale@cisco.com>
2017-01-17 19:41:42 +01:00
Wenzhuo Lu
0bc9f022a1 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: fe3a45fd41 ("ixgbe: add VMDq support")

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
2017-01-17 19:41:42 +01:00
Yong Wang
4ce5a5d2f1 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>
2017-01-17 19:41:42 +01:00
Chenghu Yao
6560081388 net/i40e: fix segment number in reassemble process
When freeing up last mbuf, start->nb_segs should be decremented
by one. See also ixgbe process.

Fixes: 0e0da28cd8 ("i40e: add vector scatter Rx")

Signed-off-by: Chenghu Yao <yao.chenghu@zte.com.cn>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-01-17 19:41:42 +01:00
Timmons C. Player
5d16a43c40 net/af_packet: fix fd use after free
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: 364e08f2bb ("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>
2017-01-17 19:41:42 +01:00
Ajit Khaparde
1f4a84672e net/bnxt: support new PCI IDs
Add support for PCI IDs which was removed as a part of
commit 0e7bd0b2d6 ("net/bnxt: remove support for few devices")

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2017-01-17 19:41:42 +01:00
Ilya Maximets
2652a9fb21 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.

Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2017-01-17 19:41:42 +01:00
Ilya Maximets
3d053e3538 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.

Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2017-01-17 19:41:42 +01:00
Yongseok Koh
528a9fbec6 net/mlx5: support ConnectX-5 devices
Add PCI device ID for ConnectX-5 and enable multi-packet send for PF and VF
along with changing documentation and release note.

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2017-01-17 19:41:42 +01:00
Rasesh Mody
61a8429ffd net/qede: change few log levels
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-01-17 19:40:54 +01:00
Rasesh Mody
06e83c4e9f net/qede: fix per queue statisitics
If value of number of rxq/txq is different than
RTE_ETHDEV_QUEUE_STAT_CNTRS, limit per queue
stats/xstats to minimum of the two.

Fixes: 7634c5f915 ("net/qede: add queue statistics")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-01-17 19:40:54 +01:00
Harish Patil
9dd9cb4274 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: f1e4b6c0ac ("net/qede: fix status block index for VF queues")

Signed-off-by: Harish Patil <harish.patil@qlogic.com>
2017-01-17 19:40:54 +01:00
Harish Patil
f6033f2497 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

Fixes: bec0228816 ("net/qede: support scatter gather")
Fixes: 2ea6f76aff ("qede: add core driver")

Signed-off-by: Harish Patil <harish.patil@qlogic.com>
2017-01-17 19:40:54 +01:00
Harish Patil
54ecae2e19 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: bec0228816 ("net/qede: support scatter gather")

Signed-off-by: Harish Patil <harish.patil@qlogic.com>
2017-01-17 19:40:54 +01:00
Beilei Xing
14c66a451e net/i40e: flush tunnel filters
This patch adds i40e_flow_flush_tunnel_filter
function to flush all tunnel filters, including
filters in SW and HW.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2017-01-17 19:40:54 +01:00
Beilei Xing
e27f527733 net/i40e: flush ethertype filters
This patch adds i40e_flow_flush_ethertype_filter
function to flush all ethertype filters, including
filters in SW and HW.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2017-01-17 19:40:54 +01:00
Beilei Xing
b0ea2716e0 net/i40e: add flow flush function
This patch adds i40e_flow_flush function to flush all
filters for users. And flow director flush function
is involved first.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2017-01-17 19:40:54 +01:00
Beilei Xing
c41aca973b net/i40e: destroy flow directory filter
This patch supports destroying a flow directory filter
for users.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2017-01-17 19:40:54 +01:00
Beilei Xing
ea07aec84e net/i40e: destroy tunnel filter
This patch adds i40e_flow_destroy_tunnel_filter
function to destroy a tunnel filter for users.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2017-01-17 19:40:54 +01:00
Beilei Xing
4b373b698a net/i40e: destroy ethertype filter
This patch adds i40e_flow_destroy_ethertype_filter
function to destroy a ethertype filter for users.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2017-01-17 19:40:54 +01:00
Beilei Xing
1c51b894d7 net/i40e: add flow destroy function
This patch adds i40e_flow_destroy function to destroy
a flow for users.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2017-01-17 19:40:54 +01:00