Commit Graph

2412 Commits

Author SHA1 Message Date
Qi Zhang
65afffe6e3 net/fm10k/base: update comment to use 8 bit notation
The diagram represents bit layout of the multi-bit VLAN update
message format. Re-draw the numbers using base 8, and mark the
bit values every 8 bits at the top. This should make it more
easy to grasp the table quickly.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
2017-04-04 15:52:52 +02:00
Qi Zhang
7cc79a91f3 net/fm10k/base: add new item to lport msg attr
Add FM10K_PF_ATTR_ID_ERR, since it is possible for the switch manager
to send out an error message indicating status of the LPORT_MAP due to
zero allocated bandwidth.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
2017-04-04 15:52:52 +02:00
Qi Zhang
890fc30fbf net/fm10k/base: clean up the logic
Clean up the logic in fm10k_tlv_attr_parse, we
should not reply on that FM10K_NOT_IMPLEMENTED is
greater than zero, as this can easily cause confusion.
The patch also correct a minor document error.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
2017-04-04 15:52:52 +02:00
Qi Zhang
0de9c88abb net/fm10k/base: add error code
Add API error code for when PEP is not scheduled.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
2017-04-04 15:52:52 +02:00
Qi Zhang
883a735c69 net/fm10k/base: expose macros needed by DPDK
Add back macros that DPDK required and remove the redundant ones
in fm10k_osdep.h.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
2017-04-04 15:52:52 +02:00
Qi Zhang
22025588e4 net/fm10k/base: reset multicast mode when deleting lport
Deleting lport when multicast mod is configured to
FM10K_XCAST_MODE_ALLMULTI or FM10K_XCAST_MODE_PROMISC will
result in generating orphaned multicast-group entries in the
switch manager.
Before deleting the lport, reset multicast mode to
FM10K_XCAST_MODE_NONE to flush out these multicast-group
entries.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
2017-04-04 15:52:52 +02:00
Qi Zhang
43f8858078 net/fm10k/base: add a flag to indicate VF trust mode
Adds boolean flag in fm10k_vf_info to support configuring
a VF to be trusted.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
2017-04-04 15:52:52 +02:00
Pascal Mazon
66db3932dd net/tap: fix dev name look-up
Store the device name in dev->data->name, to have symmetrical behavior
between rte_pmd_tap_probe(name) and rte_pmd_tap_remove(name).

The netdevice name (linux interface name) is stored in the name field of
struct pmd_internals.

snprintf(data->name) has been moved closer to the rte_ethdev_allocate()
as it should use the same name.

Fixes: 02f96a0a82 ("net/tap: add TUN/TAP device PMD")

Signed-off-by: Pascal Mazon <pascal.mazon@6wind.com>
Acked-by: Keith Wiles <keith.wiles@intel.com>
2017-04-04 15:52:52 +02:00
Andrew Rybchenko
676d11ffb2 net/sfc: remove Tx DMA descriptor boundary crossing limit
EF10 supported by the PMD has no limitations on address boundary
crossing by Tx DMA descriptors.

Fixes: 428c7ddd2f ("net/sfc: send bursts of packets")
Fixes: fec33d5bb3 ("net/sfc: support firmware-assisted TSO")

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2017-04-04 15:52:52 +02:00
Andrew Rybchenko
1e43fe3cb4 net/sfc/base: separate limitations on Tx DMA descriptors
Siena has limitation on maximum byte count and 4k boundary crosssing
(which is stricter than maximum byte count).
EF10 has limitation on maximum byte count only.

