Commit Graph

2887 Commits

Author SHA1 Message Date
Andrew Rybchenko
ec9217f90f net/sfc: move EvQ entries to the EvQ control structure
EvQ info array is a problem on device reconfigure when number of
Rx and Tx queues may change. It is a step to get rid of it.

Fixes: 58294ee65a ("net/sfc: support event queue")
Cc: stable@dpdk.org

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
2017-04-04 19:03:00 +02:00
Andrew Rybchenko
a96eaf4e65 net/sfc: remove unused max entries from EvQ info
Fixes: 58294ee65a ("net/sfc: support event queue")
Cc: stable@dpdk.org

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
2017-04-04 19:03:00 +02:00
Andrew Rybchenko
298951a402 net/sfc: bind EvQ DMA space to EvQ type and type-local index
The index of an event queue index is computed from the index of the
corresponding transmit or receive queue, and depends on the total
number of receive queues. As a consequence, the index of an event
queue bound to a transmit queue changes if the total number of
receive queues is changed.

Fixes: 58294ee65a ("net/sfc: support event queue")
Cc: stable@dpdk.org

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
2017-04-04 19:02:59 +02:00
Andrew Rybchenko
5259739677 net/sfc: clarify interrupts support function names
Make it clear that corresponding functions should be called on device
configure and close operations. No functional change.

Fixes: 06bc197796 ("net/sfc: interrupts support sufficient for event queue init")
Cc: stable@dpdk.org

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2017-04-04 19:02:59 +02:00
Andrew Rybchenko
b3b667c992 net/sfc: do not drop TSO on device configure
If Tx datapath does not support TSO, TSO was dropped on device configure.
It is incorrect to change advertised offloads.

Fixes: 7a4d44a639 ("net/sfc: make TSO a datapath-dependent feature")

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2017-04-04 19:02:59 +02:00
Andrew Rybchenko
329472d444 net/sfc: choose datapaths after probe and before attach
Datapath choice requires NIC capabilities knowledge and, therefore,
should be done after probe. Whereas NIC resources estimation needs
to know chosen datapath (e.g. if Tx datapath is going to use TSO).

Fixes: df1bfde4ff ("net/sfc: factor out libefx-based Rx datapath")

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2017-04-04 19:02:59 +02:00
Andrew Rybchenko
9137da46e9 net/sfc: use correct function to free scattered packet on Rx
Put to mempool does not free chained segments.

Fixes: e0b063941e ("net/sfc: support scattered Rx DMA")
Cc: stable@dpdk.org

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2017-04-04 19:02:59 +02:00
Alex Zelezniak
f8a5ab5206 net/ixgbe: ping VF when PF status changes
Signed-off-by: Alex Zelezniak <alexz@att.com>
Acked-by: Wei Dai <wei.dai@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-04-04 19:02:59 +02:00
Beilei Xing
da610604b8 net/i40e: enable tunnel filter for MPLS
MPLSoUDP & MPLSoGRE is not supported by tunnel
filter due to limited resource of HW, this patch
enables MPLS tunnel filter by replacing inner_mac
filter.

This configuration will be set when adding MPLSoUDP
and MPLSoGRE filter rules, and it will be invalid
only by NIC core reset.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2017-04-04 19:02:58 +02:00
Beilei Xing
af134bc0ed net/i40e: add flow API MPLS parsing function
This patch add MPLS parsing function to support MPLS filtering.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2017-04-04 19:02:58 +02:00
Andrew Rybchenko
0c16506e59 net/sfc: fix leak if EvQ DMA space allocation fails
Fixes: 58294ee65a ("net/sfc: support event queue")
Cc: stable@dpdk.org

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2017-04-04 19:02:58 +02:00
Andrew Rybchenko
940a34faf4 net/sfc: destroy event queue when Tx queue is released
Fixes: b1b7ad933b ("net/sfc: set up and release Tx queues")
Cc: stable@dpdk.org

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2017-04-04 19:02:58 +02:00
Andrew Rybchenko
6774b24e28 net/sfc: destroy event queue when Rx queue is released
Fixes: ce35b05c63 ("net/sfc: implement Rx queue setup release operations")
Cc: stable@dpdk.org

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2017-04-04 19:02:58 +02:00
Nélio Laranjeiro
959be52e93 net/mlx5: fix Tx when first segment size is too short
First segment size must be at least 18 bytes, packets not respecting this
are silently not sent by the NIC but counted as sent by the PMD.  The only
way to figure out is compiling the PMD in debug mode.

Fixes: 6579c27c11 ("net/mlx5: remove gather loop on segments")
Cc: stable@dpdk.org

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
2017-04-04 19:02:58 +02:00
Harish Patil
1ef4c3a5c1 net/qede: prevent crash while changing MTU dynamically
The driver can handle dynamic MTU change without needing the port to be
stopped explicitly by the application. However, there is currently no
check to prevent I/Os from happening on a different thread while the
port is going thru' reset internally. This patch fixes this issue by
assigning RX/TX burst functions to a dummy function and also reconfigure
RX bufsize for each rx queue based on the new MTU value.

Fixes: 200645ac79 ("net/qede: set MTU")
Cc: stable@dpdk.org

Signed-off-by: Harish Patil <harish.patil@qlogic.com>
2017-04-04 19:02:57 +02:00
Harish Patil
8130abb3ec net/qede: fix VF RSS configuration
The newer SR-IOV PF drivers expects RX/TX queues to be created before
applying RSS configuration. This patch addresses this requirement by
deferring RSS configuration till the queues are created. Even though
this issue is only seen in SR-IOV context, the changes will be made
applicable to PF also to keep the behavior consistent between VF/PF.

Fixes: 7ab35bf6b9 ("net/qede: fix RSS")
Cc: stable@dpdk.org

Signed-off-by: Harish Patil <harish.patil@qlogic.com>
2017-04-04 19:02:57 +02:00
Harish Patil
82bd0987bd net/qede: fix missing UDP protocol in RSS offload types
Both UDP and TCP based RSS offload types are supported by the device.
This patch adds UDP protocol which got missed out in the original patch.

Fixes: 4c98f2768e ("net/qede: support RSS hash configuration")
Cc: stable@dpdk.org

Signed-off-by: Harish Patil <harish.patil@qlogic.com>
2017-04-04 19:02:57 +02:00
Beilei Xing
6765eda2fc net/i40e: support getting all loaded DDP profiles
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2017-04-04 19:02:56 +02:00
Beilei Xing
5b276d570e net/i40e: add dynamic device personalization processing
Add support for loading a dynamic device personalization profile (DDP).

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2017-04-04 19:02:56 +02:00
Beilei Xing
15f943dfe4 net/i40e: refine consistent tunnel filter
Add i40e_tunnel_type enumeration type to refine consistent
tunnel filter, it will be esay to add new tunnel type for
i40e.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2017-04-04 19:02:56 +02:00
Beilei Xing
c50474f31e net/i40e: support tunnel filter to VF
Previously, only tunnel filter to PF is supported.
This patch adds i40e_dev_consistent_tunnel_filter_set
function for consistent filter API to support tunnel
filter to VF.

Signed-off-by: Yong Liu <yong.liu@intel.com>
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2017-04-04 19:02:56 +02:00
Beilei Xing
6e9de780e2 net/i40e: rename tunnel filter function
Change tunnel filter function name to VXLAN filter
function, prepare for other tunnel filter function.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2017-04-04 19:02:56 +02:00
Beilei Xing
e4841470b4 net/i40e: rework tunnel filter functions
Rework tunnel filter functions to align with the
new command buffer for add/remove cloud filter.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2017-04-04 19:02:55 +02:00
Zhiyong Yang
3f5e137097 net/vhost: remove limit of vhost Rx burst size
vhost removes limit of Rx burst size(32 pkts) and supports to make
an best effort to receive pkts.

Cc: yuanhan.liu@linux.intel.com
Cc: maxime.coquelin@redhat.com
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2017-04-04 19:02:55 +02:00
Zhiyong Yang
7cd1dbf4ff net/vhost: remove limit of vhost Tx burst size
vhost removes limit of Tx burst size(32 pkts) and supports to make
an best effort to transmit pkts.

Cc: yuanhan.liu@linux.intel.com
Cc: maxime.coquelin@redhat.com
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2017-04-04 19:02:55 +02:00
Zhiyong Yang
646412f9ff net/ixgbe: remove limit of Tx burst size
To add a wrapper function to remove the limit of tx burst size and
implement the "make an best effort to transmit the pkts" policy.
The patch makes ixgbe vec function work in a consistent behavior
like ixgbe_xmit_pkts_simple and ixgbe_xmit_pkts do that.

Cc: Helin Zhang <helin.zhang@intel.com>
Cc: Konstantin Ananyev <konstantin.ananyev@intel.com>
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2017-04-04 19:02:55 +02:00
Zhiyong Yang
5fc4acc31d net/i40e: remove limit of Tx burst size
To add a wrapper function to remove the limit of tx burst size. The patch
makes i40e vec function an best effort to transmit the pkts in the
consistent behavior like i40e_xmit_pkts_simple and i40e_xmit_pkts do that.

