Commit Graph

3138 Commits

Author SHA1 Message Date
Qi Zhang
0601d85d90 net/ixgbe: remove redundant code
Remove redundant code.
item->type != RTE_FLOW_ITEM_TYPE_END already cover
item->type == RTE_FLOW_ITEM_TYPE_VLAN.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-06-12 10:41:27 +01:00
Beilei Xing
7cf5491b7b net/i40e: update actions for FDIR
This commit adds support of FLAG action and PASSTHRU
action for flow director.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2017-06-12 10:41:27 +01:00
Radu Nicolau
e261265e42 ethdev: move bypass functions to ixgbe PMD
Move all bypass functions to ixgbe pmd and remove function
pointers from the eth_dev_ops struct.

Signed-off-by: Radu Nicolau <radu.nicolau@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-06-12 10:41:27 +01:00
Wei Zhao
760110abd6 net/igb: fix checksum valid flags
To enable L4 checksum offload for SCTP packets, E1000_RXCSUM_CRCOFL
should be set.

Otherwise, for SCTP packets even L4 checksum not calculated, it will
return PKT_RX_L4_CKSUM_GOOD.

Fixes: af75078fec ("first public release")

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-06-12 10:41:27 +01:00
Yongseok Koh
c80711c3fb net/mlx5: fix redundant free of Tx buffer
SW completion ring of Tx (txq->elts) stores individual mbufs even if a
multi-segmented packet is sent. rte_pktmbuf_free_seg() must be used when
cleaning up the completion ring. Otherwise, chained mbufs are redundantly
freed and finally it would cause a crash.

Fixes: 1d88ba1719 ("net/mlx5: refactor Tx data path")
CC: stable@dpdk.org

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
2017-06-12 10:41:27 +01:00
Yongseok Koh
70aee77ec6 net/mlx5: fix exception handling
A sanity check is required in priv_fdir_disable(). If resizing Rx queue
fails, this can cause a crash by referencing a NULL pointer.

Fixes: 76f5c99e68 ("mlx5: support flow director")
Fixes: 0cdddf4d06 ("net/mlx5: split Rx queue structure")
Cc: stable@dpdk.org

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2017-06-12 10:41:27 +01:00
Andrew Rybchenko
21233dd6c7 net/sfc: rely on one desc is one mbuf in simple EF10 Tx reap
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Reviewed-by: David Riddoch <driddoch@solarflare.com>
2017-06-12 10:41:27 +01:00
Andrew Rybchenko
3fd7797fcd net/sfc: check added but not completed descs on EF10 Tx reap
There is not point to check other Tx descriptors.
It is important if Tx datapath does not reset Tx descriptor
mbuf pointer to NULL on completion (EF10 simple Tx will do).

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
Reviewed-by: David Riddoch <driddoch@solarflare.com>
2017-06-12 10:41:27 +01:00
Chas Williams
96b00e3a6a net/ring: fix adding MAC addresses
When .mac_addr_add() was changed to allow a return code, ring was changed
to return -ENOTSUP.  This changes the behavior of the rte_ring driver in
a way that does not maintain backward compatibility.  Additionally, if
the intent is to return -ENOTSUP, you could simply not define the stubs.

Fixes: 6d01e580ac ("ethdev: fix adding invalid MAC address")
Cc: stable@dpdk.org

Signed-off-by: Chas Williams <ciwillia@brocade.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-06-12 10:41:27 +01:00
Nélio Laranjeiro
d6ed7be7b4 net/mlx5: remove already initialised mbuf fields
Since commit 8f094a9ac5 ("mbuf: set mbuf fields while in pool"), some
fields are already initialised and do not need to be modified by the PMD
anymore.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2017-06-12 10:41:27 +01:00
Nélio Laranjeiro
c8ffb8a9cc net/mlx5: fix flow application order on stop/start
Flow rules must be applied in the same order as they have been created and
thus destroyed in the reverse order.

Fixes: 2097d0d1e2 ("net/mlx5: support basic flow items and actions")
Cc: stable@dpdk.org

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2017-06-12 10:41:27 +01:00
Wei Dai
09049d5266 net/ixgbe/base: update shared code version to 2017.05.16
* Remove PHY access for some 1G ports
* Disable X550EM-x 1GBASE-T led switch support

Signed-off-by: Wei Dai <wei.dai@intel.com>
2017-06-12 10:41:27 +01:00
Wei Dai
667af1981f net/ixgbe/base: disable X550EM-x 1GBASE-T led switch support
This patch disables X550EM_X 1Gbase-t led_[on|off] support since
the LEDs are wired to the PHY and the driver can not access the
PHY. led_[on|off]

Support is disabled by setting the function pointer to NULL.
init_led_link_act is also set to NULL.

Signed-off-by: Wei Dai <wei.dai@intel.com>
2017-06-12 10:41:27 +01:00
Wei Dai
91b0fdf44e net/ixgbe/base: remove PHY access for some 1G ports
This patch removes some some 1GBASE-T PHY access since the FW
configures the PHY. SW shall not configure or initialize link.
Accessing the PHY would require the use of MDI clause 22 which
should be avoided in high layer driver code.