Fixes: f7dc06bf35 ("net/sfc/base: import 5xxx/6xxx family support")
Fixes: e7cd430c86 ("net/sfc/base: import SFN7xxx family support")
Fixes: 94190e3543 ("net/sfc/base: import SFN8xxx family support")

Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2017-04-04 15:52:52 +02:00
Jerin Jacob
45290ddae8 net/i40e: fix incorrect packet index reference
Fixes: ae0eb310f2 ("net/i40e: implement vector PMD for ARM")
Cc: stable@dpdk.org

Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Signed-off-by: Sunil Kulkarni <sunil.kulkarni@caviumnetworks.com>
Acked-by: Jianbo Liu <jianbo.liu@linaro.org>
2017-04-04 15:52:52 +02:00
Ivan Malov
e8acb3298d net/sfc: support statistics reset
Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2017-04-04 15:52:52 +02:00
Ivan Malov
b5c94823dc net/sfc/base: add MCDI agnostic wrapper for MAC stats clear
If a libefx-based driver needs some way to clear port statistics,
then an MCDI agnostic method is required.

Signed-off-by: Ivan Malov <ivan.malov@oktetlabs.ru>
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
2017-04-04 15:52:52 +02:00
Wei Zhao
740e0ec32d net/ixgbe: fix filters adding MAC type check
All kinds of filter need to hardware mac type check
to make sure the hardware support that type of filter.
If not, it may cause serious issue.

Fixes: 11777435c7 ("net/ixgbe: parse flow director filter")
Fixes: 672be56d76 ("net/ixgbe: parse n-tuple filter")
Fixes: eb3539fc85 ("net/ixgbe: parse ethertype filter")
Fixes: 429f6ebb42 ("net/ixgbe: parse TCP SYN filter")
Cc: stable@dpdk.org

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-04-04 15:52:52 +02:00
Wei Zhao
962549bb27 net/ixgbe: move MAC type check macros
Move ixgbe 2 mac type check macros to ixgbe_ethdev.h in
order to be used by filter parser functions in file
ixgbe_flow.c.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-04-04 15:52:52 +02:00
Wei Zhao
8185bf3de5 net/ixgbe: delete useless function declaration
Delete useless function declarations in file ixgbe_flow.c and
adjust function definition position to avoid compile error.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
2017-04-04 15:52:52 +02:00
Shrikrishna Khare
34465a0f7d net/vmxnet3: update to version 3
With all vmxnet3 version 3 changes incorporated in the vmxnet3 driver,
the driver can configure emulation to run at vmxnet3 version 3, provided
the emulation advertises support for version 3.

This patch also updates release notes.

Signed-off-by: Shrikrishna Khare <skhare@vmware.com>
Acked-by: Yong Wang <yongwang@vmware.com>
Acked-by: Jin Heo <heoj@vmware.com>
2017-04-04 15:52:51 +02:00
Shrikrishna Khare
6a11399206 net/vmxnet3: add cmd to register memory region
In vmxnet3 version 3, the emulation added support for the vmxnet3 driver
to communicate information about the memory regions the driver will use
for rx/tx buffers. The driver can also indicate which rx/tx queue the
memory region is applicable for. If this information is communicated
to the emulation, the emulation will always keep these memory regions
mapped, thereby avoiding the mapping/unmapping overhead for every packet.

Signed-off-by: Shrikrishna Khare <skhare@vmware.com>
Signed-off-by: Guolin Yang <gyang@vmware.com>
Acked-by: Yong Wang <yongwang@vmware.com>
Acked-by: Jin Heo <heoj@vmware.com>
2017-04-04 15:52:51 +02:00
Shrikrishna Khare
a156ab54fa net/vmxnet3: add reserved version 3 command
This command is reserved.

Signed-off-by: Shrikrishna Khare <skhare@vmware.com>
Acked-by: Yong Wang <yongwang@vmware.com>
Acked-by: Jin Heo <heoj@vmware.com>
2017-04-04 15:52:51 +02:00
Shrikrishna Khare
c4be1a6534 net/vmxnet3: support receive data ring
vmxnet3 driver preallocates buffers for receiving packets and posts the
buffers to the emulation. In order to deliver a received packet to the
guest, the emulation must map buffer(s) and copy the packet into it.