Cc: Helin Zhang <helin.zhang@intel.com>
Cc: Jingjing Wu <jingjing.wu@intel.com>
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2017-04-04 19:02:55 +02:00
Zhiyong Yang
d6a33bbf65 net/fm10k: remove limit of Tx burst size
To add a wrapper function to remove the limit of tx burst size.
The patch makes fm10k vec function an best effort to transmit
pkts in the consistent behavior like fm10k_xmit_pkts does that.

Cc: Jing Chen <jing.d.chen@intel.com>
Signed-off-by: Zhiyong Yang <zhiyong.yang@intel.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
2017-04-04 19:02:55 +02:00
Rasesh Mody
755e3fa70d net/qede: update PMD version to 2.4.0.1
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:55 +02:00
Harish Patil
29540be7ef net/qede: support LRO/TSO offloads
This patch includes slowpath configuration and fastpath changes
to support LRO and TSO. A bit of revamping is needed in order
to make use of existing packet classification schemes in Rx fastpath
and for SG element processing in Tx.

Signed-off-by: Harish Patil <harish.patil@qlogic.com>
2017-04-04 19:02:55 +02:00
Harish Patil
622075356e net/qede: support ntuple and flow director filter
Add limited support for ntuple filter and flow director configuration.
The filtering is based on 4-tuples viz src-ip, dst-ip, src-port,
dst-port. The mask fields, tcp_flags, flex masks, priority fields,
Rx queue drop etc are not supported.

Signed-off-by: Harish Patil <harish.patil@qlogic.com>
2017-04-04 19:02:55 +02:00
Harish Patil
5343700290 net/qede/base: support ARFS mode
Add base driver APIs to enable accelerated RFS[aRFS] mode and ramrod
to configure rfs and ntuple filter.

Signed-off-by: Harish Patil <harish.patil@qlogic.com>
2017-04-04 19:02:55 +02:00
Rasesh Mody
7a5dfdc1f3 net/qede/base: semantic changes
Make APIs static and other semantic changes.
A step toward cleaning 'make C=1' with GCC 4.8.3.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:54 +02:00
Rasesh Mody
39f0eb3bbb net/qede/base: prevent race condition during unload
Merge hw_stop and hw_reset into one function.
Prevent race condition between MFW attentions and pf stop command during
unload flow that causes an ASSERT.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:54 +02:00
Rasesh Mody
eb8e81ad0d net/qede/base: multi-Txq support on same queue-zone for VFs
A step toward having multi-Txq support on same queue-zone for VFs.

This change takes care of:

 - VFs assume a single CID per-queue, where queue X receives CID X.
   Switch to a model similar to that of PF - I.e., Use different CIDs
   for Rx/Tx, and use mapping to acquire/release those. Each VF
   currently will have 32 CIDs available for it [for its possible 16
   Rx & 16 Tx queues].

 - To retain the same interface for PFs/VFs when initializing queues,
   the base driver would have to retain a unique number per-each queue
   that would be communicated in some extended TLV [current TLV
   interface allows the PF to send only the queue-id]. The new TLV isn't
   part of the current change but base driver would now start adding
   such unique keys internally to queue_cids. This would also force
   us to start having alloc/setup/free for L2 [we've refrained from
   doing so until now]
   The limit would be no-more than 64 queues per qzone [This could be
   changed if needed, but hopefully no one needs so many queues]

 - In IOV, Add infrastructure for up to 64 qids per-qzone, although
   at the moment hard-code '0' for Rx and '1' for Tx [Since VF still
   isn't communicating via new TLV which index to associate with a
   given queue in its queue-zone].

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:54 +02:00
Rasesh Mody
eb6088c168 net/qede/base: prevent DMAE transactions during recovery
Prevent DMA engine transactions during recovery phase.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:54 +02:00
Rasesh Mody
4727343d27 net/qede/base: add UDP ports in bulletin board message
Add UDP ports in bulletin board message.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:54 +02:00
Rasesh Mody
35da959606 net/qede/base: allow PMD to control vport and RSS engine ids
Let PMD have control over the vport-id and rss-eng-id of a given VF
during initialization.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:54 +02:00
Rasesh Mody
615438cba3 net/qede/base: add PF parameter
Add a common enum to pf_params for RDMA.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:54 +02:00
Rasesh Mody
0863dbe396 net/qede/base: move code bits
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:54 +02:00
Rasesh Mody
e32dc0f722 net/qede/base: zero out MFW mailbox data
Zero the whole union data of the Management FW mailbox before copying
the actual union member

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:54 +02:00
Rasesh Mody
2c3945f6b8 net/qede/base: add return code check
Add a check of the return code of ecore_mcp_cmd_and_union() in
ecore_mcp_send_protocol_stats()

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:54 +02:00
Rasesh Mody
49ca6a7bcb net/qede/base: set max values for soft resources
Add support for the new interface with the Management FW for setting
max values of "soft" resources.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:53 +02:00
Rasesh Mody
6da551eeac net/qede/base: add macro for unsupported command
Add a macro for unsupported management FW command

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:53 +02:00
Rasesh Mody
619618b938 net/qede/base: add mailbox for resource allocation
Add the Management FW mailbox for getting non-l2 resource allocation
information.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:53 +02:00
Rasesh Mody
4cf46f140c net/qede/base: add macro got resource value message
Add macro got resource value message

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:53 +02:00
Rasesh Mody
6b8962e0ef net/qede/base: support coalescing for VF
Add coalescing support for VFs.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:53 +02:00
Rasesh Mody
6ccecc10ba net/qede/base: update bulletin board during VF init
Updated bulletin board with link state during VF initialization.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:53 +02:00
Rasesh Mody
2e2680e0d2 net/qede/base: support non-L2 dcbx tlv application
Add non-l2 dcbx tlv application support.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:53 +02:00
Rasesh Mody
0b6bf70d7e net/qede/base: support previous driver unload
New driver/management fw load request sequence for handling previous
driver unload.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:53 +02:00
Rasesh Mody
a261b214b2 net/qede/base: change valloc to vzalloc
Change OSAL_VALLOC() into OSAL_VZALLOC() which would also zero memory.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:53 +02:00
Rasesh Mody
69d7ba88f1 net/qede/base: use L2-handles for RSS configuration
Move RSS configuration into using L2-handles instead of queue-ids.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:53 +02:00
Rasesh Mody
d9c2569c78 net/qede/base: add new image types
Add new image types - RECOVERY and PK (Public Key) towards
the second phase of NVRAM security support.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:52 +02:00
Rasesh Mody
a5e7b7a2ee net/qede/base: remove clock slowdown option
Remove clock slowdown NVM config option as this is not supported
for current chipsets.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:52 +02:00
Rasesh Mody
8a20e270f3 net/qede/base: add API for using MFW resource lock
Add base driver API for using the Management FW resource lock

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:52 +02:00
Rasesh Mody
70ab4d3d46 net/qede/base: add mask/shift defines for resource command
Add several mask/shift defines for the resource command

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:52 +02:00
Rasesh Mody
0e9c6de362 net/qede/base: prevent transmitter stuck condition
Change OOO TC properly to prevent transmitter stuck condition
due to credit underruns.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:52 +02:00
Rasesh Mody
45cf58a14f net/qede/base: formatting changes
Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:52 +02:00
Rasesh Mody
0b090fd364 net/qede/base: support tunnelling for VF
Add new tunnelling support for VFs.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:52 +02:00
Rasesh Mody
adce1f86f8 net/qede/base: revise tunnel APIs/structs
Revise tunnel APIs/structs.
 - Unite tunnel start and update params in single struct
   "ecore_tunnel_info"
 - Remove A0 chip tunnelling support.
 - Added per tunnel info - removed bitmasks.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:52 +02:00
Rasesh Mody
a7f3cac315 net/qede/base: change infrastructure for VF tunnelling
Infrastructure changes for VF tunnelling.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:52 +02:00
Rasesh Mody
6a0f9f5c62 net/qede/base: optimize cache-line access
Optimize cache-line access in ecore_chain -
re-arrange fields so that fields that are needed for fastpath
[mostly produce/consume and their derivatives] are in the first cache
line, and the rest are in the second.

This is true for both PBL and NEXT_PTR kind of chains.
Advancing a page in a SINGLE_PAGE chain would still require the 2nd
cacheline as well, but afaik only SPQ uses it and so it isn't
considered as 'fastpath'.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:52 +02:00
Rasesh Mody
43ef668c18 net/qede/base: support handling TLV request from MFW
Add support for handling the TLV request from Management FW.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:51 +02:00
Rasesh Mody
a55e422e4e net/qede/base: make L2 queues handle based
L2 handler changes:

This is change to remove the queue-id/qzone difference for Tx queues.

It does that by mainly doing:

a. VFs queues are no longer determined by the SBs they're using.
Instead, the ecore-client needs to maintain those and choose the values
to be used by VF when initializing it.

b. Eliminate the HW-cid array in the hw-function.
To do that, have all the rx/tx functionality turn into 'handle' base -
when queue would be started the caller would get a (void*) handle,
which it would later use with ecore for configuring various
queue-related stop [update, close].

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:51 +02:00
Rasesh Mody
d411a2b5e4 net/qede/base: refactor code of SP queues
Maintain slowpath event queue and consumer queue within HW function
structure, update corresponding alloc and free APIs accordingly.
Cleanup unused code under CONFIG_ECORE_LL2 ifdef.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:51 +02:00
Rasesh Mody
ea7c1c6f37 net/qede/base: add interfaces for MFW TLV request processing
Add new base driver interfaces for Management FW TLV request processing.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:51 +02:00
Rasesh Mody
978580d86c net/qede/base: prevent driver load with invalid resources
Prevent storage drivers from attempting to load with invalid resources.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:51 +02:00
Rasesh Mody
de5588af0b net/qede/base: set driver type before sending load request
Set the drv_type before sending LOAD_REQ and remove the
ver_str which is not used by the MFW

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:51 +02:00
Rasesh Mody
bd96f72ff9 net/qede/base: check active VF queues before stopping
Make sure VF queue are closed before stopping vport.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:51 +02:00
Rasesh Mody
4fc58baef7 net/qede/base: print firmware MFW and MBI versions
Add a printout of the FW, Management FW and MBI versions.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:51 +02:00
Rasesh Mody
5ef4119332 net/qede/base: revamp qm initialization
This patch revamps queue initialization.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:51 +02:00
Rasesh Mody
6b190a9873 net/qede/base: allow only trusted VFs to be promisc
Allow only trusted VFs to be promisc/multi-promisc. The reasonable
thing is to use the 'trusted' node instead of simply allowing VFs to
become promiscuous.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:51 +02:00
Rasesh Mody
3750b3f8d8 net/qede/base: remove unneeded step in HW init
There is no need to close the OUT_EN NIG registers, so remove that.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:51 +02:00
Rasesh Mody
86030347db net/qede/base: allow probe to succeed with minor HW-issues
Allow probe to succeed with various 'minor' HW-issues [if requested]

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:51 +02:00
Rasesh Mody
bdf4267dde net/qede/base: read card personality via MFW commands
Add support to read NIC personality via management FW for non-L2
protocols.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:50 +02:00
Rasesh Mody
f60ec68828 net/qede/base: prevent device init failure
Device initialization flow should not be failed because the FW interface
command is not available.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:50 +02:00
Rasesh Mody
8764367752 net/qede/base: update MFW when default MTU is changed
Send mailbox command to Management FW when MTU changes.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:50 +02:00
Rasesh Mody
2dfd074e6c net/qede/base: change queue/sb-id from 8 bit to 16 bit
Change the queue/sb-id values from 8 bit fields to 16 bit fields.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:50 +02:00
Rasesh Mody
5c11b7066f net/qede/base: use default MTU from shared memory
Read and use the default MTU value from shared-memory.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:50 +02:00
Rasesh Mody
5c66fd8592 net/qede/base: add comment
Add a comment for the endianness manipulation in
ecore_mcp_send_drv_version().

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:50 +02:00
Rasesh Mody
48ba75dd7d net/qede/base: add nvram options
Add a bunch of NVRAM options like MCOT, FEC selection, temperature
threshold, Reset On Lan, etc.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:50 +02:00
Rasesh Mody
bb42c23b19 net/qede/base: remove attribute from update current config
Remove attribute field from update_current_config() API, Management FW
need to know only the last entity who configured the device.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:50 +02:00
Rasesh Mody
8bb13112f3 net/qede/base: move mask constants defining NIC type
Move mask constants defining NIC type to ecore.h

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:50 +02:00
Rasesh Mody
47a06aaf5a net/qede/base: decrease maximum HW func per device
Decrease MAX_HWFNS_PER_DEVICE from 4 to 2

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:50 +02:00
Rasesh Mody
806474a684 net/qede: upgrade the FW to 8.18.9.0
This patchset adds changes to upgrade to 8.18.9.0 FW.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:50 +02:00
Rasesh Mody
69ff7477b7 net/qede/base: utilize FW 8.18.9.0
This change is in preparation to work with new FW 8.18.9.0.
Rename the defines to use E4_ and structs to use e4_. This renaming
is to add support for future chipsets.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:49 +02:00
Rasesh Mody
1a998268bf net/qede/base: print various indication on Tx-timeouts
Print various indication on Tx-timeouts.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:49 +02:00
Rasesh Mody
f061e24d8d net/qede/base: mask Rx buffer attention bits
Mask the BRB "RC0_EOP_OUT_SYNC_FIFO_PUSH_ERROR" attention.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:49 +02:00
Rasesh Mody
3ca097bbb2 net/qede/base: send FW version driver state to MFW
Add support to send FW version and driver state to Management FW.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:49 +02:00
Rasesh Mody
63efb906ba net/qede/base: return an initialized return value
Make sure ecore_iov_mark_vf_flr() always returns an initialized return
value.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 19:02:49 +02:00
Xiao Wang
6a1db11448 net/fm10k: fix pointer cast
The device specific data is located at dev->data->dev_private.

Fixes: 162f32290a ("fm10k: move parameters initialization")
Fixes: 039991bc28 ("fm10k: add vector pre-condition check")
Fixes: 77a8ab47eb ("fm10k: select best Rx function")
Cc: stable@dpdk.org

Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-04-04 19:02:49 +02:00
Allain Legacy
82e140b849 net/avp: handle interrupt migration
This commit introduces changes required to support VM live-migration.  This
is done by registering and responding to interrupts coming from the host to
signal that the memory is about to be made invalid and replaced with a new
memory zone on the destination compute node.

Enabling and disabling of the interrupts are maintained outside of the
start/stop functions because they must be enabled for the lifetime of the
device.  This is so that host interrupts are serviced and acked even in
cases where the app may have stopped the device.

Signed-off-by: Allain Legacy <allain.legacy@windriver.com>
Signed-off-by: Matt Peters <matt.peters@windriver.com>
Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
2017-04-04 19:02:19 +02:00
Allain Legacy
ea37523dbc net/avp: add device start and stop operations
Adds support for device start and stop functions.  This allows an
application to control the administrative state of an AVP device.  Stopping
the device will notify the host application to stop sending packets on that
device's receive queues.

Signed-off-by: Allain Legacy <allain.legacy@windriver.com>
Signed-off-by: Matt Peters <matt.peters@windriver.com>
Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
2017-04-04 19:02:19 +02:00
Allain Legacy
8129545e31 net/avp: add device promiscuous functions
Adds support for setting and clearing promiscuous mode on an AVP device.
When enabled the _mac_filter function will allow packets destined to any
MAC address to be processed by the receive functions.

Signed-off-by: Allain Legacy <allain.legacy@windriver.com>
Signed-off-by: Matt Peters <matt.peters@windriver.com>
Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
2017-04-04 19:02:19 +02:00
Allain Legacy
5a5abe2de9 net/avp: add device statistics operations
Adds device functions to query and reset statistics.

Signed-off-by: Allain Legacy <allain.legacy@windriver.com>
Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
2017-04-04 19:02:18 +02:00
Allain Legacy
295abce2d2 net/avp: add packet transmit functions
Adds support for packet transmit functions so that an application can send
packets to the host application via an AVP device queue.  Both the simple
and scattered functions are supported.

Signed-off-by: Allain Legacy <allain.legacy@windriver.com>
Signed-off-by: Matt Peters <matt.peters@windriver.com>
Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
2017-04-04 19:02:18 +02:00
Allain Legacy
50db69fdea net/avp: add packet receive functions
Adds function required for receiving packets from the host application via
AVP device queues.  Both the simple and scattered functions are supported.

Signed-off-by: Allain Legacy <allain.legacy@windriver.com>
Signed-off-by: Matt Peters <matt.peters@windriver.com>
Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
2017-04-04 19:02:18 +02:00
Allain Legacy
cce4367fb4 net/avp: add queue setup and release
Adds queue management operations so that an application can setup and
release the transmit and receive queues.

Signed-off-by: Allain Legacy <allain.legacy@windriver.com>
Signed-off-by: Matt Peters <matt.peters@windriver.com>
Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
2017-04-04 19:02:18 +02:00
Allain Legacy
1a85922369 net/avp: add device configuration
Adds support for "dev_configure" operations to allow an application to
configure the device.

Signed-off-by: Allain Legacy <allain.legacy@windriver.com>
Signed-off-by: Matt Peters <matt.peters@windriver.com>
Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
2017-04-04 19:02:18 +02:00
Allain Legacy
c0ad584222 net/avp: add device initialization
Adds support for initialization newly probed AVP PCI devices.  Initial
queue translations are setup in preparation for device configuration.