Signed-off-by: Wei Dai <wei.dai@intel.com>
2017-06-12 10:41:27 +01:00
Andrew Rybchenko
69fbd1e923 net/sfc: handle already flushed Tx queue gracefully
Tx queue may be already flushed because of previous Tx error or
MC reboot.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2017-06-12 10:41:27 +01:00
Andrew Rybchenko
a47c6d6246 net/sfc: add Tx queue flush failed flag for sanity
Avoid usage of flushing state when Tx queue flush init failed.

Fixes: fed9aeb46c ("net/sfc: implement transmit path start / stop")
Cc: stable@dpdk.org

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2017-06-12 10:41:27 +01:00
Andrew Rybchenko
69d753f483 net/sfc: handle already flushed Rx queue gracefully
Rx queue may be already flushed because of previous Rx error or
MC reboot.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2017-06-12 10:41:27 +01:00
Andy Moreton
af39bcc612 net/sfc/base: let caller know that queue is already flushed
Tx/Rx queue may be already flushed due to Tx/Rx error on the queue or
MC reboot. Caller needs to know that the queue is already flushed to
avoid waiting for flush done event.

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2017-06-12 10:41:27 +01:00
Andy Moreton
7236d2bfe0 net/sfc/base: fix error code usage in common code
MCDI results returned in req.emr_rc have already been translated
from MC_CMD_ERR_* to errno names, so using an MC_CMD_ERR_* value
is incorrect.

Fixes: e7cd430c86 ("net/sfc/base: import SFN7xxx family support")
Cc: stable@dpdk.org

Signed-off-by: Andy Moreton <amoreton@solarflare.com>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2017-06-12 10:41:27 +01:00
Rahul Lakkireddy
ee606d9278 net/cxgbe: configure PCIe extended tags
Add support to configure minimum and maximum PCIe extended tag.

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
2017-06-12 10:41:27 +01:00
Rahul Lakkireddy
c12974c54c net/cxgbe: remove rmb bottleneck in Rx path
rmb before determining rsp_type is a bottleneck.
Once we determine rsp-type is FL, we can directly go ahead and read
packets based on q->stat->pidx and budget_left.

This removes bottleneck of rmb once per every RX packet.
Now, rmb exists once per RX batch.

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
2017-06-12 10:41:27 +01:00
Rahul Lakkireddy
d87ba24d1a net/cxgbe: fix rxq default params for ports under same PF
Enabling rx queues with default interrupt parameters doesn't happen
for other ports under same PF due to FULL_INIT_DONE flag being set
by the first port.

Fix is to to allow each port to enable its own rx queues with default
parameters.

Fixes: 0462d11544 ("cxgbe: add device related operations")

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
2017-06-12 10:41:27 +01:00
Rahul Lakkireddy
6c2809628c net/cxgbe: improve latency for slow traffic
TX coalescing waits for ETH_COALESCE_PKT_NUM packets to be coalesced
across bursts before transmitting them.  For slow traffic, such as
100 PPS, this approach increases latency since packets are received
one at a time and tx coalescing has to wait for ETH_COALESCE_PKT
number of packets to arrive before transmitting.

To fix this:

- Update rx path to use status page instead and only receive packets
  when either the ingress interrupt timer threshold (5 us) or
  the ingress interrupt packet count threshold (32 packets) fires.
  (i.e. whichever happens first).

- If number of packets coalesced is <= number of packets sent
  by tx burst function, stop coalescing and transmit these packets
  immediately.

Also added compile time option to favor throughput over latency by
default.

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
2017-06-12 10:41:27 +01:00
Rahul Lakkireddy
4dee49c1d4 net/cxgbe: remove LSB interrupt support
Remove RTE_PCI_DRV_INTR_LSC from driver flags, since LSC interrupts
are currently not supported.

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
2017-06-12 10:41:27 +01:00
Rahul Lakkireddy
ea6a99c077 net/cxgbe: fix port statistics
Do not count pause frames as part of normal TX/RX Frame/Byte counts.
Also, switch to using software counters rather than hardware for RX
stats.

