Commit Graph

7391 Commits

Author SHA1 Message Date
Harman Kalra
a78b924672 net/octeontx2: add remaining PTP operations
Add remaining PTP configuration/slowpath operations.
Timesync feature is available only for PF devices.

Signed-off-by: Harman Kalra <hkalra@marvell.com>
Signed-off-by: Zyta Szpak <zyta@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2019-07-05 01:52:01 +02:00
Harman Kalra
b5dc314044 net/octeontx2: support base PTP
Add PTP enable and disable operations.

Signed-off-by: Harman Kalra <hkalra@marvell.com>
Signed-off-by: Zyta Szpak <zyta@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2019-07-05 01:52:01 +02:00
Vamsi Attunuru
609945f1ce net/octeontx2: support flow control
Add flow control operations and exposed
otx2_nix_update_flow_ctrl_mode() to enable on the
configured mode in dev_start().

Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2019-07-05 01:52:01 +02:00
Vamsi Attunuru
58f6f93c34 net/octeontx2: add module EEPROM dump
Add module EEPROM dump operation.

Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2019-07-05 01:52:01 +02:00
Jerin Jacob
80f663668e net/octeontx2: add Rx and Tx descriptor operations
Add Rx and Tx queue descriptor related operations.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
2019-07-05 01:52:01 +02:00
Nithin Dabilpuram
4ad55b3376 net/octeontx2: add queue info and pool supported ops
Add Rx and Tx queue info get and pool ops supported operations.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
2019-07-05 01:52:01 +02:00
Jerin Jacob
6e892eabce net/octeontx2: support packet type
The fields from CQE needs to be converted to
ptype and rx ol flags in mbuf. This patch adds
create lookup memory for those items to be
used in Fastpath.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Signed-off-by: Harman Kalra <hkalra@marvell.com>
2019-07-05 01:52:01 +02:00
Krzysztof Kanas
0b16e2abd6 net/octeontx2: enable Tx through traffic manager
This patch enables pkt transmit through traffic manager
hierarchy by clearing software XOFF on the nodes and linking
tx queues to corresponding leaf nodes.
It also adds support to start and stop tx queue using
traffic manager.

Signed-off-by: Krzysztof Kanas <kkanas@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
2019-07-05 01:52:01 +02:00
Nithin Dabilpuram
2f6d5220fb net/octeontx2: configure TM HW resources
This patch sets up and configure hierarchy in hw
nodes. Since all the registers are with RVU AF,
register configuration is also done using mbox
communication.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Krzysztof Kanas <kkanas@marvell.com>
2019-07-05 01:52:01 +02:00
Krzysztof Kanas
1439b6a999 net/octeontx2: alloc and free TM HW resources
Allocate and free shaper/scheduler hardware resources for
nodes of hierarchy levels in sw.

Signed-off-by: Krzysztof Kanas <kkanas@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2019-07-05 01:52:01 +02:00
Nithin Dabilpuram
e7b4cc8c47 net/octeontx2: introduce traffic manager
Introduce traffic manager infra and default hierarchy
creation.