Signed-off-by: Allain Legacy <allain.legacy@windriver.com>
Signed-off-by: Matt Peters <matt.peters@windriver.com>
Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
2017-04-04 19:02:18 +02:00
Allain Legacy
908072e9d0 net/avp: support driver registration
Adds the initial framework for registering the driver against the support
PCI device identifiers.

Signed-off-by: Allain Legacy <allain.legacy@windriver.com>
Signed-off-by: Matt Peters <matt.peters@windriver.com>
Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
2017-04-04 19:02:18 +02:00
Allain Legacy
8c7bb9c991 net/avp: add debug log macros
Adds a header file with log macros for the AVP PMD

Signed-off-by: Allain Legacy <allain.legacy@windriver.com>
Signed-off-by: Matt Peters <matt.peters@windriver.com>
Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
2017-04-04 19:02:18 +02:00
Allain Legacy
8e680655e2 net/avp: add public header files
Adds public/exported header files for the AVP PMD.  The AVP device is a
shared memory based device.  The structures and constants that define the
method of operation of the device must be visible by both the PMD and the
host DPDK application.  They must not change without proper version
controls and updates to both the hypervisor DPDK application and the PMD.

The hypervisor DPDK application is a Wind River Systems proprietary
virtual switch.

Signed-off-by: Allain Legacy <allain.legacy@windriver.com>
Signed-off-by: Matt Peters <matt.peters@windriver.com>
Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
2017-04-04 19:02:18 +02:00
Allain Legacy
9201ec9bd0 net/avp: add base files
This commit introduces the AVP PMD file structure without adding any actual
driver functionality.  Functional blocks will be added in later patches.

Signed-off-by: Allain Legacy <allain.legacy@windriver.com>
Signed-off-by: Matt Peters <matt.peters@windriver.com>
Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
2017-04-04 19:02:07 +02:00
Gaetan Rivet
5525aa8fad net/mlx5: fix returned values upon failed probing
Fixes: 771fa900b7 ("mlx5: introduce new driver for Mellanox ConnectX-4 adapters")
Cc: stable@dpdk.org

Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2017-04-04 18:59:51 +02:00
Gaetan Rivet
9e09761b43 net/mlx4: fix returned values upon failed probing
Let error messages in place, but return unambiguous values upon
probing errors.

Fixes: 66e1591687 ("mlx4: avoid init errors when kernel modules are not loaded")
Cc: stable@dpdk.org

Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2017-04-04 18:59:51 +02:00
Vasily Philipov
edad38fcd0 net/mlx: enhance Rx scatter mode detection
Toggle Rx scatter mode based on the scatter_enable flag and the maximum
packet size only instead of deriving this information from the jumbo_frame
setting and the MTU configuration.

Signed-off-by: Vasily Philipov <vasilyf@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2017-04-04 18:59:51 +02:00
Gaetan Rivet
001a520e41 net/mlx4: add port parameter
Most ConnectX-3 adapters expose two physical ports on a single PCI bus
address.

Add a new port parameter allowing the user to choose
either or both physical ports to be used by the application.

This parameter is used as follows:

Selecting only the second port:
   -w 00:00.0,port=1

Selecting both ports:
   -w 00:00.0,port=0,port=1

If no parameter is given, the default behavior is unchanged: all ports
are probed.

Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2017-04-04 18:59:51 +02:00
Wenzhuo Lu
04c8542f96 net/i40e: set TC strict priority mode
Set some TCs to strict priority mode.
It's a global setting on a physical port.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2017-04-04 18:59:50 +02:00
Wenzhuo Lu
2b5518b705 net/i40e: set VF TC max bandwidth from PF
Set a specific TC's max bandwidth on a VF.
User can call the API to set VF TC's max bandwidth
from PF.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2017-04-04 18:59:50 +02:00
Wenzhuo Lu
1e58b1426a net/i40e: allocate VF TC bandwidth from PF
Allocate all TCs' relative bandwidth (percentage) on
a specific VF.
It can be taken as relative min bandwidth setting.
User can call the API to set VF TC's min bandwidth
from PF.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2017-04-04 18:59:50 +02:00
Wenzhuo Lu
fa69d1e4f4 net/i40e: set VF max bandwidth from PF
Support setting VF max bandwidth from PF.
User can call the API on PF to set a specific VF's
max bandwidth.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2017-04-04 18:59:50 +02:00
Shijith Thotton
e70d2ae598 net/liquidio: add API to add and remove VLAN port
Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
2017-04-04 18:59:50 +02:00
Shijith Thotton
a2186b91b9 net/liquidio: add API to close device
Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
2017-04-04 18:59:50 +02:00
Shijith Thotton
668eb76371 net/liquidio: add API to stop device
Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
2017-04-04 18:59:50 +02:00
Shijith Thotton
932aeb387e net/liquidio: add APIs for hardware stats
Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
2017-04-04 18:59:50 +02:00
Shijith Thotton
04006cc2d0 net/liquidio: support Tx stats
Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
2017-04-04 18:59:50 +02:00
Shijith Thotton
47abece264 net/liquidio: support Rx stats
Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
2017-04-04 18:59:49 +02:00
Shijith Thotton
0b83930de2 net/liquidio: add APIs to configure UDP tunnel port
Add APIs to configure VXLAN port and enable tunnel checksum.

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
2017-04-04 18:59:49 +02:00
Shijith Thotton
9f1c1dfbe4 net/liquidio: add APIs to set link up and down
Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
2017-04-04 18:59:49 +02:00
Shijith Thotton
59a71cf7ec net/liquidio: add APIs to enable and disable multicast
Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
2017-04-04 18:59:49 +02:00
Shijith Thotton
605164c8e7 net/liquidio: add API to validate VF MTU
Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
2017-04-04 18:59:49 +02:00
Shijith Thotton
1ad8f10bc9 net/liquidio: add API to get device info
Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
2017-04-04 18:59:49 +02:00
Shijith Thotton
71867a4ee6 net/liquidio: support RSS
Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
2017-04-04 18:59:49 +02:00
Shijith Thotton
432dbfde1d net/liquidio: add API to control Rx
Enable or disable packet reception.

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
2017-04-04 18:59:49 +02:00
Shijith Thotton
bc55e0545a net/liquidio: add APIs to alloc and send control command
Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
2017-04-04 18:59:49 +02:00
Shijith Thotton
3766020513 net/liquidio: add APIs to start device and update link
Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
2017-04-04 18:59:49 +02:00
Shijith Thotton
cf6bfcbea1 net/liquidio: add API to release Tx queue
Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
2017-04-04 18:59:49 +02:00
Shijith Thotton
5ee7640f95 net/liquidio: add API to flush IQ
API to flush instruction queue checks how many packets reached device
and frees associated host buffers using request list.

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
2017-04-04 18:59:49 +02:00
Shijith Thotton
68d3524267 net/liquidio: add Tx data path for multiple segments
Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
2017-04-04 18:59:49 +02:00
Shijith Thotton
1f720275d8 net/liquidio: add Tx data path for single segment
Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
2017-04-04 18:59:49 +02:00
Shijith Thotton
d749e52f3e net/liquidio: add APIs to enable and disable IO queues
Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
2017-04-04 18:59:49 +02:00
Shijith Thotton
990c41eea8 net/liquidio: add APIs for SG list
Add APIs to setup and free Scatter-Gather list. SG list is used while
sending packets with multiple segments.

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
2017-04-04 18:59:48 +02:00
Shijith Thotton
1d395422f8 net/liquidio: add API to setup Tx queue
Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
2017-04-04 18:59:48 +02:00
Shijith Thotton
9a30013b98 net/liquidio: add API to release Rx queue
Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
2017-04-04 18:59:48 +02:00
Shijith Thotton
3e4b5980e2 net/liquidio: add Rx data path
Add APIs to receive packets and re-fill ring buffers.

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
2017-04-04 18:59:48 +02:00
Shijith Thotton
aae280047d net/liquidio: initialize Rx queue
Initialize Rx queue registers and allocate packet buffers for Rx queue.

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
2017-04-04 18:59:48 +02:00
Shijith Thotton
191447ce23 net/liquidio: add API to setup Rx queue
Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
2017-04-04 18:59:48 +02:00
Shijith Thotton
c6186279df net/liquidio: add API to configure device
Add API to configure device and initialize ethernet device operations.

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
2017-04-04 18:59:48 +02:00
Shijith Thotton
64af21f803 net/liquidio: add API to send packet to device
Add API to send control and data packets to device. Request list keeps
track of host buffers to be freed till it reaches device.

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
2017-04-04 18:59:48 +02:00
Shijith Thotton
9a84a107b0 net/liquidio: add APIs for response list
Add APIs to setup and process response list. Response list holds soft
commands waiting for response from device. Entries of this list are
processed to check for command response or timeout.

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
2017-04-04 18:59:48 +02:00
Shijith Thotton
32601eae6b net/liquidio: add APIs to allocate and free soft command
Get buffers from SC buffer pool and create soft command. Buffers are
freed to the pool once the command reaches device.

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
2017-04-04 18:59:48 +02:00
Shijith Thotton
460da0e789 net/liquidio: add APIs to allocate and free SC buffer pool
Soft command (SC) holds device control command and related information.
SC buffer pool holds buffers which are used during soft command
allocation.

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
2017-04-04 18:59:48 +02:00
Shijith Thotton
04443cf258 net/liquidio: add API to setup IQ
Map instruction queue registers and set queue size.

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
2017-04-04 18:59:48 +02:00
Shijith Thotton
b8b4c62180 net/liquidio: add APIs to allocate and free IQ
Instruction queue (IQ) is used to send control and data packets to
device from host. IQ 0 is used to send device configuration commands
during initialization and later re-allocated as per application
requirement.

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
2017-04-04 18:59:48 +02:00
Shijith Thotton
cdb166963c net/liquidio: add API for VF FLR
VF sends Function Level Reset request to PF using mbox and PF does the
reset.

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
2017-04-04 18:59:48 +02:00
Shijith Thotton
e86d79d05a net/liquidio: add API for PF VF handshake
Handshake with PF kernel driver to check driver version compatibility.

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
2017-04-04 18:59:48 +02:00
Shijith Thotton
0bfe758858 net/liquidio: add API to setup mbox registers
Map and initialize mbox registers.

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
2017-04-04 18:59:48 +02:00
Shijith Thotton
dc8c13d049 net/liquidio: add mbox APIs for PF VF communication
Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
2017-04-04 18:59:47 +02:00
Shijith Thotton
ba5f9ac56b net/liquidio: add API to setup IO queue registers
Set default configuration values for input and output queue registers.

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
2017-04-04 18:59:47 +02:00
Shijith Thotton
6aefdb5897 net/liquidio: add API to disable IO queues
Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
2017-04-04 18:59:47 +02:00
Shijith Thotton
9055da263f net/liquidio: initialize
Default device configuration and initialization code.

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
2017-04-04 18:59:47 +02:00
Shijith Thotton
e7f2f7127e net/liquidio/base: read and write register
Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
2017-04-04 18:59:47 +02:00
Shijith Thotton
254387db6d net/liquidio: register VF
Register LiquidIO PMD (net_liovf) and define APIs to init and uninit.

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
2017-04-04 18:59:47 +02:00
Shijith Thotton
2554832833 net/liquidio: add log
Add debug options to config file. Define macros used for log and make
use of config file options to enable them.

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
2017-04-04 18:59:47 +02:00
Shijith Thotton
828319b8d5 net/liquidio/base: add hardware register definitions
Add HW register definitions for LiquidIO II CN23XX adapter.

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
2017-04-04 18:59:47 +02:00
Shijith Thotton
de9b91e857 net/liquidio: add skeleton
Add makefile and config file options to compile PMD. Add feature and
version map file. Update maintainers file to claim responsibility.

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Derek Chickles <derek.chickles@caviumnetworks.com>
Signed-off-by: Venkat Koppula <venkat.koppula@caviumnetworks.com>
Signed-off-by: Srisivasubramanian S <ssrinivasan@caviumnetworks.com>
Signed-off-by: Mallesham Jatharakonda <mjatharakonda@oneconvergence.com>
2017-04-04 18:59:47 +02:00
Wenzhuo Lu
1c4da4ef96 net/ixgbe: fix TC bandwidth setting
4 and 8 TCs are supported on ixgbe. By default there're
8 TCs. So when initializing the device, the bandwidth for
8 TCs is set.
When changing the TC number, it's only considered setting
the bandwidth for 4 TCs. If the user change the number
from 4 to 8, the TCs' bandwidth is not right.