To avoid this memory mapping overhead, this patch introduces the receive
data ring - a set of small sized buffers that are always mapped by
the emulation. If a packet fits into the receive data ring buffer, the
emulation delivers the packet via the receive data ring (which must be
copied by the guest driver), or else the usual receive path is used.

Signed-off-by: Shrikrishna Khare <skhare@vmware.com>
Acked-by: Yong Wang <yongwang@vmware.com>
Acked-by: Jin Heo <heoj@vmware.com>
2017-04-04 15:52:51 +02:00
Shrikrishna Khare
01fef6e3c1 net/vmxnet3: allow variable length Tx data ring
vmxnet3 driver supports transmit data ring viz. a set of fixed size
buffers used by the driver to copy packet headers. Small packets that
fit these buffers are copied into these buffers entirely.

Currently this buffer size of fixed at 128 bytes. This patch extends
transmit data ring implementation to allow variable length transmit
data ring buffers. The length of the buffer is read from the emulation
during initialization.

Signed-off-by: Shrikrishna Khare <skhare@vmware.com>
Acked-by: Yong Wang <yongwang@vmware.com>
Acked-by: Jin Heo <heoj@vmware.com>
2017-04-04 15:52:51 +02:00
Shrikrishna Khare
2d1c4b176e net/vmxnet3: introduce generalized cmd interface
Shared memory is used to exchange information between the vmxnet3 driver
and the emulation. In order to request emulation to perform a task, the
driver first populates specific fields in this shared memory and then
issues corresponding command by writing to the command register(CMD). The
layout of the shared memory was defined by vmxnet3 version 1 and cannot
be extended for every new command without breaking backward compatibility.

To address this problem, in vmxnet3 version 3, the emulation repurposed
a reserved field in the shared memory to represent command information
instead. For new commands, the driver first populates the command
information field in the shared memory and then issues the command. The
emulation interprets the data written to the command information
depending on the type of the command. This patch exposes this capability
to the driver.

Signed-off-by: Shrikrishna Khare <skhare@vmware.com>
Acked-by: Yong Wang <yongwang@vmware.com>
Acked-by: Jin Heo <heoj@vmware.com>
2017-04-04 15:52:51 +02:00
Shrikrishna Khare
36b84ba041 net/vmxnet3: prepare for version 3 changes
Cleanup some code in preparation of vmxnet3 version 3 changes.

Signed-off-by: Shrikrishna Khare <skhare@vmware.com>
Acked-by: Yong Wang <yongwang@vmware.com>
Acked-by: Jin Heo <heoj@vmware.com>
2017-04-04 15:52:51 +02:00
Jingjing Wu
6f0a707e5b net/i40e: enable DCB on SRIOV VFs
enable DCB on SRIOV VFs, including
 - UP and TC mapping according to dcb_tc in struct rte_eth_dcb_rx_conf.
 - TC and queue mapping: queues are divided equally for each TC.
 - UP insert when sending packet according to the TC the Tx queue
   belongs to.

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
2017-04-04 15:52:51 +02:00
Jingjing Wu
1b51b0bbc2 net/ixgbe: fix multi-queue mode check in SRIOV mode
In SRIOV case, ETH_MQ_RX_VMDQ_DCB and ETH_MQ_RX_DCB should be considered as
the same meaning, due to the multi-queue mapping is the same SRIOV and VMDq
in ixgbe.

Fixes: 27b609cbd1 ("ethdev: move the multi-queue mode check to specific drivers")
Cc: stable@dpdk.org

Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
2017-04-04 15:52:51 +02:00
Wenzhuo Lu
8552304c86 net/ixgbe: fix all queues drop setting of DCB
DCB is split to RX and TX mode. All-queues-drop is set for TX mode.
It's not appropriate because all-queue-drop is a RX feature.
Move this setting from TX to RX.

Fixes: f3f9b17bb8 ("net/ixgbe: support multiqueue mode VMDq DCB with SRIOV")
Cc: stable@dpdk.org

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-04-04 15:52:51 +02:00
Shahaf Shuler
4b2e6df261 net/mlx5: fix extended statistics counters identification
Checking whether the counter is IB counter was performed with the
wrong index.