Upon ethdev configure, a default hierarchy is
created with one-to-one mapped tm nodes. This topology
will be overridden when user explicitly creates and commits
a new hierarchy using rte_tm interface.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Krzysztof Kanas <kkanas@marvell.com>
2019-07-05 01:52:01 +02:00
Nithin Dabilpuram
711baf1c2a net/octeontx2: add queue start and stop operations
Add queue start and stop operations. Tx queue needs
to update the flow control value, Which will be
added in sub subsequent patch.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
2019-07-05 01:52:01 +02:00
Vamsi Attunuru
da138cd47e net/octeontx2: handle port reconfigure
setup tx & rx queues with the previous configuration during
port reconfig, it handles cases like port reconfigure without
reconfiguring tx & rx queues.

Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2019-07-05 01:52:01 +02:00
Jerin Jacob
1be5cff1fa net/octeontx2: add Tx queue setup and release
Add Tx queue setup and release.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2019-07-05 01:52:01 +02:00
Jerin Jacob
094fc8a3a1 net/octeontx2: add Rx queue setup and release
Add Rx queue setup and release.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
2019-07-05 01:52:01 +02:00
Vamsi Attunuru
83ce2880e2 net/octeontx2: support RSS
Add RSS support and expose RSS related functions
to implement RSS action for rte_flow driver.

Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
2019-07-05 01:52:01 +02:00
Sunil Kumar Kori
c43adf6168 net/octeontx2: add unicast MAC filter
Add unicast MAC filter for PF device and
update the respective feature list.

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2019-07-05 01:52:01 +02:00
Vamsi Attunuru
adf6bb5d73 net/octeontx2: add promiscuous and allmulticast mode
Add promiscuous and allmulticast mode for PF devices and
update the respective feature list.

Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2019-07-05 01:52:01 +02:00
Kiran Kumar K
c870701592 net/octeontx2: add extended stats operations
Add extended operations and updated the feature list.

Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
2019-07-05 01:52:01 +02:00
Kiran Kumar K
2265e4b4e8 net/octeontx2: add basic stats operation
Add basic stat operation and updated the feature list.

Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
2019-07-05 01:52:01 +02:00
Vamsi Attunuru
38f566280a net/octeontx2: add link stats operations
Add link stats related operations and mark respective
items in the documentation.

Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2019-07-05 01:52:01 +02:00
Kiran Kumar K
3e3b5c6350 net/octeontx2: support register dump
Add register dump support and mark Registers dump in features.

Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
2019-07-05 01:52:01 +02:00
Jerin Jacob
008e97cb40 net/octeontx2: add context debug utils
Add RQ,SQ,CQ context and CQE structure dump utils.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Vivek Sharma <viveksharma@marvell.com>
2019-07-05 01:52:01 +02:00
Jerin Jacob
dc47ba15f6 net/octeontx2: handle queue specific error interrupts
Handle queue specific error interrupts.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2019-07-05 01:52:01 +02:00
Jerin Jacob
548b5839a3 net/octeontx2: add device configure operation
Add device configure operation. This would call lf_alloc
mailbox to allocate a NIX LF and upon return, AF will
return the attributes for the select LF.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2019-07-05 01:52:01 +02:00
Jerin Jacob
60bb09ad2a net/octeontx2: add info get operation
Add device information get operation.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
Signed-off-by: Harman Kalra <hkalra@marvell.com>
2019-07-05 01:52:01 +02:00
Jerin Jacob
b26d65bee9 net/octeontx2: handle device error interrupts
Handle device specific error and ras interrupts.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Harman Kalra <hkalra@marvell.com>
2019-07-05 01:52:01 +02:00
Jerin Jacob
fb0198b7dc net/octeontx2: add devargs parsing functions
add various devargs command line options supported by this driver.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
2019-07-05 01:52:01 +02:00
Jerin Jacob
1e3da54631 net/octeontx2: add device init and uninit
Add basic init and uninit function which includes
attaching LF device to probed PCIe device.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Signed-off-by: Vamsi Attunuru <vattunuru@marvell.com>
2019-07-05 01:52:01 +02:00
Jerin Jacob
f81db0c8c5 net/octeontx2: add ethdev probe and remove
add basic PCIe ethdev probe and remove.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2019-07-05 01:52:01 +02:00
Jerin Jacob
9a8864c8b5 net/octeontx2: add build and doc infrastructure
Adding bare minimum PMD library and doc build infrastructure
and claim the maintainership for octeontx2 PMD.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
2019-07-05 01:52:01 +02:00
Andy Pei
343b8e4ada net/i40e: fix crash when TxQ/RxQ set to 0 in VF
Testpmd would stuck and result in core dump when user specifies an
invalid VF queue number, for example when setting txq or rxq to 0.
When txq or rxq is set to 0, pointer of pointer rxq or txq in
function i40evf_configure_vsi_queues is NULL. The usage of txq[i]
or rxq[0] is valid. This patch fixes this issue.

Fixes: d6b1972909 ("i40evf: support configurable crc stripping")
Cc: stable@dpdk.org

Signed-off-by: Andy Pei <andy.pei@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2019-07-05 01:52:01 +02:00
Stephen Hemminger
ff155eac93 net/netvsc: fix definition of offload values
The definition of ipsec and rsc offloads was incorrect.
Neither one of these is used by current driver, but the values
should be fixed now for future RSC support.

Fixes: 4e9c73e96e ("net/netvsc: add Hyper-V network device")
Cc: stable@dpdk.org

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2019-07-05 01:52:01 +02:00
Krzysztof Kanas
4f538fa249 net/af_packet: set default block size to page size
Kernel validates block size to be aligned to page size. Code works on
platforms with page size 4k, but on others e.g. Arm64 fails with default
parameters.