Fixes: 0807f80d35 ("ixgbe: DCB / flow control")
Cc: stable@dpdk.org

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-04-04 18:59:47 +02:00
Pascal Mazon
c0bddd3a05 net/tap: add link status notification
As tap is a virtual device, there's no physical way a link can be cut.
However, it has an associated kernel netdevice and possibly a remote
netdevice too. These netdevices link status may change outside of the
DPDK scope, through an external command such as:

  ip link set dev tapX down

This commit implements link status notification through netlink.

Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
2017-04-04 18:59:47 +02:00
Pascal Mazon
0b3e4ab9bf net/tap: improve link update
Reflect device link status according to the state of the tap netdevice
and the remote netdevice (if any). If both are UP and RUNNING, then the
device link status is set to ETH_LINK_UP, otherwise ETH_LINK_DOWN.

Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
2017-04-04 18:59:47 +02:00
Pascal Mazon
2bc06869cd net/tap: add remote netdevice traffic capture
By default, a tap netdevice is of no use when not fed by a separate
process. The ability to automatically feed it from another netdevice
allows applications to capture any kind of traffic normally destined to
the kernel stack.

This patch implements this ability through a new optional "remote"
parameter.

Packets matching filtering rules created with the flow API are matched
on the remote device and redirected to the tap PMD, where the relevant
action will be performed.

Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
Acked-by: Olga Shern <olgas@mellanox.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
2017-04-04 18:59:47 +02:00
Pascal Mazon
0781f5762c net/tap: support segmented mbufs
Support for segmented packets (scatter/gather) is mandatory for most
purposes, regardless of the MTU size. Tx packets are often the result of
mbuf concatenation, and an mbuf is not necessarily large enough for Rx
packets to fit in a single one.

Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
2017-04-04 18:59:47 +02:00
Pascal Mazon
5025409c04 net/tap: do not send packets larger than MTU
Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
2017-04-04 18:59:47 +02:00
Jerin Jacob
2d5a4b62ff net/thunderx: sync mailbox definitions with Linux PF driver
- bgx_link_status mbox definition was changed in Linux
commit 1cc702591bae ("net: thunderx: Add ethtool support")
- NIC_MBOX_MSG_RES_BIT related changes were never part of Linux PF driver

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2017-04-04 18:59:46 +02:00
Pascal Mazon
de96fe68ae net/tap: add basic flow API patterns and actions
Supported flow rules are now mapped to TC rules on the tap netdevice.
The netlink message used for creating the TC rule is stored in struct
rte_flow. That way, by simply changing a metadata in it, we can require
for the rule deletion without further parsing.

Supported items:
- eth: src and dst (with variable masks), and eth_type (0xffff mask).
- vlan: vid, pcp, tpid, but not eid.
- ipv4/6: src and dst (with variable masks), and ip_proto (0xffff mask).
- udp/tcp: src and dst port (0xffff) mask.

Supported actions:
- DROP
- QUEUE
- PASSTHRU

It is generally not possible to provide a "last" item. However, if the
"last" item, once masked, is identical to the masked spec, then it is
supported.

Only IPv4/6 and MAC addresses can use a variable mask. All other
items need a full mask (exact match).

Support for VLAN requires kernel headers >= 4.9, checked using
auto-config.sh.

Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
Acked-by: Olga Shern <olgas@mellanox.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
2017-04-04 18:59:46 +02:00
Pascal Mazon
7c25284e30 net/tap: add netlink back-end for flow API
Each kernel netdevice may have queueing disciplines set for it, which
determine how to handle the packet (mostly on egress). That's part of
the TC (Traffic Control) mechanism.

Through TC, it is possible to set filter rules that match specific
packets, and act according to what is in the rule. This is a perfect
candidate to implement the flow API for the tap PMD, as it has an
associated kernel netdevice automatically.

Each flow API rule will be translated into its TC counterpart.

To leverage TC, it is necessary to communicate with the kernel using
netlink. This patch introduces a library to help that communication.

Inside netlink.c, functions are generic for any netlink messaging.
Inside tcmsgs.c, functions are specific to deal with TC rules.

Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
Acked-by: Olga Shern <olgas@mellanox.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
2017-04-04 18:59:46 +02:00
Pascal Mazon
268483dc20 net/tap: add preliminary support for flow API
The flow API provides the ability to classify packets received by a tap
netdevice.

This patch only implements skeleton functions for flow API support, no
patterns are supported yet.

Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
Acked-by: Olga Shern <olgas@mellanox.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
2017-04-04 18:59:46 +02:00
Pascal Mazon
cf56436611 net/tap: move private elements to external header
In the next patch, access to struct pmd_internals will be necessary in
tap_flow.c to store the flows.

Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
Acked-by: Olga Shern <olgas@mellanox.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
2017-04-04 18:59:46 +02:00
Yongseok Koh
69a3d576f0 net/mlx5: fix reusing Rx/Tx queues
When configuring Rx/Tx queue, if queue already exists, it is reused. But if
the queue size is changed, it must be resized to not access/overwrite
invalid memory.