Fixes: 856505d303 ("cxgbe: add port statistics")
Cc: stable@dpdk.org

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
2017-06-12 10:41:27 +01:00
Rahul Lakkireddy
cd9ce8c373 net/cxgbe: add compressed error vector
Add support for compressed error vector available in cpl_rx_pkt for
Chelsio T6.

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
2017-06-12 10:41:27 +01:00
Rahul Lakkireddy
edd04c6196 net/cxgbe: update Rx path for Chelsio T6
Update RX path to reflect Chelsio T6 register value changes.
Update ingress pack boundary value based on maximum payload size
that can be accommodated by underlying PCI.  Update ingress pad
boundary value based on smallest memory controller bus width
possible.  Enforce alignment for free list pointer start address.

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
2017-06-12 10:41:27 +01:00
Rahul Lakkireddy
10c6d94761 net/cxgbe: update RXQ channel mapping for Chelsio T6
Update MPS buffer groups and TP ingress channel congestion map to
correct RXQ allocation for Chelsio T6.

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
2017-06-12 10:41:27 +01:00
Rahul Lakkireddy
f146dd8863 net/cxgbe: update Tx path for Chelsio T6
Update TX path to reflect Chelsio T6 changes.

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
2017-06-12 10:41:27 +01:00
Rahul Lakkireddy
c962618cc3 net/cxgbe: update hardware info prints
Update informational prints pertaining to underlying hardware.
Add bootstrap firmware version and expansion ROM version prints.
Move the prints to a single function.

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
2017-06-12 10:41:27 +01:00
Rahul Lakkireddy
69aed04230 net/cxgbe/base: add forward error correction support
Add forward error correction (FEC) support and update link
configuration.

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
2017-06-12 10:41:27 +01:00
Rahul Lakkireddy
9da2a69417 net/cxgbe: update link speeds and port modules
Add 25G and 100G link speeds and update supported port modules.

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
2017-06-12 10:41:27 +01:00
Rahul Lakkireddy
5eb55bf8a4 net/cxgbe: grab available ports after firmware reset
Move code to get the available ports from the firmware after it had
been reset.  This ensures that driver uses the latest info on available
ports after firmware reset.

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
2017-06-12 10:41:27 +01:00
Rahul Lakkireddy
516306a2dd net/cxgbe/base: update flash part information
Update flash part identification and decoding to accommodate new
flash parts.

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
2017-06-12 10:41:26 +01:00
Rahul Lakkireddy
42be1b98da net/cxgbe/base: update register dump
Add Chelsio T6 registers to register dump.

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
2017-06-12 10:41:26 +01:00
Rahul Lakkireddy
04868e5bfd net/cxgbe: add support to run Chelsio T6 cards
Add code to detect and run T6 devices.  Update PCI ID Device table
with Chelsio T6 device ids and update documentation.

Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Signed-off-by: Kumar Sanghvi <kumaras@chelsio.com>
2017-06-12 10:41:26 +01:00
Ferruh Yigit
0362b7294d net/avp: remove redundant assignment
dev_info->driver_name is assigned by rte_eth_dev_info_get()
and existing value overwritten, removing assignment.

Fixes: 1a85922369 ("net/avp: add device configuration")

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Allain Legacy <allain.legacy@windriver.com>
2017-06-12 10:41:26 +01:00
Pascal Mazon
8ae3023387 net/tap: add Rx/Tx checksum offload support
This patch adds basic offloading support, widely expected in a PMD.

Verify IPv4 and UDP/TCP checksums upon packet reception, and set
ol_flags accordingly.

On Tx, set IPv4 and UDP/TCP checksums when required, considering
ol_flags.

Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
2017-06-12 10:41:26 +01:00
Pascal Mazon
f96fe1ab35 net/tap: fix some flow collision
The following two flow rules (testpmd syntax) should not collide:
flow create 0 priority 1 ingress pattern eth / ipv4 / end actions drop / end
flow create 0 priority 1 ingress pattern eth / ipv6 / end actions drop / end

But the eth_type in the associated TC rule was set to either "ip" or
"ipv6".  For TC, they could thus not have the same priority.

Use ETH_P_ALL only in the TC message to make sure those rules can
coexist.

Fixes: de96fe68ae ("net/tap: add basic flow API patterns and actions")
Cc: stable@dpdk.org

Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
2017-06-12 10:41:26 +01:00
Hemant Agrawal
fd0c3f136d bus/fslmc: reduce the debug log messages
Reducing the amount of logging and making the err statement
as a single line statements.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-06-12 10:41:26 +01:00
Hemant Agrawal
748eccb97c net/dpaa2: add support for firmware version get
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-06-12 10:41:26 +01:00
Hemant Agrawal
e24b05bfd2 bus/fslmc: add support to detect SoC version
This is required to configure the stashing destination
based on the cluster size.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-06-12 10:41:26 +01:00
Hemant Agrawal
e164084994 net/dpaa2: configure jumbo frames
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-06-12 10:41:26 +01:00
Hemant Agrawal
977d0006ad net/dpaa2: add support for flow control
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-06-12 10:41:26 +01:00
Hemant Agrawal
a1f3a12cd5 net/dpaa2: add link status config support
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-06-12 10:41:26 +01:00
Hemant Agrawal
d20e6e600b net/dpaa2: add support for VLAN strip
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-06-12 10:41:26 +01:00
Hemant Agrawal
3ce294f223 net/dpaa2: add support for VLAN filter and offload
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-06-12 10:41:26 +01:00
Hemant Agrawal
5d5aeeedab net/dpaa2: add support for multicast promiscuous mode
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-06-12 10:41:26 +01:00
Hemant Agrawal
b4d97b7d31 net/dpaa2: add support for MAC address filtering
Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-06-12 10:41:26 +01:00
Hemant Agrawal
0ccb1bef96 bus/fslmc: update TAILQ usages in dpaa2 objects
This patch updates the usages of malloc and TAILQ in
dpbp and dpio objects.

Signed-off-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-06-12 10:41:26 +01:00