Jerin Jacob [Wed, 18 Jan 2017 01:21:15 +0000 (06:51 +0530)]
eal/x86: define I/O device memory barriers
The patch does not provide any functional change for IA.
I/O barriers are mapped to existing smp barriers.
CC: Bruce Richardson <bruce.richardson@intel.com> CC: Konstantin Ananyev <konstantin.ananyev@intel.com> Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Thomas Monjalon [Tue, 17 Jan 2017 14:35:11 +0000 (15:35 +0100)]
devtools: relax tag checking in fixes
The tag "Cc: stable@dpdk.org" must be set when the commit must be
backported to a stable branch. The reminder is reworded.
It should be located just below the "Fixes:" tag (without blank line)
and followed by a blank line, separated from SoB and review tags below.
However, there is no strong need for checking blank lines.
Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com> Reviewed-by: Yuanhan Liu <yuanhan.liu@linux.intel.com>
Alejandro Lucero [Fri, 13 Jan 2017 11:50:02 +0000 (11:50 +0000)]
config: enable nfp driver on Linux
Because using a NFP PMD requires specific BSP installed, the PMD
support was not the default option before. This was just for making
people aware of such dependency, since there is no need for such a
BSP for just compiling DPDK with NFP PMD support.
net/i40e: support Linux VF to configure IRQ link list
i40e PF host only support to work with DPDK VF driver, Linux
VF driver is not supported. This change will enhance in
configuring IRQ link list.
This Change will identify VF client by number of vector
requested. DPDK VF will ask only single one while Linux VF
will request at least 2. It will have different configuration
for different clients. DPDK VF will be configured to link all
queue together, while Linux VF will be configured per request.
When VF requested to configure TX queue, a few parameters are
missed to be configured in PF host. This change have more
fields parsed and configured for TX context.
When VF sends request to add a new MAC address, PF host
will check if it's a non-zero or unicast address, or it
will return with error. In fact, VF still can set multicast
address. This change remove to check if it's a unicast
address.
Wenzhuo Lu [Tue, 17 Jan 2017 08:45:20 +0000 (16:45 +0800)]
app/testpmd: use VFD APIs on i40e
The new VF Daemon (VFD) APIs is implemented on i40e. Change
testpmd code to use them, including VF MAC anti-spoofing,
VF VLAN anti-spoofing, TX loopback, VF VLAN strip, VF VLAN
insert.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com> Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com> Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com> Acked-by: Helin Zhang <helin.zhang@intel.com> Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
Ferruh Yigit [Tue, 17 Jan 2017 08:45:14 +0000 (16:45 +0800)]
net/i40e: fix VF MAC address assignment
If PF sets vf->mac_addr, in VF initialization hw->mac.addr will be set
to that same value. It is possible to check if PF set a MAC address or
not through the hw->mac.addr variable.
hw->mac.addr set by i40e_vf_parse_hw_config(), call stack is:
In PF side
i40e_pf_host_process_cmd_get_vf_resources()
eth_addr_copy(vf->mac_addr, vf_res->vsi_res[0].default_mac_address)
In VF sise
i40evf_init_vf()
i40evf_get_vf_resources()
i40e_vf_parse_hw_config()
memcpy(hw->mac.addr, vsi_res->default_mac_addr)
Updated code is after i40evf_get_vf_resources() and can benefit from
hw->mac.addr variable.
Fixes: 89e6b86384bb ("i40evf: rework MAC address validation") Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com> Acked-by: Helin Zhang <helin.zhang@intel.com> Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
Ferruh Yigit [Tue, 17 Jan 2017 08:45:12 +0000 (16:45 +0800)]
net/i40e: set VF MAC from PF
Support setting VF MAC address from PF.
User can call the API on PF to set a specific
VF's MAC address.
PF should set MAC address before VF initialized,
if PF sets the MAC address after VF initialized,
new MAC address won't be effective until VF
reinitialized.
Qi Zhang [Tue, 17 Jan 2017 08:45:11 +0000 (16:45 +0800)]
net/i40e: fix VF reset flow
Add missing step during VF reset: PF should
set I40E_VFGEN_RSTAT to ACTIVE at end of the
VF reset operation or VF driver may not able
to detect that reset is already completed.
This patch also remove the unnecessary enum
for vfr state.
Fixes: 4861cde46116 ("i40e: new poll mode driver") Signed-off-by: Qi Zhang <qi.z.zhang@intel.com> Acked-by: Helin Zhang <helin.zhang@intel.com> Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
Wenzhuo Lu [Tue, 17 Jan 2017 08:45:09 +0000 (16:45 +0800)]
net/i40e: set VF multicast promiscuous mode from PF
Support enabling/disabling VF multicast promiscuous mode from
PF.
User can call the API on PF to enable/disable a specific
VF's multicast promiscuous mode.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com> Acked-by: Helin Zhang <helin.zhang@intel.com> Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
Wenzhuo Lu [Tue, 17 Jan 2017 08:45:08 +0000 (16:45 +0800)]
net/i40e: set VF unicast promiscuous mode from PF
Support enabling/disabling VF unicast promiscuous mode from
PF.
User can call the API on PF to enable/disable a specific
VF's unicast promiscuous mode.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com> Acked-by: Helin Zhang <helin.zhang@intel.com> Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
Wenzhuo Lu [Tue, 17 Jan 2017 08:45:03 +0000 (16:45 +0800)]
net/i40e: support link status notification
Add an API to expose the ability, that PF can notify VF
when link status changes, to APP.
So if PF APP doesn't want to enable interruption but check
link status by itself, PF APP can let VF know link status
changed.
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com> Acked-by: Helin Zhang <helin.zhang@intel.com> Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
Mellanox PMDs do not differentiate IP header with or without options, so
the advertised packet type for an IPv4 should not be RTE_PTYPE_L3_IPV4,
which explicitly means "does not contain any header option".
Change the driver to set
RTE_PTYPE(_INNER)_L3_IPV4_EXT_UNKNOWN or
RTE_PTYPE(_INNER)_L3_IPV6_EXT_UNKNOWN flags for all IPv4/IPv6 packets
received.
Fixes: 429df3803a16 ("mlx4: replace some offload flags with packet type") Fixes: 67fa62bc672d ("mlx5: support checksum offload") Signed-off-by: Samuel Gauthier <samuel.gauthier@6wind.com> Signed-off-by: Matthieu Ternisien d'Ouville <matthieu.tdo@6wind.com> Signed-off-by: Olivier Matz <olivier.matz@6wind.com> Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Retrieving link status information through the link update callback should
be quick and non-blocking.
Mellanox PMDs retrieve this information through ioctl() calls on the
related kernel netdevice. This appears to take a long time to
complete and may cause significant slowdowns in applications.
While these system calls cannot be accelerated, removing the lock on the
private structure allows applications to perform other control operations
from separate threads in the meantime. This function remains safe without
locking as it does not write the private structure, it is only used to
retrieve the name of the netdevice.
Chas Williams [Thu, 5 Jan 2017 13:53:44 +0000 (08:53 -0500)]
net/af_packet: support 802.1Q VLAN
AF_PACKET has some flags to check on the receive side for 802.1Q
information. If present, we copy into the mbuf. For transmit, we
insert any 802.1Q information into the packet before copying to the ring.
Signed-off-by: Chas Williams <ciwillia@brocade.com> Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
Emmanuel Roullit [Sun, 15 Jan 2017 19:50:37 +0000 (20:50 +0100)]
net/cxgbe: fix parenthesis on bitwise operation
clang reports the following error:
error: logical not is only applied to the left hand side of this bitwise
operator. [-Werror,-Wlogical-not-parentheses]
Wei Dai [Thu, 12 Jan 2017 14:53:29 +0000 (22:53 +0800)]
net/ixgbe/base: use clause 22 MDIO functions for Marvell PHYs
Set the MDIO (Management Data Input/Output Interface) read/write
function pointers for Marvell PHYs on some X550 platforms to use
the clause 22 functions. Marvell PHYs do not support clause 45.
John Daley [Mon, 9 Jan 2017 23:04:28 +0000 (15:04 -0800)]
net/enic: support TSO
The enic TSO implementation requires that the length of the Eth/IP/TCP
headers be passed to the NIC. Other than that, it's just a matter of
setting the mss and offload mode on a per packet basis.
In TSO mode, IP and TCP checksums are offloaded even if not requested
with mb->ol_flags.
Wenzhuo Lu [Tue, 10 Jan 2017 02:19:11 +0000 (10:19 +0800)]
net/ixgbe: fix VMDq function name
The function name ixgbe_vmdq_mode_check is not right.
This function checks if Virtualization Technology is
enabled. It's for both VMDq and IOV.
Others may be misled by the current name.
Fixes: fe3a45fd4104 ("ixgbe: add VMDq support") Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com> Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
Yong Wang [Mon, 9 Jan 2017 13:48:52 +0000 (08:48 -0500)]
net/i40e: remove redundant statement and braces
In function "reassemble_packets()", the statement "end = secondlast;"
is redundant since there is another assignment "start = end = NULL;"
3 lines below. BTW, I removed the redundant braces in the conditional
statement "if (end->data_len > rxq->crc_len)".
Signed-off-by: Yong Wang <wang.yong19@zte.com.cn> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
When using the same file descriptor for both rx and tx, the
eth_dev_stop function would close the same fd twice. This
change prevents that from happening.
Fixes: 364e08f2bbc0 ("af_packet: add PMD for AF_PACKET-based virtual devices") Signed-off-by: Timmons C. Player <timmons.player@spirent.com> Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Ilya Maximets [Wed, 19 Oct 2016 14:07:17 +0000 (17:07 +0300)]
net/ixgbe: allow bulk alloc for the max size desc ring
The only reason why bulk alloc disabled for the rings with
more than (IXGBE_MAX_RING_DESC - RTE_PMD_IXGBE_RX_MAX_BURST)
descriptors is the possible out-of-bound access to the dma
memory. But it's the artificial limit and can be easily
avoided by allocating of RTE_PMD_IXGBE_RX_MAX_BURST more
descriptors in memory. This will not interfere the HW and,
as soon as all rings' memory zeroized, Rx functions will
work correctly.
This change allows to use vectorized Rx functions with
4096 descriptors in Rx ring which is important to achieve
zero packet drop rate in high-load installations.
Ilya Maximets [Wed, 19 Oct 2016 14:07:16 +0000 (17:07 +0300)]
net/i40e: allow bulk alloc for the max size desc ring
The only reason why bulk alloc disabled for the rings with
more than (I40E_MAX_RING_DESC - RTE_PMD_I40E_RX_MAX_BURST)
descriptors is the possible out-of-bound access to the dma
memory. But it's the artificial limit and can be easily
avoided by allocating of RTE_PMD_I40E_RX_MAX_BURST more
descriptors in memory. This will not interfere the HW and,
as soon as all rings' memory zeroized, Rx functions will
work correctly.
This change allows to use vectorized Rx functions with
4096 descriptors in Rx ring which is important to achieve
zero packet drop rate in high-load installations.
Harish Patil [Fri, 6 Jan 2017 08:16:47 +0000 (00:16 -0800)]
net/qede: fix PF fastpath status block index
Allocate double the number of fastpath status block index
since the PF RX/TX queues are not sharing the status block.
This is an interim solution till other parts of the code
is modified to handle the same.
Fixes: f1e4b6c0acee ("net/qede: fix status block index for VF queues") Signed-off-by: Harish Patil <harish.patil@qlogic.com>
Harish Patil [Fri, 6 Jan 2017 08:16:46 +0000 (00:16 -0800)]
net/qede: fix minimum buffer size and scatter Rx check
- Fix minimum RX buffer size to 1024B
- Force enable scatter/gather mode if given RX buf size is lesser than MTU
- Adjust RX buffer size to cache-line size with overhead included
Harish Patil [Fri, 6 Jan 2017 08:16:45 +0000 (00:16 -0800)]
net/qede: fix scatter-gather
- Make qede_process_sg_pkts() inline and add unlikely check
- Fix mbuf segment chaining logic in qede_process_sg_pkts()
- Change qede_encode_sg_bd() to return total segments required
- Fix first TX buffer descriptor's length
- Replace repetitive code using a macro
Fixes: bec0228816c0 ("net/qede: support scatter gather") Signed-off-by: Harish Patil <harish.patil@qlogic.com>