Fixes: 2e22920b85 ("mlx5: support non-scattered Tx and Rx")
Cc: stable@dpdk.org

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
2017-04-04 18:59:46 +02:00
Wenzhuo Lu
9f0645cd14 net/i40e: fix VLAN filter
VLAN filter is not working on i40e because driver need to
disable the VLAN promiscuous mode and set the VLAN filter
table.

Fixes: 5f2b0e3f76 ("net/i40e: set VF VLAN filter from PF")
Cc: stable@dpdk.org

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-04-04 18:59:46 +02:00
Jingjing Wu
de2cd512b1 net/i40e/base: new AQ commands for cloud filter
Add new admin queue function and extended fields for cloud filter:
 - Add admin queue function for Replace filter command (Opcode: 0x025F)
 - Define big buffer for extended general fields in Add/Remove
   Cloud filters command

Signed-off-by: Laura Stroe <laura.stroe@intel.com>
Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
2017-04-04 18:59:46 +02:00
Jingjing Wu
1661615d9a net/i40e/base: add VF offload flags
This patch adds:
 - ENCAP offload negotiation flag. Use the existing ENCAP_CSUM offload
   flag to negotiate GSO_UDP_TUNNEL_CSUM capability and create new ENCAP
   flag for negotiating offloads for encapsulated packets
 - RX_ENCAP_CSUM offload negotiation flag for VF to negotiate RX
   checksum capability for tunnelled packet types.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
2017-04-04 18:59:46 +02:00
Jingjing Wu
1bed3a34d5 net/i40e/base: reduce wait time for adminq command
When sending an adminq command, we wait for the command to complete in
a loop. This loop waits for an entire millisecond, when in practice the
adminq command is processed often much faster.

Change the loop to use i40e_usec_delay instead, and wait for 50 usecs
each time instead. This appears to be about the minimum time required,
based on some manual observation and testing.

The primary benefit of this change is reducing latency of various
operations in the PF driver, especially when related to having a large
number of VFs enabled.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
2017-04-04 18:59:46 +02:00
Jingjing Wu
f534142458 net/i40e/base: new AQ commands for PPP
Add admin queue functions for Pipeline Personalization Profile AQ
commands:
 - Write Recipe Command buffer (Opcode: 0x0270)
 - Get Applied Profiles list (Opcode: 0x0271)

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
2017-04-04 18:59:46 +02:00
Jingjing Wu
998c56772d net/i40e/base: fix potential out of bound array access
This is fix for klocwork issue where dcbcfg->numapps could
be greater than size of array (i.e dcbcfg->app[I40E_DCBX_MAX_APPS]).
The fix makes sure the array is not accessed past size of array
(i.e. I40E_DCBX_MAX_APPS).

Fixes: 166dceeeea ("i40e/base: add parsing for CEE DCBX TLVs")
Cc: stable@dpdk.org

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
2017-04-04 18:59:46 +02:00
Jingjing Wu
d1b4c30b24 net/i40e/base: control register read/write on X722
The X722 doesn't support the AQ command to read/write the control
register so enable it to bypass the check and use the direct read/write
method.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
2017-04-04 18:59:45 +02:00
Jingjing Wu
dc7b23c245 net/i40e/base: define bit for HW ATR evict control
On X722, we can control whether or not the hardware performs ATR
eviction. Define the correct bit so we can twiddle it.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
2017-04-04 18:59:45 +02:00
Keith Wiles
ae2a04864a net/bonding: reduce slave starvation on Rx poll
When polling the bonded ports for RX packets the old driver would
always start with the first slave in the list. If the requested
number of packets is filled on the first port in a two port config
then the second port could be starved or have larger number of
missed packet errors.

The code attempts to start with a different slave each time RX poll
is done to help eliminate starvation of slave ports. The effect of
the previous code was much lower performance for two slaves in the
bond then just the one slave.

The performance drop was detected when the application can not poll
the rings of Rx packets fast enough and the packets per second for
two or more ports was at the threshold throughput of the application.
At this threshold the slaves would see very little or no drops in
the case of one slave. Then enable the second slave you would see
a large drop rate on the two slave bond and reduction in throughput.

Signed-off-by: Keith Wiles <keith.wiles@intel.com>
Acked-by: Declan Doherty <declan.doherty@intel.com>
2017-04-04 18:59:45 +02:00
Alejandro Lucero
5282261298 net/nfp: fix Rx interrupt
Current code enables RX interrupts even if this it not
requested.

Fixes: ea121b2831 ("net/nfp: add Rx interrupts")
Cc: stable@dpdk.org

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
2017-04-04 18:59:45 +02:00
Alejandro Lucero
19ac8c75df net/nfp: fix packet/data length conversion
Chained mbufs hold data_len as the length of that particular mbuf
and pkt_len as the full packet length including all the chained
mbufs. It is not clear from the mbuf definition if pkt_len should
be set for all the mbufs in a chain, but code there for handling
mbufs suggests just the first mbuf requires to have pkt_len set.

NFP PMD was assuming pkt_len is set in all the chained mbufs and
unit tests for gather dma were building mbufs with pkt_len always
set. This patch gets rid of that assumption.

Fixes: b812daadad ("nfp: add Rx and Tx")
Cc: stable@dpdk.org

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
2017-04-04 18:59:45 +02:00
Alejandro Lucero
2dfcada3eb net/nfp: clean Tx descriptor flags
When LSO, not doing this can led to firmware disruption. It does
not show as error because TCP ends up sending data again later on.

Fixes: 9ba3d0ae20 ("net/nfp: add TSO support")
Cc: stable@dpdk.org

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
2017-04-04 18:59:45 +02:00
Rasesh Mody
f2b852169b net/qede/base: fix to use NULL pointer
Use OSAL NULL where appropriate

Fixes: 22d07d939c ("net/qede/base: update")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 18:59:45 +02:00
Rasesh Mody
0dfa4c3bdc net/qede/base: fix resource lock minimum value
Fixes: ababb5203d ("net/qede/base: semantic/formatting changes")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 18:59:45 +02:00
Rasesh Mody
2d5036ab10 net/qede/base: fix sriov typo
Typo in ecore_sriov.c; Ending line with , instead of ;

Fixes: 379cbb2c44 ("net/qede/base: semantic change")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 18:59:45 +02:00
Rasesh Mody
ada5b88f63 net/qede/base: refactor return path
No need to return - base on return at end of function.

Fixes: 22d07d939c ("net/qede/base: update")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 18:59:45 +02:00
Rasesh Mody
613949ff26 net/qede/base: fix typo
Fixes: 22d07d939c ("net/qede/base: update")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 18:59:45 +02:00
Rasesh Mody
1c46a0fc02 net/qede/base: fix first VF index calculation
When a server doesn't support ARI, VF offsets begin at a much higher
number. As a result, ecore miscalculates the first_vf_in_pf and
initialization fails since base driver incorrectly learns there are
no SBs for its VF [as its VFs are out of range].

Fixes: 22d07d939c ("net/qede/base: update")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 18:59:44 +02:00
Rasesh Mody
32376ac6b5 net/qede/base: fix remove the unneeded conversion to LE
Remove the unneeded conversion to LE when writing to the 32-bit
XSDM_REG_OPERATION_GEN register

Fixes: ec94dbc573 ("qede: add base driver")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 18:59:44 +02:00
Rasesh Mody
96d1cace81 net/qede/base: fix to remove redundant memset
Fixes: 22d07d939c ("net/qede/base: update")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 18:59:44 +02:00
Rasesh Mody
68cd48d059 net/qede/base: fix out-of-bound memory access
Fix out-of-bound memory access on Management FW interaction for
resource allocation

Fixes: 252b88b58f ("net/qede/base: add selftest and query sensor info")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 18:59:44 +02:00
Rasesh Mody
e06959e662 net/qede/base: fix DORQ attention mask
Fix Doorbell Queue(DORQ) attention mask

Fixes: e6051bd6b0 ("qede: add interrupt handling support")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 18:59:44 +02:00
Rasesh Mody
6bd042a099 net/qede/base: fix printout
Fixes: ec94dbc573 ("qede: add base driver")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 18:59:44 +02:00
Rasesh Mody
121f1cbda7 net/qede/base: add attention bits for AH chip
add attention bits for CHIP_NUM_AH_xxx

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 18:59:44 +02:00
Rasesh Mody
3320ca8c90 net/qede/base: fix to prevent VF promisc config
VFs are seeing the number of MACs available to them as '0',
and as a result configure themselves as PROMISC. This fix is to
prevent that.

Fixes: 86a2265e59 ("qede: add SRIOV support")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 18:59:44 +02:00
Rasesh Mody
cf584e02a7 net/qede/base: fix index printing of multi-bit attentions
Fix the logic for identifying which bit amongst the Multi-bit
attention sources is set.

Fixes: e6051bd6b0 ("qede: add interrupt handling support")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 18:59:44 +02:00
Rasesh Mody
d9237ae227 net/qede/base: fix numbering L2 VF queues
There are some constellations where Due to lack of resource allocation
in MFW, There would be an insufficient number of L2 queues for all the
VFs.