Signed-off-by: Krzysztof Kanas <kkanas@marvell.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-07-05 01:52:01 +02:00
Dekel Peled
585b99fb4a net/mlx5: modify TCP header using Direct Verbs
This patch implements additional actions of packet header
modifications.

Add actions:
- INC_TCP_SEQ - Increase sequence number in the outermost TCP header.
- DEC_TCP_SEQ - Decrease sequence number in the outermost TCP header.
- INC_TCP_ACK - Increase acknowledgment number in the outermost TCP
		header.
- DEC_TCP_ACK - Decrease acknowledgment number in the outermost TCP
		header.

Original work by Xiaoyu Min.

Signed-off-by: Dekel Peled <dekelp@mellanox.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2019-07-05 01:52:01 +02:00
Andrew Rybchenko
8fce2224d0 net/sfc: release port upon close
Set RTE_ETH_DEV_CLOSE_REMOVE upon probe so all the resources
for the port can be freed by rte_eth_dev_close() and the ethdev
port freed.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
2019-07-05 01:52:01 +02:00
Andrew Rybchenko
93f993cbbb net/sfc: ensure that device is closed on removal
PCI device may be unplugged when ethdev is not closed yet.

Fixes: aaa3f5f0f7 ("net/sfc: add configure and close stubs")
Cc: stable@dpdk.org

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Ivan Malov <ivan.malov@oktetlabs.ru>
2019-07-05 01:52:01 +02:00
Anatoly Burakov
028669bc9f eal: hide shared memory config
Now that everything that has ever accessed the shared memory
config is doing so through the public API's, we can make it
internal. Since we're removing quite a few headers from
rte_eal_memconfig.h, we need to add them back in places
where this header is used.

This bumps the ABI, so also change all build files and make
update documentation.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: David Marchand <david.marchand@redhat.com>
2019-07-06 10:32:34 +02:00
Anatoly Burakov
76f80881ef mem: add API to lock/unlock memory hotplug
Currently, the memory hotplug is locked automatically by all
memory-related _walk() functions, but sometimes locking the
memory subsystem outside of them is needed. There is no
public API to do that, so it creates a dependency on shared
memory config to be public. Fix this by introducing a new
API to lock/unlock the memory hotplug subsystem.

Create a new common file for all things mem config, and a
new API namespace rte_mcfg_*, and search-and-replace all
usages of the locks with the new API.

Signed-off-by: Anatoly Burakov <anatoly.burakov@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Acked-by: David Marchand <david.marchand@redhat.com>
2019-07-05 22:12:40 +02:00
Morten Brørup
f0c2dc8201 net: move TCP flags from ethdev header
TCP flags were moved to the TCP header file from the Ethernet control
header file, and the RTE prefix was added to their names.

Missing TCP ECN flags were added.

The ALL mask did not include TCP ECN flags, so it was renamed to reflect
that it applies to N-tuple filtering only.

Updated other files affected by the renaming accordingly.

Signed-off-by: Morten Brørup <mb@smartsharesystems.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2019-07-03 12:57:30 +02:00
Liron Himi
d72ce66556 net/mvneta: optimize checksum generation offload
For tx checksum offload it is not mandatory to provide
a valid packet_type in addition to a valid ol_flags.
This patch only use ol_flags information for this feature
as a performance improvement.

Signed-off-by: Liron Himi <lironh@marvell.com>
Reviewed-by: Yuri Chipchev <yuric@marvell.com>
Tested-by: Liron Himi <lironh@marvell.com>
2019-07-03 12:57:30 +02:00
Yuri Chipchev
15ae783a15 net/mvneta: reset stats during device init
reset device statistics on device initialization

Signed-off-by: Yuri Chipchev <yuric@marvell.com>
Reviewed-by: Liron Himi <lironh@marvell.com>
Tested-by: Yuri Chipchev <yuric@marvell.com>
2019-07-03 12:57:30 +02:00
Liron Himi
09a6afe7e4 net/mvneta: fix ierror statistics
Error packets were counted twice due to use of redundant counters.

Fixes: e9d5faffd1 ("net/mvneta: support basic stats")
Cc: stable@dpdk.org