Fixes: 859081d3fb ("net/mlx5: add out of buffer counter to extended statistic")
Cc: stable@dpdk.org

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2017-04-04 15:52:51 +02:00
Shahaf Shuler
b247f34601 net/mlx5: support hardware TSO for VXLAN and GRE
This commit adds support for hardware TSO for tunneled packets.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
2017-04-04 15:52:51 +02:00
Shahaf Shuler
f5fde52051 net/mlx5: add hardware checksum offload for tunnel packets
Prior to this commit Tx checksum offload was supported only for the
inner headers.
This commit adds support for the hardware to compute the checksum for the
outer headers as well.

The support is for tunneling protocols GRE and VXLAN.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
2017-04-04 15:52:51 +02:00
Shahaf Shuler
3f13f8c23a net/mlx5: support hardware TSO
Implement support for hardware TSO.

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
2017-04-04 15:52:51 +02:00
Olivier Matz
9633482a6e net/ixgbe: remove invalid declaration
The function is not defined anywhere, remove it.

Fixes: 0eb609239e ("ixgbe: enable Rx queue interrupts for PF and VF")

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2017-04-04 15:52:51 +02:00
Wenzhuo Lu
9941892b7a net/ixgbe: fix Rx queue blocking issue
In the IOV scenario, multi Rx queues can be assigned to one VF.
If the dropping is not enabled, when no descriptors are available
for one queue, this queue can block others.

Fixes: 00e30184da ("ixgbe: add PF support")
Cc: stable@dpdk.org

Suggested-by: Liang-Min Larry Wang <liang-min.wang@intel.com>
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-04-04 15:52:51 +02:00
Qi Zhang
33b203ff96 net/i40e: no more initial VF MAC address
During PF initialization, PF will generate an initial mac address
for VFs, the purpose is to help VF keep a constant mac address between
its startup/shutdown cycles. Now this is not necessary, since we already
provide an API to set VF's MAC address from PF side
(rte_pmd_i40e_set_vf_mac_addr).

Application can use this API to lock down VF's mac address.(of course this
should happen before VF init)
While without this patch, we still can use rte_pmd_i40e_set_vf_mac_addr
to overwrite the random one, but this patch align DPDK's default behavior
with Kernel PF driver's, and this help to give an identical experience
when work with kernel VF driver.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
2017-04-04 15:52:51 +02:00
Nélio Laranjeiro
028761059a net/mlx5: use an RSS drop queue
Having a drop queue per drop flow consumes a lot of memory and reduce the
speed capabilities of the NIC to handle such cases.
To avoid this and reduce memory consumption, an RSS drop queue is created
for all drop flows.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
2017-04-04 15:52:51 +02:00
Nélio Laranjeiro
3d821d6fea net/mlx5: support RSS action flow rule
Implement a basic flow RSS action.  This commits don't handle the default
RSS queues already created by the control plane, this last part being huge.

Any new request RSS flow request will be added using an higher priority
than the default one to be sure this rule will be the one used.

Default ones (those created by dev_start()) remains but has they have a
lower priority they will not receive any new packet.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
2017-04-04 15:52:51 +02:00
Nélio Laranjeiro
360663e1df net/mlx5: prepare support for RSS action rule
In mlx5 PMD handling a single queue of several destination queues ends in
creating the same Verbs attribute, the main difference resides in the
indirection table and the RSS hash key.

This helps to prepare the supports to the RSS queues by first handling the
queue action has being an RSS queue with a single queue.  No RSS hash key
will be provided to the Verbs flow.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
2017-04-04 15:52:51 +02:00
Nélio Laranjeiro
b268a3ee3c net/mlx5: support flag flow action
This action is not terminal in this PMD, it must be followed by a queue
action.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
2017-04-04 15:52:51 +02:00
Nélio Laranjeiro
63e5f0e751 net/mlx5: extend IPv6 flow item
This commit adds:
 - Vtc flow,
 - Protocol,
 - Hop limits