This introduces a new feature ECORE_VF_L2_QUE which correctly numbers
the number of VF queues. Notice it might be larger than the actual
number of VFs in configuration space, in which case its the ecore
client responsibility not to try activating that many.

As part of the fix, also correct the nubmering of the VF queues. As
their numbering is dependent on the SBs of the PF, which might only be
partially used by L2 [as half would be assigned for RDMA which doesn't
require L2 queues], we make the numbering consecutive with that of the
L2 queues only.

Fixes: ec94dbc573 ("qede: add base driver")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 18:59:44 +02:00
Rasesh Mody
8168b63d8c net/qede/base: fix VF init after malicious VF FLR
Fix VF init after malicious VF FLR.

Fixes: 40c926ba26 ("net/qede/base: support to initiate PF FLR")
Fixes: 86a2265e59 ("qede: add SRIOV support")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 18:59:43 +02:00
Rasesh Mody
d843caff0c net/qede/base: fix printout
Prints in ecore_get_dev_info showed only chip revision,
and did that as number instead of letter.
I.e.,  BB A0 --> BB0, BB B0 --> BB1, AH A0 --> AH0, AH A1 --> AH0.

Correct the printing scheme into
{AH, BB} {A, B}{0, 1}

Fixes: ec94dbc573 ("qede: add base driver")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 18:59:43 +02:00
Rasesh Mody
56d1a16a7f net/qede/base: fix TM block ILT initialization
Fix Timer(TM) block Internal Lookup Table(or ILT for logical to
physical address translation) initialization for SRIOV's coexistence
with other protocols.

Fixes: ec94dbc573 ("qede: add base driver")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 18:59:43 +02:00
Rasesh Mody
e0d26cd273 net/qede/base: fix forcing driver default resc allocation
Remove the forcing of the driver's default resource allocation.

Fixes: 77f7222124 ("net/qede: add PCI ids for new chip variant")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 18:59:43 +02:00
Rasesh Mody
74cd03120d net/qede/base: fix to set pointers to NULL after freeing
Set pointers to NULL after freeing the allocations. Change OSAL_FREE
macro to take care of this and cleanup relevant code.

Fixes: 26ae839d06 ("qede: add DCBX support")
Fixes: ec94dbc573 ("qede: add base driver")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 18:59:43 +02:00
Rasesh Mody
d4806aba9b net/qede/base: fix incorrect typecasting of flag
dcbx-update-flag is incorrectly converted to boolean before assigining
it to ramrod data, fix this typecasting. Also, added more debug
messages in the dcbx code paths.

Fixes: 26ae839d06 ("qede: add DCBX support")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-04-04 18:59:43 +02:00
Andrew Rybchenko
5688520075 net/sfc: implement simple EF10 native Tx datapath
The datapath does not support VLAN insertion, TSO and multi-segment
mbufs.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2017-04-04 18:59:43 +02:00
Andrew Rybchenko
ea2ed84c2f net/sfc: make multi-segment support a Tx datapath feature
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2017-04-04 18:59:43 +02:00
Andrew Rybchenko
8b00f426eb net/sfc: implement EF10 native Tx datapath
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: David Riddoch <driddoch@solarflare.com>
2017-04-04 18:59:43 +02:00
Andrew Rybchenko
7a4d44a639 net/sfc: make TSO a datapath-dependent feature
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2017-04-04 18:59:43 +02:00
Andrew Rybchenko
45cbb96c06 net/sfc: make VLAN insertion a datapath-dependent feature
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2017-04-04 18:59:43 +02:00
Andrew Rybchenko
dbdc82416b net/sfc: factor out libefx-based Tx datapath
Split control and datapath to make datapath substitutable and
possibly reusable with alternative control path.

libefx-based Tx datapath is bound to libefx control path, but
it should be possible to use other datapaths with alternative
control path(s).

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2017-04-04 18:59:43 +02:00
Andrew Rybchenko
638bddc99f net/sfc: implement EF10 native Rx datapath
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: David Riddoch <driddoch@solarflare.com>
2017-04-04 18:59:42 +02:00
Andrew Rybchenko
f1d2d9360f net/sfc: remove few conditions in Rx queue refill
If Rx refill threshold guarantees that refill happens for one or
more bulks, less checks may be done on refill.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2017-04-04 18:59:42 +02:00
Andrew Rybchenko
99a4949ff7 net/sfc: make Rx scatter a datapath-dependent feature
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2017-04-04 18:59:42 +02:00
Andrew Rybchenko
df1bfde4ff net/sfc: factor out libefx-based Rx datapath
Split control and datapath to make datapath substitutable and
possibly reusable with alternative control path.

libefx-based Rx datapath is bound to libefx control path, but
other datapaths should be possible to use with alternative
control path(s).

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2017-04-04 18:59:42 +02:00
Andrew Rybchenko
b762eca9dd net/sfc: do not use Rx queue control state on datapath
Rx queue flags should keep the information required on datapath.

It is a preparation to split control and data paths.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2017-04-04 18:59:42 +02:00
Andrew Rybchenko
ad2a75c1bb net/sfc: emphasis that RSS hash flag is an Rx queue flag
Style fix to establish namespace for Rx queue flag defines.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2017-04-04 18:59:42 +02:00
Andrew Rybchenko
7965557ede net/sfc: use different callbacks for event queues
Use different sets of libefx EvQ callbacks for management,
transmit and receive event queue. It makes event handling
more robust against unexpected events.

Also it is required for alternative datapath support.

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2017-04-04 18:59:42 +02:00
Vasily Philipov
46d5736a70 net/mlx4: support basic flow items and actions
Adding support for the next items: eth, vlan, ipv4, udp, tcp and for the
next actions: queue, drop

Signed-off-by: Vasily Philipov <vasilyf@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
2017-04-04 18:59:42 +02:00
Vasily Philipov
58610cdde8 net/mlx4: split the definitions to the header file
Make priv_lock/priv_unlock functions and some other structs/defines visible
from different source files by placing them into mlx4.h header.

Signed-off-by: Vasily Philipov <vasilyf@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
2017-04-04 18:59:42 +02:00
Gaetan Rivet
3fca2ab597 net/mlx4: update link status upon probing with LSC
If LSC interrupts are enabled, the application expects the link_update
ops to be executed by the PMD itself.

No link status change event is received upon probing, therefore the link
status update must be forced.

Fixes: c4da6caa42 ("mlx4: handle link status interrupts")
Cc: stable@dpdk.org

Signed-off-by: Gaetan Rivet <gaetan.rivet@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2017-04-04 18:59:42 +02:00
Jerin Jacob
fc2c80148e net/thunderx: fix build on FreeBSD
SIMPLEQ_* operations are not available in FreeBSD. Replacing
with equivalent STAILQ_* operations.

Fixes: f2546f8e51 ("net/thunderx/base: add functions to store qsets")

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2017-04-04 18:59:41 +02:00
Jerin Jacob
6d76fde7db net/thunderx: fix 32-bit build
Fixes: e438796617 ("net/thunderx: add PMD skeleton")

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
2017-04-04 18:59:41 +02:00
Andrew Rybchenko
244cfa79a4 net/sfc: add missing BSD license line and update year
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2017-04-04 18:59:41 +02:00
Yongseok Koh
6ce84bd889 net/mlx5: add enhanced multi-packet send for ConnectX-5
ConnectX-5 supports enhanced version of multi-packet send (MPS). An MPS Tx
descriptor can carry multiple packets either by including pointers of
packets or by inlining packets. Inlining packet data can be helpful to
better utilize PCIe bandwidth. In addition, Enhanced MPS supports hybrid
mode - mixing inlined packets and pointers in a descriptor. This feature is
enabled by default if supported by HW.

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
2017-04-04 18:59:41 +02:00
Nélio Laranjeiro
c2c6ddd51d net/mlx5: limit flow API rules to one tunnel
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2017-04-04 18:59:41 +02:00
Ivan Malov
83fef46a22 net/sfc: add callback to retrieve FW version
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andrew Lee <alee@solarflare.com>
2017-04-04 18:59:41 +02:00
Ivan Malov
ba6afee9a8 net/sfc/base: add advanced function to extract FW version
Some libefx-based drivers might need this functionality to
indicate DPCPU FW IDs as part of FW version info to assist
experienced users.

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andrew Lee <alee@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
2017-04-04 18:59:41 +02:00
Wenzhuo Lu
92717a8e9b net/i40e: fix broadcast promiscuous mode setting
When setting up the VSIs, MAC filter is used for
receiving MAC broadcast packets.
We should follow it to implement the broadcast
promiscuous mode setting.