Signed-off-by: Liron Himi <lironh@marvell.com>
Reviewed-by: Yuri Chipchev <yuric@marvell.com>
Tested-by: Liron Himi <lironh@marvell.com>
2019-07-03 12:57:30 +02:00
Qiming Yang
d4c5136227 net/ice: support UDP tunnelling port
Enabled UDP tunnel port add and delete functions.

Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
2019-07-03 12:57:30 +02:00
Qiming Yang
d76116a467 net/ice: add generic flow API
This patch adds ice_flow_create, ice_flow_destroy,
ice_flow_flush and ice_flow_validate support,
these are used to handle all the generic filters.

Signed-off-by: Qiming Yang <qiming.yang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
2019-07-03 12:57:30 +02:00
Wei Zhao
57c4f26935 net/ice: enable switch filter
The patch enables the backend of rte_flow. It transfers
rte_flow_xxx to device specific data structure and
configures packet process engine's binary classifier
(switch) properly.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
2019-07-03 12:57:30 +02:00
Leyi Rong
60687da86a net/ice/base: fix inner L2 offset in GRE dummy packet
The offset for the inner L2 header in the dummy GRE packet
was off by 2 bytes so updated the offset.

Fixes: 839c0a4b77 ("net/ice/base: enable additional switch rules")

Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2019-07-03 12:57:30 +02:00
Leyi Rong
ee3e244afb net/ice/base: support ethertype switch filters
Add protocol definitions for ethertype.
Add ice_ethtype_hdr structure definition into the ice_prot_hdr union.
Add ethtype offsets into the training packet maps.

Signed-off-by: Dan Nowlin <dan.nowlin@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Tested-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2019-07-03 12:57:30 +02:00
Leyi Rong
38d9b0b03c net/ice/base: support IPv6 based switch filters
- Add IPv6 switch rule support.
- Add IPv6 training packet.
- Correct name of IPv6 header variable.
- Fix enum values so that they point to the proper
  ice_prot_ext_tbl_entry field.

Signed-off-by: Kevin Scott <kevin.c.scott@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2019-07-03 12:57:30 +02:00
Dan Wei
aa6ff92898 net/ipn3ke: modify AFU configurations
Modify AFU configurations for new BBS (Blue Bitstream) of A10 on N3000
card:
- AFU register access: RTL changes the UPL (User Programmable Logic
which is the container of vBNG IP) base address and the read/write
commands of register indirect access.
- Poll the INIT_STS register to wait for the vBNG IP and DDR reset
completion.
- Refine log for debug: print UPL_version not only for vBNG bit stream,
but also for other bit streams.

Fixes: c01c748e4a ("net/ipn3ke: add new driver")
Cc: stable@dpdk.org

Signed-off-by: Dan Wei <dan.wei@intel.com>
Acked-by: Rosen Xu <rosen.xu@intel.com>
2019-07-03 12:57:30 +02:00
Rastislav Cernay
f37c57a1a3 net/nfb: support Silicom Mango card
Add support for Silicom FB2CGG3 smart NIC

Signed-off-by: Rastislav Cernay <cernay@netcope.com>
2019-07-03 12:57:30 +02:00
Rastislav Cernay
6595e2f72e net/szedata2: support Silicom Mango card
Add support for Silicom FB2CGG3 smart NIC

Signed-off-by: Rastislav Cernay <cernay@netcope.com>
Acked-by: Jan Remes <remes@netcope.com>
2019-07-03 12:57:30 +02:00
Bruce Richardson
530588f3cd drivers: add reasons for components being disabled
For each driver where we optionally disable it, add in the reason why it's
being disabled, so the user knows how to fix it.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Luca Boccassi <bluca@debian.org>
2019-07-02 23:21:11 +02:00
Ivan Malov
b51690ec69 mbuf: clarify outer offsets for non-tunnel packets
The default policy for offload-specific fields is that
they are undefined unless the corresponding offloads are
requested in mbuf ol_flags. This is also the case for outer
L2 and L3 length fields which must not be assumed to contain
zeros for non-tunnel packets. The patch clarifies this behaviour
in the comments and also adds appropriate checks to the PMDs which
do not check any tunnel-related offloads before using the said fields.

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
2019-07-01 17:15:01 +02:00
Jakub Grajciar
c41a04958b net/memif: support multi-process
Multi-process support for memif PMD.
Primary process handles connection establishment.
Secondary process queries for memory regions.