Needs MLNX_OFED-4.0-0.0.7.0 or higher.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2017-04-04 15:52:51 +02:00
Nélio Laranjeiro
d2d9b43dc2 net/mlx5: add RSS hash result with mark id
RSS hash and mark ID can now coexists.

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
2017-04-04 15:52:51 +02:00
Nélio Laranjeiro
4ab2c661ed net/mlx5: support ether type support in flow item
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
2017-04-04 15:52:51 +02:00
Nélio Laranjeiro
953007dd6e net/mlx5: fix resources free in the right function
ibv_attr should be freed in the function which allocates the memory.

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

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
2017-04-04 15:52:51 +02:00
Nélio Laranjeiro
b98b61c308 net/mlx5: fix drop queue creation error
Creating a drop queue in mlx5 ends by creating a non polled queue, but if
the associated work queue could not be created the error was not handled
ending in a undefined situation.

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

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
2017-04-04 15:52:51 +02:00
Nélio Laranjeiro
c9c2a965ab net/mlx5: fix flow mark action handling
Mark value is always reported even when not requested or invalid.

Fixes: ea3bc3b1df ("net/mlx5: support mark flow action")
Cc: stable@dpdk.org

Reported-by: Mark Bloch <markb@mellanox.com>
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2017-04-04 15:52:51 +02:00
Wenzhuo Lu
66e21de51b net/ixgbe/base: update shared code version to 2017.02.27
* Add link block check for KR.
* Complete HW initialization even if SFP is not present.
* Add VF xcast promiscuous mode.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-04-04 15:52:51 +02:00
Wenzhuo Lu
9dad5b9e89 net/ixgbe/base: fix build error
Fix ICC build error by removing the EWARN third parameter.

Build error:
.../drivers/net/ixgbe/base/ixgbe_phy.c(1543):
	error #268: the format string ends before this argument
			EWARN(hw, "WARNING: Intel (R) Network "
			^

.../drivers/net/ixgbe/base/ixgbe_phy.c(1805):
	error #268: the format string ends before this argument
			EWARN(hw, "WARNING: Intel (R) Network "
			^

Fixes: aa4fc14d2c ("ixgbe: update base driver")
Fixes: b94a06c1b4 ("ixgbe/base: support qsfp and lco")
Cc: stable@dpdk.org

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-04-04 15:52:51 +02:00
Wenzhuo Lu
6b3e9c956c net/ixgbe: support xcast promisc mode
Add the support of xcast promiscuous mode. It's
added in mailbox v1.3.
Move the definition of xcast mode to base code.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-04-04 15:52:51 +02:00
Wenzhuo Lu
dcf9ff148c net/ixgbe/base: disable FC for 15B0
Disable Ethernet Flow Control (FC) for device 15B0.

Make sure that ixgbe_device_supports_autoneg_fc()
returns false and hw->fc.disable_fc_autoneg is set
to true to avoid running the fc_autoneg function
for the device 15B0, as this device doesn't support
this function.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-04-04 15:52:51 +02:00
Wenzhuo Lu
98fcfa09b1 net/ixgbe/base: complete HW init when SFP not present
If SFP module is not present, reset_hw doesn't return success.
SW should complete the initialization, or with specific module
it resulted in no link when the module was later inserted.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-04-04 15:52:51 +02:00
Wenzhuo Lu
04e395f20a net/ixgbe/base: add bit for enabling L3/L4 filtering
Add a L3/L4 filtering definition of Multiple Receive Queues Command
(MRQC) register for the future use.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-04-04 15:52:51 +02:00
Wenzhuo Lu
90a02fce70 net/ixgbe/base: add link block check for KR
When setting up link on x550 KR devices, should check
if there are constraints on link from manageability, which
may result in link loss.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-04-04 15:52:50 +02:00