Fixes: 61fff9b4c6 ("net/i40e: set VF broadcast mode from PF")
Cc: stable@dpdk.org

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-04-04 18:59:41 +02:00
Chas Williams
04df93d1ed net/vmxnet3: fix queue size changes
If the user reconfigures the queue size, then the previously allocated
memzone may potentially be too small.  Release the memzone when a queue
is released and allocate a new one each time a queue is setup.

While here convert to rte_eth_dma_zone_reserve() which does basically
the same things as the private function.

Fixes: dfaff37fc4 ("vmxnet3: import new vmxnet3 poll mode driver implementation")
Cc: stable@dpdk.org

Signed-off-by: Chas Williams <ciwillia@brocade.com>
Acked-by: Jan Blunck <jblunck@infradead.org>
Acked-by: Shrikrishna Khare <skhare@vmware.com>
2017-04-04 18:59:41 +02:00
Pascal Mazon
2d3ebfeea9 net/tap: add flow control management
A tap netdevice does not support flow control; ensure nothing but
RTE_FC_NONE mode can be set.

Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-04-04 18:59:41 +02:00
Pascal Mazon
0849ac3b61 net/tap: add packet type management
Advertise packet types supported by the librte_net.

Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-04-04 18:59:40 +02:00
Pascal Mazon
730651c27c net/tap: add multicast addresses management
A tap netdevice actually receives every packet, without any filtering
whatsoever. There is no need for any multicast address registration
to receive multicast packets.

Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-04-04 18:59:40 +02:00
Pascal Mazon
4a25714ad9 net/tap: add speed capabilities
Tap PMD is flexible, it supports any speed.

Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-04-04 18:59:40 +02:00
Pascal Mazon
e5dc143a42 net/tap: add MTU management
The MTU is assigned to the tap netdevice according to the argument, but
packet transmission and reception just write/read on an fd with the
default limit being the socket buffer size.

As a new rte_eth_dev_data is allocated during tap device init, ensure it
is set again dev->data->mtu.
Once the actual netdevice is created via tun_alloc(), make sure to apply
the desired MTU to the netdevice.

Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-04-04 18:59:40 +02:00
Pascal Mazon
f76d46b4ff net/tap: add MAC address management
As soon as the netdevice is created, update pmd->mac_addr with its
actual MAC address.

Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-04-04 18:59:40 +02:00
Pascal Mazon
73cf55c8bd net/tap: refactor ioctl calls
Create a socket for ioctl at tap device creation instead of opening it
and closing it every call to tap_link_set_flags().

Use a common tap_ioctl() function that can be extended for various uses
(such as MTU change, MAC address change, ...).

Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-04-04 18:59:40 +02:00
Pascal Mazon
9d4aabe66a net/tap: remove NO-ARP setting
There is no reason not to support ARP on a tap netdevice. Remove
IFF_NOARP flags.
Focus on IFF_UP when a link status change is required.

Fixes: f457b472b1 ("net/tap: add link up and down operations")

Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-04-04 18:59:40 +02:00
Ivan Malov
223a29a25e net/sfc: add VFs to the table of PCI IDs for supported NICs
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andrew Lee <alee@solarflare.com>
2017-04-04 18:59:40 +02:00
Ivan Malov
4650ed44c1 net/sfc: support MCDI proxy
The patch is to add support for MCDI proxy which comes in
useful, particularly, while running over VF: few commands
will normally fail with EPERM, but in some cases the host
driver (i.e. running over the corresponding PF, typically,
within a hypervisor) may set itself as a proxy to conduct
authorization for the commands coming from VFs; these are
forwarded to the corresponding access control application
which may decline or approve authorization by replying to
the requests; all in all, the guest driver has to process
the replies forwarded back by the firmware MC in order to
give up gracefully (by setting return code which could be
understood by 'libefx') or re-issue the original commands

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
2017-04-04 18:59:40 +02:00
Ivan Malov
f5258439ee net/sfc: avoid failure on port start if Rx mode is rejected
If Rx mode is unacceptable, in particular, when promiscuous
or all-multicast filters are not allowed while running over
PCI function which is not a member of appropriate privilege
groups, the driver has to cope with the failures gracefully

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andrew Lee <alee@solarflare.com>
2017-04-04 18:59:40 +02:00
Ivan Malov
178fc0d327 net/sfc: poll MAC stats if periodic DMA is not supported
If periodic DMA statistics feature is absent (particularly,
while running over VF), the PMD must provide an ability to
cope with it using explicit update requests which are kept
restrained according to 'stats_update_period_ms' parameter

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andy Moreton <amoreton@solarflare.com>
2017-04-04 18:59:40 +02:00
Ivan Malov
e56fa9c23e net/sfc: add kvarg control for MAC statistics update period
The patch is to make MAC statistics update interval tunable
by means of 'stats_update_period_ms' kvarg parameter making
it possible to use values different from 1000 ms in case of
SFN8xxx boards provided that firmware version is 6.2.1.1033

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
Reviewed-by: Andrew Lee <alee@solarflare.com>
2017-04-04 18:59:40 +02:00
Andrew Rybchenko
fe8e3dc248 net/sfc/base: do not ignore MAC stats update period
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2017-04-04 18:59:40 +02:00
Yong Wang
1207f3f722 net/ena: fix return of hash control flushing
In function ena_com_set_hash_ctrl(), the return value is assigned to
"ret" variable, but it is not returned. Fix it by adding the return.

Fixes: 99ecfbf845 ("ena: import communication layer")
Cc: stable@dpdk.org

Signed-off-by: Yong Wang <wang.yong19@zte.com.cn>
Acked-by: Jan Medala <jan@semihalf.com>
2017-04-04 18:59:40 +02:00
Yong Wang
70153557a9 net/ena: remove redundant variable
Signed-off-by: Yong Wang <wang.yong19@zte.com.cn>
Acked-by: Jan Medala <jan@semihalf.com>
2017-04-04 18:59:39 +02:00
Johan Samuelsson
8dc7358b28 net/pcap: fix using mbuf after freeing it
Fixes: 2269e7e815 ("pcap: add Rx and Tx byte counters")
Cc: stable@dpdk.org

Signed-off-by: Johan Samuelsson <johan.xb.samuelsson@ericsson.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-04-04 18:59:39 +02:00
Olivier Matz
e3efd85bf9 net/i40e: fix error log in descriptor done function
It's not queue identifier but a descriptor identifier.

Fixes: 4861cde461 ("i40e: new poll mode driver")

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
2017-04-04 18:59:39 +02:00
Shahaf Shuler
3c7d44af25 net/mlx5: support user space Rx interrupt event
Implement rxq interrupt callbacks

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
2017-04-04 18:59:39 +02:00
Adrien Mazarguil
a0d8e807d9 net/tap: add Rx trigger
This commit adds a signal-based trigger to the Rx burst function in order
to avoid unnecessary system calls while Rx queues are empty.

Triggered Rx bursts put less pressure on the kernel, free up CPU resources
for applications and result in a noticeable performance improvement when
sharing CPU threads with other PMDs.

Measuring the traffic forwarding rate between two physical devices in
testpmd (IO mode, single thread, 64B packets) before and after adding two
tap PMD instances (4 ports total) that do not process any traffic and
comparing results yields:

Without Rx trigger:

 -15% (--burst=32)
 -62% (--burst=1)

With Rx trigger:

 -0.3% (--burst=32)
 -6% (--burst=1)

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Pascal Mazon <pascal.mazon@6wind.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
2017-04-04 18:59:39 +02:00
Adrien Mazarguil
d3668acb7b net/tap: remove redundant syscall on Tx
Polling the Tx queue file descriptor before writing to it is not mandatory
since it is configured as non-blocking.

Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Acked-by: Pascal Mazon <pascal.mazon@6wind.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
2017-04-04 18:59:39 +02:00
Jerin Jacob
34c2e7026f net/thunderx: check data offset alignment requirement
nicvf HW expects the DMA address of the packet data to be
aligned with cache line size.

Packet data offset is a function of struct mbuf size,
mbuf private size and headroom. mbuf private size can
be changed from the application in pool creation, this
check detects HW alignment requirement constraint in pmd
start function.

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
2017-04-04 18:59:39 +02:00
Allain Legacy
0934b7f12a net/e1000: advertise offload capabilities for the EM PMD
The hardware offload capabilities are not being advertised for the EM PMD.
Because of this, applications that only enable these features if the device
advertises them will never do so.

Normally this is not an issue since normal packet processing should work
even if hardware offload is not available.  But, in older versions of
Virtual Box the e1000 device emulation (Intel PRO/1000 MT Desktop 82540EM)
assumes that it should enable VLAN stripping even if the driver does not
request it.  This means that any ingress packets that have a VLAN tag will
be stripped.  Since the application did not request to enable VLAN
stripping it is not expecting these packets so they are not processed as
VLAN packets.

Regardless of the Virtual Box issue, the driver should be advertising
supported capabilities as is done in other drivers.

Signed-off-by: Allain Legacy <allain.legacy@windriver.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-04-04 18:59:39 +02:00