Signed-off-by: Jakub Grajciar <jgrajcia@cisco.com>
Acked-by: Anatoly Burakov <anatoly.burakov@intel.com>
2019-06-28 20:32:18 +02:00
Xiaolong Ye
45bba02c95 net/af_xdp: support need wakeup feature
This patch enables need_wakeup flag for Tx and fill rings, when this
flag is set by the driver, it means that the userspace application has
to explicitly wake up the kernel Rx or kernel Tx processing by issuing
a syscall. Poll() can wake up both and sendto() or its alternatives
will wake up Tx processing only.

This feature is to provide efficient support for case that application
and driver executing on the same core.

Signed-off-by: Xiaolong Ye <xiaolong.ye@intel.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-06-28 20:32:18 +02:00
Cian Ferriter
a3f5252e5c net/pcap: enable infinitely Rx a pcap file
It can be useful to use pcap files for some rudimental performance
testing. This patch enables this functionality in the pcap driver.

At a high level, this works by creating a ring of sufficient size to
store the packets in the pcap file passed to the application. When the
rx function for this mode is called, packets are dequeued from the ring
for use by the application and also enqueued back on to the ring to be
"received" again.

A tx_drop mode is also added since transmitting to a tx_pcap file isn't
desirable at a high traffic rate.

Jumbo frames are not supported in this mode. When filling the ring at rx
queue setup time, the presence of multi segment mbufs is checked for.
The PMD will exit on detection of these multi segment mbufs.

Signed-off-by: Cian Ferriter <cian.ferriter@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-06-28 20:32:18 +02:00
Cian Ferriter
da6ba28f05 net/pcap: use a struct to pass user options
The argument lists on some of the device creation functions are quite
large. Using a struct to hold the user options parsed in
'pmd_pcap_probe' will allow for cleaner function calls and definitions.
Adding user options will also be easier.

Signed-off-by: Cian Ferriter <cian.ferriter@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-06-28 20:32:18 +02:00
Stephen Hemminger
cc9271f9e7 net/netvsc: fix xstats for VF device
The id values for VF stats were not being offset correctly.
And getting xstats for VF device only worked if VF device supported
it; it did not support the generic stats.

Fixes: dc7680e859 ("net/netvsc: support integrated VF")
Cc: stable@dpdk.org

Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2019-06-28 20:32:18 +02:00
Mohsin Mazhar Shaikh
b21ad01a82 net/netvsc: fix xstats id
The xstats_get was not setting id correctly for each entry.

Fixes: 4e9c73e96e ("net/netvsc: add Hyper-V network device")
Cc: stable@dpdk.org

Signed-off-by: Mohsin Mazhar Shaikh <mohsinmazhar_shaikh@trendmicro.com>
Signed-off-by: Stephen Hemminger <stephen@networkplumber.org>
2019-06-28 20:32:18 +02:00
Stephen Hemminger
92d23a57ca net/netvsc: support configuring RSS parameters
Add RSS hash key and reta update and query functions.

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
2019-06-28 20:32:18 +02:00
Stephen Hemminger
3a899f8afc net/netvsc: fix RSS offload settings
Use the result from querying host to show the RSS info.

Fixes: 4e9c73e96e ("net/netvsc: add Hyper-V network device")
Cc: stable@dpdk.org

Signed-off-by: Stephen Hemminger <sthemmin@microsoft.com>
2019-06-28 20:32:18 +02:00
Ali Alnubani
843e720557 net/mlx5: fix 32-bit build
This is to fix the error:
  ```
  drivers/net/mlx5/mlx5_defs.h:14:26:
  error: format '%lx' expects argument of type 'long unsigned int',
  but argument 5 has type 'off_t {aka long long int}' [-Werror=format=]
  drivers/net/mlx5/mlx5_txq.c:569:48: note: format string is defined here
     DRV_LOG(DEBUG, "port %u: uar_mmap_offset 0x%lx"
                                                ~~^
                                                %llx
  ```
Which reproduces with gcc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0.

Fixes: 6bf10ab69b ("net/mlx5: support 32-bit systems")
Cc: stable@dpdk.org

Signed-off-by: Ali Alnubani <alialnu@mellanox.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-06-28 20:31:49 +02:00
Ziyang Xuan
cb7b6606eb net/hinic: add RSS stats and promiscuous ops
Add RSS, stats, promiscuous ops related function codes.

