Commit Graph

18 Commits

Author SHA1 Message Date
Gagandeep Singh
e091c6915e net/enetc: fix crash at high speed traffic
On xmit side, there should be a check whether BD ring
has free BDs available before transmit a packet to avoid
data corruption and buffer leak issue.

Fixes: 469c6111a7 ("net/enetc: enable Rx and Tx")
Cc: stable@dpdk.org

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
2019-04-19 14:51:54 +02:00
Gagandeep Singh
f5a2e3bad4 net/enetc: enable Rx checksum offload validation
Checksum Validation on Rx is supported.

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
2019-04-19 14:51:54 +02:00
Gagandeep Singh
1d0c33978a net/enetc: enable CRC offload
CRC offload keep feature supported

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
2019-04-19 14:51:54 +02:00
Gagandeep Singh
8b675ab10e net/enetc: enable queue start/stop
Rx and Tx queue start-stop and deferred queue start
features enabled.

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
2019-04-19 14:51:54 +02:00
Gagandeep Singh
5d5589b0c8 net/enetc: support MTU update and jumbo frames
Enable the jumbo frames and MTU update feature.

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
2019-04-19 14:51:54 +02:00
Gagandeep Singh
4ef1767fa6 net/enetc: enable promiscuous and allmulticast
Promiscuous and allmulticast enable/disable APIs added.

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
2019-04-19 14:51:54 +02:00
Gagandeep Singh
4b7bc5ee26 net/enetc: remove forward declarations
Remove unneeded forward declarations and re-order the code.

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
2019-04-19 14:51:54 +02:00
Gagandeep Singh
7de1c06a8f net/enetc: replace register read/write macros with functions
Replacing read-write macros with already available
read-write functions.

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
2019-04-19 14:51:54 +02:00
Gagandeep Singh
01128d3103 net/enetc: add basic statistics
Enable basic statistics APIs enetc_stats_get
and enetc_stats_reset.

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
2019-04-19 14:51:54 +02:00
Gagandeep Singh
45e9be8b6c net/enetc: set interface mode for SXGMII
Support for SXGMII port has been enabled. It will
depends on boot loader information passed through IERB.

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
2019-04-19 14:51:54 +02:00
Gagandeep Singh
389a450f37 net/enetc: fix big endian build and buffer allocation
There was an error at rte_constant_bswap64 while compiling
with big endian toolchain. so fixing it by adding type cast.

Also, rte_pktmbuf_alloc API should be used to allocate mbuf
instead of rte_pktmbuf_raw_alloc to avoid use of stale mbuf
information.

Fixes: 469c6111a7 ("net/enetc: enable Rx and Tx")
Cc: stable@dpdk.org

Suggested-by: Thomas Monjalon <thomas@monjalon.net>
Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
2019-04-19 14:51:54 +02:00
Gagandeep Singh
63c34c299a net/enetc: fix SMMU unhandled context fault
First configure ring with BDs properly then enable
the ring.

Fixes: 469c6111a7 ("net/enetc: enable Rx and Tx")
Cc: stable@dpdk.org

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
2019-04-19 14:51:54 +02:00
Gagandeep Singh
fa45fda827 net/enetc: support physical addressing mode
Support added for physical addressing mode and
change driver flags to don't care.

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
2019-04-19 14:51:54 +02:00
Bruce Richardson
adf93ca564 build: increase readability via shortcut variables
Define variables for "is_linux", "is_freebsd" and "is_windows"
to make the code shorter for comparisons and more readable.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
Acked-by: Luca Boccassi <bluca@debian.org>
2019-04-17 18:09:52 +02:00
Thomas Monjalon
e16adf08e5 ethdev: free all common data when releasing port
This is a clean-up of common ethdev data freeing.
All data freeing are moved to rte_eth_dev_release_port()
and done only in case of primary process.

It is probably fixing some memory leaks for PMDs which were
not freeing all data.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
2018-10-26 22:14:05 +02:00
Gagandeep Singh
3756a4c6f8 net/enetc: support packet type parsing
enable supported packet parse types feature

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-10-11 18:53:49 +02:00
Gagandeep Singh
469c6111a7 net/enetc: enable Rx and Tx
Add RX and TX queue setup, datapath functions

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-10-11 18:53:49 +02:00
Gagandeep Singh
696fa399d7 net/enetc: add PMD with basic operations
This patch introduces the enetc PMD with basic
initialisation functions includes probe, teardown,
hardware initialisation

Signed-off-by: Gagandeep Singh <g.singh@nxp.com>
Acked-by: Shreyansh Jain <shreyansh.jain@nxp.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2018-10-11 18:53:49 +02:00