Signed-off-by: Ziyang Xuan <xuanziyang2@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-06-28 20:31:49 +02:00
Ziyang Xuan
076221c8fe net/hinic: add Rx/Tx
This patch add package sending and receiving function codes.

Signed-off-by: Ziyang Xuan <xuanziyang2@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-06-28 20:31:49 +02:00
Ziyang Xuan
2c473729dd net/hinic: add start/stop and queue ops
Add dev_start, dev_stop, link_update, queue_setup, queue_release
related function codes.

Signed-off-by: Ziyang Xuan <xuanziyang2@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-06-28 20:31:49 +02:00
Ziyang Xuan
64727024d2 net/hinic: add device initialization
Add device initialization function codes.

Signed-off-by: Ziyang Xuan <xuanziyang2@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-06-28 20:31:49 +02:00
Ziyang Xuan
1d09792a27 net/hinic: add build and doc files
Add build and doc files along with hinic_pmd_ethdev.c
which just includes PMD register and log initialization
for compilation.

Signed-off-by: Ziyang Xuan <xuanziyang2@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-06-28 20:31:49 +02:00
Ziyang Xuan
81d53291a4 net/hinic/base: add various headers
Add various headers that define mgmt commands, cmdq commands
and basic defines for use in the code.

Signed-off-by: Ziyang Xuan <xuanziyang2@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-06-28 20:31:49 +02:00
Ziyang Xuan
828d3e15a9 net/hinic/base: support context and work queue
Work queue is used for cmdq and Rx/Tx buff description.
NIC business needs to configure cmdq context and txq/rxq
context. This patch adds data structures and function codes
for work queue and context.

Signed-off-by: Ziyang Xuan <xuanziyang2@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-06-28 20:31:49 +02:00
Ziyang Xuan
2d5fd10181 net/hinic/base: add NIC business configurations
The items of configurations and queries for NIC business include
MAC, VLAN, MTU, RSS and so on. These configurations and queries
are handled by mgmt module. This patch introduces related
data structures and function codes.

Signed-off-by: Ziyang Xuan <xuanziyang2@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-06-28 20:31:49 +02:00
Ziyang Xuan
d9ce191794 net/hinic/base: add hardware operation
Add code for hardware operation, including configuration,
query and so on.

Signed-off-by: Ziyang Xuan <xuanziyang2@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-06-28 20:31:49 +02:00
Ziyang Xuan
a4957d87e0 net/hinic/base: add mgmt module
Mgmt module is a kind of administration module for the chip.
It is responsible for handling administration command from host.
It uses api channel. This patch adds related data structures,
packaged interfaces and function codes.

Signed-off-by: Ziyang Xuan <xuanziyang2@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-06-28 20:31:49 +02:00
Ziyang Xuan
78f6c5dbe2 net/hinic/base: add eq mechanism
Eqs include aeq and ceq. PMD supports aeq only. Aeq is a kind of
queue for mgmt asynchronous message and mgmt command response message.
This patch introduces data structures, initialization, and related
interfaces about aeq.

Signed-off-by: Ziyang Xuan <xuanziyang2@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-06-28 20:31:49 +02:00
Ziyang Xuan
7fcd6b05b9 net/hinic/base: support cmdq mechanism
Microcode is named ucode in Hi1822. Its main responsibility is data
transmission and reception. But it can also handle some administration
works. It uses cmdq mechanism. This patch introduces data structures,
initialization, interfaces, and commands sending functions of cmdq.

Signed-off-by: Ziyang Xuan <xuanziyang2@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-06-28 20:31:49 +02:00
Ziyang Xuan
53ffbf2caa net/hinic/base: add API command channel
API command channel is for communicating with mgmt module of chip.
This patch introduces data structures, initialization, interfaces,
and commands sending functions of API command channel.

Signed-off-by: Ziyang Xuan <xuanziyang2@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-06-28 20:31:49 +02:00
Ziyang Xuan
4b8441756f net/hinic/base: add HW interfaces of BAR operation
This patch adds some HW interfaces for bar operation interfaces,
including: mapped bar address getting, HW attributes getting,
msi-x reg operation, function type getting and so on.

Signed-off-by: Ziyang Xuan <xuanziyang2@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-06-28 20:31:49 +02:00
Ziyang Xuan
0020843cf4 net/hinic/base: add HW registers definition
Add HW registers definition header file for Hi1822 NIC.

Signed-off-by: Ziyang Xuan <xuanziyang2@huawei.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-06-28 20:31:49 +02:00
David Marchand
e7f2fa88a7 drivers/net: fix double free on init failure
If we don't clear mac_addrs, ethdev will double free it on cleanup.

Fixes: e16adf08e5 ("ethdev: free all common data when releasing port")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-06-28 20:31:49 +02:00
David Marchand
eaa45270aa net/bnx2x: fix invalid free on unplug
mac_addrs points to a field in dev_private.
We can't let ethdev free it.

Fixes: e16adf08e5 ("ethdev: free all common data when releasing port")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-06-28 20:31:49 +02:00
David Marchand
281183d851 net/nfb: avoid memory leak on unplug
Clearing mac_addrs on remove will prevent ethdev from freeing it.

Fixes: 6435f9a0ac ("net/nfb: add new netcope driver")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-06-28 20:31:49 +02:00
Allain Legacy
15fb42d511 net/avp: remove resources when port is closed
The rte_eth_dev_close() function now handles freeing resources for
devices (e.g., mac_addrs).  To conform with the new close() behaviour we
are asserting the RTE_ETH_DEV_CLOSE_REMOVE flag so that
rte_eth_dev_close() releases all device level dynamic memory.

Second level memory allocated to each individual rx/tx queue is now
freed as part of the close() operation therefore making it safe for the
rte_eth_dev_close() function to free the device private data without
orphaning the rx/tx queue pointers.

Signed-off-by: Allain Legacy <allain.legacy@windriver.com>
Acked-by: Matt Peters <matt.peters@windriver.com>
2019-06-28 20:31:49 +02:00
David Marchand
e876497c4f net/softnic: remove trace of legacy linuxapp
This check on Linux environment has been added at a time when we already
had switched to using the boolean RTE_EXEC_ENV_LINUXAPP.
It was then missed when converting to RTE_EXEC_ENV_LINUX.

Fixes: 7709a63bf1 ("net/softnic: add connection agent")
Fixes: 742bde12f3 ("build/linux: rename macro from LINUXAPP to LINUX")
Cc: stable@dpdk.org

Signed-off-by: David Marchand <david.marchand@redhat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2019-06-28 20:31:49 +02:00
Leyi Rong
80a430d66f net/ice/base: update Tx context struct
Add internal usage flag, bit 91 as described in spec.
Update width of internal queue state to 122 also as described in spec.

Signed-off-by: Ashish Shah <ashish.n.shah@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2019-06-28 20:31:49 +02:00
Leyi Rong
a0b1a2629b net/ice/base: change flow and profile removal
- Add function to remove ES profile map as it is now being used in
clearing and freeing HW tables.
- Locks were initially not used for releasing ES profile maps and
flow profiles as the sequence is part of driver unload. Adding
calls to acquire and release locks to ensure that any calls made
by the VF VSI during VFR or unload do not result in memory
access violations.

Signed-off-by: Vignesh Sridhar <vignesh.sridhar@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2019-06-28 20:31:49 +02:00
Leyi Rong
e10a21d7b6 net/ice/base: update driver unloading field
According to recent specification versions, the field in the Queue
Shutdown AdminQ command consisting of the "driver unloading" indication
is not a 4 byte field (it is byte.bit 16.0). Change it to a byte and
remove the unnecessary endian conversion.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2019-06-28 20:31:49 +02:00
Leyi Rong
21cb08fe68 net/ice/base: reduce calls to get profile associations
Added refresh_required flag to determine if we need to update the
recipe to profile mapping cache. This will reduce the number of
calls made to refresh the profile map.

Signed-off-by: Shivanshu Shukla <shivanshu.shukla@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2019-06-28 20:31:49 +02:00
Leyi Rong
8d0fa8c7f5 net/ice/base: fix NVGRE header structure
Correct NVGRE header structure and its field offsets.

Fixes: 04b8ec1ea8 ("net/ice/base: add protocol structures and defines")
Cc: stable@dpdk.org

Signed-off-by: Dan Nowlin <dan.nowlin@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2019-06-28 20:31:49 +02:00
Leyi Rong
dfbb0b98d4 net/ice/base: refactor zeroing bitmap size
A couple of places in the code use a 'sizeof(bitmap) * BITS_PER_BYTE'
construction to calculate the size of the bitmap when calling
ice_zero_bitmap. Instead of doing this, just use the same value as in
the ice_declare_bitmap declaration.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2019-06-28 20:31:49 +02:00
Leyi Rong
a5e60297bb net/ice/base: refactor zeroing bitmap
A few places in the code used ice_memset instead of ice_zero_bitmap to
initialize a bitmap to zeros.

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2019-06-28 20:31:49 +02:00
Leyi Rong
2c3d02ca80 net/ice/base: fix copying bitmap
Fix ice_cp_bitmap to copy the entire storage.

Fixes: c9e37832c9 ("net/ice/base: rework on bit ops")
Cc: stable@dpdk.org

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2019-06-28 20:31:49 +02:00
Leyi Rong
6567f9d59a net/ice/base: fix zeroing bitmap
Fix ice_zero_bitmap to zero the entire storage.

Fixes: c9e37832c9 ("net/ice/base: rework on bit ops")
Cc: stable@dpdk.org

Signed-off-by: Jacob Keller <jacob.e.keller@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2019-06-28 20:31:49 +02:00
Leyi Rong
a609b21fe0 net/ice/base: deduce TSA value in the CEE mode
In CEE mode, the TSA information can be derived from the reported
priority value.

Signed-off-by: Chinh T Cao <chinh.t.cao@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2019-06-28 20:31:49 +02:00
Leyi Rong
95d3619b09 net/ice/base: reduce adding advanced rule time
While calling ice_find_recp we were calling ice_get_recp_to_prof_map
every time we called ice_find_recp. ice_get_recp_to_prof_map is a very
expensive operation and we should try to reduce the number of times we
call this function. So moved it into ice_get_recp_frm_fw since we only
need to have fresh recp_to_profile mapping when we we check FW to see if
the recipe we are trying to add already exists in FW.

Signed-off-by: Shivanshu Shukla <shivanshu.shukla@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2019-06-28 20:31:49 +02:00
Leyi Rong
776b48c112 net/ice/base: allow forward to Q groups in switch rule
Enable forward to Q group action in ice_add_adv_rule.

Signed-off-by: Dan Nowlin <dan.nowlin@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2019-06-28 20:31:49 +02:00
Leyi Rong
839c0a4b77 net/ice/base: enable additional switch rules
Add capability to create inner IP and inner TCP switch recipes and
rules. Change UDP tunnel dummy packet to accommodate the training of
these new rules.

Signed-off-by: Dan Nowlin <dan.nowlin@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2019-06-28 20:31:49 +02:00
Leyi Rong
884efe3ca1 net/ice/base: add VXLAN/generic tunnel management
Added routines for handling tunnel management:
	- ice_tunnel_port_in_use()
	- ice_tunnel_get_type()
	- ice_find_free_tunnel_entry()
	- ice_create_tunnel()
	- ice_destroy_tunnel()

Signed-off-by: Dan Nowlin <dan.nowlin@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2019-06-28 20:31:49 +02:00
Leyi Rong
b2de221a3b net/ice/base: add some minor new defines
1. Add defines for Link Topology Netlist Section.
2. Add missing Read MAC command response bits.
3. Adds AQ error 29.

Signed-off-by: Jacek Naczyk <jacek.naczyk@intel.com>
Signed-off-by: Lev Faerman <lev.faerman@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2019-06-28 20:31:49 +02:00
Leyi Rong
fdafeee39a net/ice/base: refactor VSI node scheduler
Refactored VSI node sched code to use port_info ptr as call arg.

The declaration of VSI node getter function has been modified to use
pointer to ice_port_info structure instead of pointer to hw structure.
This way suitable port_info structure is used to find VSI node.

Signed-off-by: Grzegorz Nitka <grzegorz.nitka@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2019-06-28 20:31:49 +02:00
Leyi Rong
5c7057d02a net/ice/base: cleanup flex pipe files
Make functions that can be, static. Remove some code that is not
currently called.

Signed-off-by: Bruce Allan <bruce.w.allan@intel.com>
Signed-off-by: Paul M Stillwell Jr <paul.m.stillwell.jr@intel.com>
Signed-off-by: Leyi Rong <leyi.rong@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
2019-06-28 20:31:49 +02:00