dpdk.git
7 years agodoc: update for VFD experimental API
Wenzhuo Lu [Tue, 17 Jan 2017 08:45:28 +0000 (16:45 +0800)]
doc: update for VFD experimental API

Update the doc and release note.

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>
7 years agonet/i40e: set/clear VF stats from PF
Qi Zhang [Tue, 17 Jan 2017 08:45:27 +0000 (16:45 +0800)]
net/i40e: set/clear VF stats from PF

This patch add support to get/clear VF statistics
from PF side.
Two APIs are added:
rte_pmd_i40e_get_vf_stats.
rte_pmd_i40e_reset_vf_stats.

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>
7 years agonet/i40e: enhance sanity check of MAC
Chen Jing D(Mark) [Tue, 17 Jan 2017 08:45:26 +0000 (16:45 +0800)]
net/i40e: enhance sanity check of MAC

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.

Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
7 years agoapp/testpmd: handle i40e in VF VLAN filter command
Bernard Iremonger [Tue, 17 Jan 2017 08:45:25 +0000 (16:45 +0800)]
app/testpmd: handle i40e in VF VLAN filter command

modify set_vf_rx_vlan function to handle the i40e PMD.

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>
7 years agoapp/testpmd: add command for VF VLAN tag on i40e
Bernard Iremonger [Tue, 17 Jan 2017 08:45:24 +0000 (16:45 +0800)]
app/testpmd: add command for VF VLAN tag on i40e

command is: set vf vlan tag port_id vf_id on|off

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>
7 years agoapp/testpmd: add command for VF broadcast mode on i40e
Bernard Iremonger [Tue, 17 Jan 2017 08:45:23 +0000 (16:45 +0800)]
app/testpmd: add command for VF broadcast mode on i40e

Add command to call rte_pmd_i40e_set_vf_broadcast.
Add set vf broadcast in testpmd_funcs.rst file.

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>
7 years agoapp/testpmd: use multicast promiscuous mode on i40e
Wenzhuo Lu [Tue, 17 Jan 2017 08:45:22 +0000 (16:45 +0800)]
app/testpmd: use multicast promiscuous mode on i40e

Add testpmd CLI to set VF multicast promiscuous mode on i40e.

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>
7 years agoapp/testpmd: use unicast promiscuous mode on i40e
Wenzhuo Lu [Tue, 17 Jan 2017 08:45:21 +0000 (16:45 +0800)]
app/testpmd: use unicast promiscuous mode on i40e

Add testpmd CLI to set VF unicast promiscuous mode on i40e.

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>
7 years agoapp/testpmd: use VFD APIs on i40e
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>
7 years agonet/i40e: set VF VLAN filter from PF
Bernard Iremonger [Tue, 17 Jan 2017 08:45:19 +0000 (16:45 +0800)]
net/i40e: set VF VLAN filter from PF

add rte_pmd_i40e_set_vf_vlan_filter API.
User can call the API on PF to enable/disable
a set of VF's VLAN filters.

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>
7 years agonet/i40e: set VF VLAN tag from PF
Bernard Iremonger [Tue, 17 Jan 2017 08:45:18 +0000 (16:45 +0800)]
net/i40e: set VF VLAN tag from PF

Add rte_pmd_i40e_set_vf_vlan_tag API.
User can call the API on PF to enable/disable a specific
VF's VLAN tag.

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>
7 years agonet/i40e: set VF broadcast mode from PF
Bernard Iremonger [Tue, 17 Jan 2017 08:45:17 +0000 (16:45 +0800)]
net/i40e: set VF broadcast mode from PF

Support enabling/disabling VF broadcast mode from PF.
User can call the API on PF to enable/disable a specific
VF's broadcast mode.

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>
7 years agonet/i40e: set VF VLAN insertion from PF
Bernard Iremonger [Tue, 17 Jan 2017 08:45:16 +0000 (16:45 +0800)]
net/i40e: set VF VLAN insertion from PF

Support inserting VF VLAN id from PF.
User can call the API on PF to insert a VLAN id to a
specific VF.

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>
7 years agonet/i40e: set VF VLAN strip from PF
Chen Jing D(Mark) [Tue, 17 Jan 2017 08:45:15 +0000 (16:45 +0800)]
net/i40e: set VF VLAN strip from PF

Add a function to configure vlan strip enable/disable for specific
SRIOV VF device.

Signed-off-by: Chen Jing D(Mark) <jing.d.chen@intel.com>
Acked-by: Helin Zhang <helin.zhang@intel.com>
Acked-by: Vincent Jardin <vincent.jardin@6wind.com>
7 years agonet/i40e: fix VF MAC address assignment
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>
7 years agonet/i40e: set VF MAC from VF
Ferruh Yigit [Tue, 17 Jan 2017 08:45:13 +0000 (16:45 +0800)]
net/i40e: set VF MAC from VF

Support changing VF default MAC address.
This function is not supported if PF set the MAC
address for the PF.

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>
7 years agonet/i40e: set VF MAC from PF
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.

This will remove all existing MAC filters.

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>
7 years agonet/i40e: fix VF reset flow
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>
7 years agonet/i40e: enable VF MTU change
Qi Zhang [Tue, 17 Jan 2017 08:45:10 +0000 (16:45 +0800)]
net/i40e: enable VF MTU change

This patch implement mtu_set ops for i40e VF.

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>
7 years agonet/i40e: set VF multicast promiscuous mode from PF
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>
7 years agonet/i40e: set VF unicast promiscuous mode from PF
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>
7 years agonet/i40e: set Tx loopback from PF
Wenzhuo Lu [Tue, 17 Jan 2017 08:45:07 +0000 (16:45 +0800)]
net/i40e: set Tx loopback from PF

Support enabling/disabling TX loopback from PF.
User can call the API on PF to enable/disable TX loopback
for all the PF and VFs.

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>
7 years agonet/i40e: set VF VLAN anti-spoofing from PF
Wenzhuo Lu [Tue, 17 Jan 2017 08:45:06 +0000 (16:45 +0800)]
net/i40e: set VF VLAN anti-spoofing from PF

Support enabling/disabling VF VLAN anti-spoofing from
PF.
User can call the API on PF to enable/disable a specific
VF's VLAN anti-spoofing.

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>
7 years agonet/i40e: set VF MAC anti-spoofing from PF
Wenzhuo Lu [Tue, 17 Jan 2017 08:45:05 +0000 (16:45 +0800)]
net/i40e: set VF MAC anti-spoofing from PF

Support enabling/disabling VF MAC anti-spoofing from
PF.
User can call the API on PF to enable/disable a specific
VF's MAC anti-spoofing.

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>
7 years agonet/i40e: add user callback for VF to PF message
Wenzhuo Lu [Tue, 17 Jan 2017 08:45:04 +0000 (16:45 +0800)]
net/i40e: add user callback for VF to PF message

The callback asks the user application if it is allowed to
perform the mailbox messages.

If the return value from user is RTE_PMD_I40E_MB_EVENT_PROCEED
then continue. If ACK or NACK, do nothing and send
not_supported to VF.

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>
7 years agonet/i40e: support link status notification
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>
7 years agonet/mlx: fix IPv4 and IPv6 packet type
Matthieu Ternisien d'Ouville [Wed, 11 Jan 2017 16:44:33 +0000 (17:44 +0100)]
net/mlx: fix IPv4 and IPv6 packet type

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>
7 years agonet/mlx: remove link update lock
Matthieu Ternisien d'Ouville [Wed, 11 Jan 2017 16:44:01 +0000 (17:44 +0100)]
net/mlx: remove link update lock

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.

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>
7 years agonet/af_packet: support 802.1Q VLAN
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>
7 years agonet/af_packet: support promiscuous
Chas Williams [Thu, 5 Jan 2017 13:53:43 +0000 (08:53 -0500)]
net/af_packet: support promiscuous

Add promiscuous support to the AF_PACKET PMD.  The underlying Linux
device's IF_PROMISC flag is toggled to enable or disable.

Signed-off-by: Chas Williams <ciwillia@brocade.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/af_packet: support MTU change
Chas Williams [Thu, 5 Jan 2017 13:53:42 +0000 (08:53 -0500)]
net/af_packet: support MTU change

The underlying Linux device's MTU is changed subject to the frame size
limitations during device creation.

Signed-off-by: Chas Williams <ciwillia@brocade.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/af_packet: add interface name to internals
Chas Williams [Thu, 5 Jan 2017 13:53:41 +0000 (08:53 -0500)]
net/af_packet: add interface name to internals

This will be used by later changes to determine the underlying Linux
interface.

Signed-off-by: Chas Williams <ciwillia@brocade.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/bnxt: make ethdev functions struct const
Ferruh Yigit [Thu, 12 Jan 2017 22:19:37 +0000 (22:19 +0000)]
net/bnxt: make ethdev functions struct const

Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/ena: make ethdev functions struct const
Ferruh Yigit [Thu, 12 Jan 2017 22:18:55 +0000 (22:18 +0000)]
net/ena: make ethdev functions struct const

Reported-by: Stephen Hemminger <stephen@networkplumber.org>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/qede: fix function declaration
Emmanuel Roullit [Sun, 15 Jan 2017 19:51:24 +0000 (20:51 +0100)]
net/qede: fix function declaration

clang reports this error message:
error: this function declaration is not a prototype
[-Werror,-Wstrict-prototypes]

Fixes: 5cdd769a26ec ("qede: add L2 support")

Signed-off-by: Emmanuel Roullit <emmanuel.roullit@gmail.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/cxgbe: fix parenthesis on bitwise operation
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]

Fixes: 92c8a63223e5 ("cxgbe: add device configuration and Rx support")

Signed-off-by: Emmanuel Roullit <emmanuel.roullit@gmail.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/ixgbe: flush all the filter list
Wei Zhao [Fri, 13 Jan 2017 08:13:12 +0000 (16:13 +0800)]
net/ixgbe: flush all the filter list

This patch adds a function to flush all the filter list
filter on a port.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
7 years agonet/ixgbe: destroy consistent filter
Wei Zhao [Fri, 13 Jan 2017 08:13:11 +0000 (16:13 +0800)]
net/ixgbe: destroy consistent filter

This patch adds a function to destroy the flow filter.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
7 years agonet/ixgbe: create consistent filter
Wei Zhao [Fri, 13 Jan 2017 08:13:10 +0000 (16:13 +0800)]
net/ixgbe: create consistent filter

This patch adds a function to create the flow directory filter.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
7 years agonet/ixgbe: parse flow director filter
Wei Zhao [Fri, 13 Jan 2017 08:13:09 +0000 (16:13 +0800)]
net/ixgbe: parse flow director filter

check if the rule is a flow director rule, and get the flow director info.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
7 years agonet/ixgbe: parse L2 tunnel filter
Wei Zhao [Fri, 13 Jan 2017 08:13:08 +0000 (16:13 +0800)]
net/ixgbe: parse L2 tunnel filter

check if the rule is a L2 tunnel rule, and get the L2 tunnel info.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
7 years agonet/ixgbe: parse TCP SYN filter
Wei Zhao [Fri, 13 Jan 2017 08:13:07 +0000 (16:13 +0800)]
net/ixgbe: parse TCP SYN filter

check if the rule is a TCP SYN rule, and get the SYN info.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
7 years agonet/ixgbe: parse ethertype filter
Wei Zhao [Fri, 13 Jan 2017 08:13:06 +0000 (16:13 +0800)]
net/ixgbe: parse ethertype filter

check if the rule is a ethertype rule, and get the ethertype info.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
7 years agonet/ixgbe: parse n-tuple filter
Wei Zhao [Fri, 13 Jan 2017 08:13:05 +0000 (16:13 +0800)]
net/ixgbe: parse n-tuple filter

Add rule validate function and check if the rule is a n-tuple rule,
and get the n-tuple info.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
7 years agonet/ixgbe: flush all the filters
Wei Zhao [Fri, 13 Jan 2017 08:13:04 +0000 (16:13 +0800)]
net/ixgbe: flush all the filters

Add support for flush all the filters in SW.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
7 years agonet/ixgbe: store and restore L2 tunnel configuration
Wei Zhao [Fri, 13 Jan 2017 08:13:03 +0000 (16:13 +0800)]
net/ixgbe: store and restore L2 tunnel configuration

Add support for store and restore L2 tunnel filter in SW.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
7 years agonet/ixgbe: restore L2 tunnel filter
Wei Zhao [Fri, 13 Jan 2017 08:13:02 +0000 (16:13 +0800)]
net/ixgbe: restore L2 tunnel filter

Add support for restoring L2 tunnel filter in SW.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
7 years agonet/ixgbe: restore flow director filter
Wei Zhao [Fri, 13 Jan 2017 08:13:01 +0000 (16:13 +0800)]
net/ixgbe: restore flow director filter

Add support for storing flow director filter in SW.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
7 years agonet/ixgbe: restore TCP SYN filter
Wei Zhao [Fri, 13 Jan 2017 08:13:00 +0000 (16:13 +0800)]
net/ixgbe: restore TCP SYN filter

Add support for restoring TCP SYN filter in SW.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
7 years agonet/ixgbe: restore ether type filter
Wei Zhao [Fri, 13 Jan 2017 08:12:59 +0000 (16:12 +0800)]
net/ixgbe: restore ether type filter

Add support for restoring ether type filter in SW.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
7 years agonet/ixgbe: restore n-tuple filter
Wei Zhao [Fri, 13 Jan 2017 08:12:58 +0000 (16:12 +0800)]
net/ixgbe: restore n-tuple filter

Add support for restoring n-tuple filter in SW.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
7 years agonet/ixgbe: store L2 tunnel filter
Wei Zhao [Fri, 13 Jan 2017 08:12:57 +0000 (16:12 +0800)]
net/ixgbe: store L2 tunnel filter

Add support for storing L2 tunnel filter in SW.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
7 years agonet/ixgbe: store flow director filter
Wei Zhao [Fri, 13 Jan 2017 08:12:56 +0000 (16:12 +0800)]
net/ixgbe: store flow director filter

Add support for storing flow director filter in SW.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
7 years agonet/ixgbe: store TCP SYN filter
Wei Zhao [Fri, 13 Jan 2017 08:12:55 +0000 (16:12 +0800)]
net/ixgbe: store TCP SYN filter

Add support for storing TCP SYN filter in SW.

Signed-off-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wei Dai <wei.dai@intel.com>
7 years agonet/nfp: fix VLAN offload flags check
Olivier Matz [Thu, 12 Jan 2017 13:04:56 +0000 (14:04 +0100)]
net/nfp: fix VLAN offload flags check

Fix typo when checking that no VLAN offload flags are passed at port
initialization.

By the way, also fix a typo in the log.

Fixes: d4a27a3b092a ("nfp: add basic features")

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Alejandro Lucero <alejandro.lucero@netronome.com>
7 years agonet/ixgbe/base: update shared code version to 2017.01.05
Wei Dai [Thu, 12 Jan 2017 14:53:31 +0000 (22:53 +0800)]
net/ixgbe/base: update shared code version to 2017.01.05

Update version of shared code to 2017-01-05 in README.

Signed-off-by: Wei Dai <wei.dai@intel.com>
7 years agonet/ixgbe/base: add debug traces
Wei Dai [Thu, 12 Jan 2017 14:53:30 +0000 (22:53 +0800)]
net/ixgbe/base: add debug traces

Add some traces in the reset_hw logic and semaphore acquisition logic
to help debugging.

Signed-off-by: Wei Dai <wei.dai@intel.com>
7 years agonet/ixgbe/base: use clause 22 MDIO functions for Marvell PHYs
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.

Signed-off-by: Wei Dai <wei.dai@intel.com>
7 years agonet/ixgbe/base: support Marvell 1000BASE-T PHYs
Wei Dai [Thu, 12 Jan 2017 14:53:28 +0000 (22:53 +0800)]
net/ixgbe/base: support Marvell 1000BASE-T PHYs

Add initial support for Marvell 1000BASE-T PHYs on some X550 platforms.

Firmware owns the link config for Marvell PHYs on these platforms,
software should not touch it.

Also these platforms are not capable of speeds lower than 1Gb.

Signed-off-by: Wei Dai <wei.dai@intel.com>
7 years agonet/ixgbe/base: configure speeds for KR/KX backplane
Wei Dai [Thu, 12 Jan 2017 14:53:27 +0000 (22:53 +0800)]
net/ixgbe/base: configure speeds for KR/KX backplane

Ensure that the advertised link speeds are configured for KR/KX
backplane on some new platform.

Without this patch the link remains at 1G when resuming from low power
after being downshifted by LPLU (Low Power Link Up).

This patch ensures that the advertised speeds are not changed for
2.5G configurations.

Signed-off-by: Wei Dai <wei.dai@intel.com>
7 years agonet/ixgbe/base: remove a compiler warning
Wei Dai [Thu, 12 Jan 2017 14:53:26 +0000 (22:53 +0800)]
net/ixgbe/base: remove a compiler warning

Remove warning for "mac->led_link_act = i" where led_link_act is u8.

Signed-off-by: Wei Dai <wei.dai@intel.com>
7 years agonet/ixgbe/base: support XFI backplane for X550
Wei Dai [Thu, 12 Jan 2017 14:53:25 +0000 (22:53 +0800)]
net/ixgbe/base: support XFI backplane for X550

Add initial support for a XFI backplane interface on some new platforms.

The XFI backplane requires a custom tuned link. Hardware/Firmware owns
the link config for XF backplane and software must not interfere.

Signed-off-by: Wei Dai <wei.dai@intel.com>
7 years agonet/ixgbe: fix API parameter checking
Bernard Iremonger [Wed, 11 Jan 2017 17:24:59 +0000 (17:24 +0000)]
net/ixgbe: fix API parameter checking

Add checks to rte_pmd_ixgbe_* API's to ensure that the port
is an ixgbe port.

Fixes: 49e248223e9f ("net/ixgbe: add API for VF management")

Signed-off-by: Bernard Iremonger <bernard.iremonger@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/enic: remove unnecessary function parameter attributes
John Daley [Wed, 11 Jan 2017 03:42:12 +0000 (19:42 -0800)]
net/enic: remove unnecessary function parameter attributes

Remove __rte_unused attributes in function declaration when
the parameters really are used.

Fixes: dfbd6a9cb504 ("net/enic: extend flow director support for 1300 series")

Signed-off-by: John Daley <johndale@cisco.com>
7 years agonet/enic: use new Rx checksum flags
John Daley [Wed, 11 Jan 2017 03:42:11 +0000 (19:42 -0800)]
net/enic: use new Rx checksum flags

Use the new L3 and L4 ..CKSUM_GOOD  and ..CKSUM_UNKNOWN flags to
distinguish good checksums from unknown ones.

Signed-off-by: John Daley <johndale@cisco.com>
7 years agonet/i40e: improve message grep-ability
Michał Mirosław [Wed, 11 Jan 2017 17:13:49 +0000 (18:13 +0100)]
net/i40e: improve message grep-ability

Join message lines for easier grepping.
PRIxXX are left glued to strings as they are in other parts of the file.

Signed-off-by: Michał Mirosław <michal.miroslaw@atendesoftware.pl>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/i40e: return errno when interrupt setup fails
Michał Mirosław [Tue, 13 Dec 2016 01:08:19 +0000 (02:08 +0100)]
net/i40e: return errno when interrupt setup fails

Signed-off-by: Michał Mirosław <michal.miroslaw@atendesoftware.pl>
Reviewed-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/enic: support TSO
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.

Signed-off-by: John Daley <johndale@cisco.com>
7 years agonet/ixgbe: fix VMDq function name
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>
7 years agonet/i40e: remove redundant statement and braces
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>
7 years agonet/i40e: fix segment number in reassemble process
Chenghu Yao [Mon, 9 Jan 2017 03:31:04 +0000 (11:31 +0800)]
net/i40e: fix segment number in reassemble process

When freeing up last mbuf, start->nb_segs should be decremented
by one. See also ixgbe process.

Fixes: 0e0da28cd888 ("i40e: add vector scatter Rx")

Signed-off-by: Chenghu Yao <yao.chenghu@zte.com.cn>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
7 years agonet/af_packet: fix fd use after free
Timmons C. Player [Thu, 5 Jan 2017 14:33:35 +0000 (09:33 -0500)]
net/af_packet: fix fd use after free

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>
7 years agonet/bnxt: support new PCI IDs
Ajit Khaparde [Fri, 6 Jan 2017 19:55:17 +0000 (13:55 -0600)]
net/bnxt: support new PCI IDs

Add support for PCI IDs which was removed as a part of
commit 0e7bd0b2d6a5 ("net/bnxt: remove support for few devices")

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
7 years agonet/ixgbe: allow bulk alloc for the max size desc ring
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.

Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/i40e: allow bulk alloc for the max size desc ring
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.

Signed-off-by: Ilya Maximets <i.maximets@samsung.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/mlx5: support ConnectX-5 devices
Yongseok Koh [Fri, 6 Jan 2017 00:49:31 +0000 (16:49 -0800)]
net/mlx5: support ConnectX-5 devices

Add PCI device ID for ConnectX-5 and enable multi-packet send for PF and VF
along with changing documentation and release note.

Signed-off-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
7 years agonet/qede: change few log levels
Rasesh Mody [Fri, 6 Jan 2017 08:16:49 +0000 (00:16 -0800)]
net/qede: change few log levels

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede: fix per queue statisitics
Rasesh Mody [Fri, 6 Jan 2017 08:16:48 +0000 (00:16 -0800)]
net/qede: fix per queue statisitics

If value of number of rxq/txq is different than
RTE_ETHDEV_QUEUE_STAT_CNTRS, limit per queue
stats/xstats to minimum of the two.

Fixes: 7634c5f91569 ("net/qede: add queue statistics")

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
7 years agonet/qede: fix PF fastpath status block index
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>
7 years agonet/qede: fix minimum buffer size and scatter Rx check
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

Fixes: bec0228816c0 ("net/qede: support scatter gather")
Fixes: 2ea6f76aff40 ("qede: add core driver")

Signed-off-by: Harish Patil <harish.patil@qlogic.com>
7 years agonet/qede: fix scatter-gather
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>
7 years agonet/i40e: flush tunnel filters
Beilei Xing [Fri, 6 Jan 2017 05:27:19 +0000 (13:27 +0800)]
net/i40e: flush tunnel filters

This patch adds i40e_flow_flush_tunnel_filter
function to flush all tunnel filters, including
filters in SW and HW.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/i40e: flush ethertype filters
Beilei Xing [Fri, 6 Jan 2017 05:27:18 +0000 (13:27 +0800)]
net/i40e: flush ethertype filters

This patch adds i40e_flow_flush_ethertype_filter
function to flush all ethertype filters, including
filters in SW and HW.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/i40e: add flow flush function
Beilei Xing [Fri, 6 Jan 2017 05:27:17 +0000 (13:27 +0800)]
net/i40e: add flow flush function

This patch adds i40e_flow_flush function to flush all
filters for users. And flow director flush function
is involved first.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/i40e: destroy flow directory filter
Beilei Xing [Fri, 6 Jan 2017 05:27:16 +0000 (13:27 +0800)]
net/i40e: destroy flow directory filter

This patch supports destroying a flow directory filter
for users.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/i40e: destroy tunnel filter
Beilei Xing [Fri, 6 Jan 2017 05:27:15 +0000 (13:27 +0800)]
net/i40e: destroy tunnel filter

This patch adds i40e_flow_destroy_tunnel_filter
function to destroy a tunnel filter for users.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/i40e: destroy ethertype filter
Beilei Xing [Fri, 6 Jan 2017 05:27:14 +0000 (13:27 +0800)]
net/i40e: destroy ethertype filter

This patch adds i40e_flow_destroy_ethertype_filter
function to destroy a ethertype filter for users.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/i40e: add flow destroy function
Beilei Xing [Fri, 6 Jan 2017 05:27:13 +0000 (13:27 +0800)]
net/i40e: add flow destroy function

This patch adds i40e_flow_destroy function to destroy
a flow for users.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/i40e: add flow create function
Beilei Xing [Fri, 6 Jan 2017 05:27:12 +0000 (13:27 +0800)]
net/i40e: add flow create function

This patch adds i40e_flow_create function to create a
rule. It will check if a flow matches ethertype filter
or flow director filter or tunnel filter, if the flow
matches some kind of filter, then set the filter to HW.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/i40e: parse tunnel filter
Beilei Xing [Fri, 6 Jan 2017 05:27:11 +0000 (13:27 +0800)]
net/i40e: parse tunnel filter

This patch adds i40e_flow_parse_tunnel_filter to check
if a rule is a tunnel rule according to items of the
flow pattern, and the function also gets the tunnel info.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/i40e: parse flow director filter
Beilei Xing [Fri, 6 Jan 2017 05:27:10 +0000 (13:27 +0800)]
net/i40e: parse flow director filter

This patch adds i40e_flow_parse_fdir_filter to check
if a rule is a flow director rule according to the
flow pattern, and the function also gets the flow
director info.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/i40e: add flow validate function
Beilei Xing [Fri, 6 Jan 2017 05:27:09 +0000 (13:27 +0800)]
net/i40e: add flow validate function

This patch adds i40e_flow_validation function to check if
a flow is valid according to the flow pattern.
i40e_flow_parse_ethertype_filter is added first, it also
gets the ethertype info.
i40e_flow.c is added to handle all generic filter events.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/i40e: restore flow director filter
Beilei Xing [Fri, 6 Jan 2017 05:27:08 +0000 (13:27 +0800)]
net/i40e: restore flow director filter

Add support of restoring flow director filter.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/i40e: restore tunnel filter
Beilei Xing [Fri, 6 Jan 2017 05:27:07 +0000 (13:27 +0800)]
net/i40e: restore tunnel filter

Add support of restoring tunnel filter.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/i40e: restore ethertype filter
Beilei Xing [Fri, 6 Jan 2017 05:27:06 +0000 (13:27 +0800)]
net/i40e: restore ethertype filter

Add support of restoring ethertype filter in case filter
dropped accidentally, as all filters need to be added and
removed by user obviously for generic filter API.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/i40e: store flow director filter
Beilei Xing [Fri, 6 Jan 2017 05:27:05 +0000 (13:27 +0800)]
net/i40e: store flow director filter

Currently there's no flow director filter stored in SW. This
patch stores flow director filters in SW with cuckoo hash,
also adds protection if a flow director filter has been added.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/i40e: store tunnel filter
Beilei Xing [Fri, 6 Jan 2017 05:27:04 +0000 (13:27 +0800)]
net/i40e: store tunnel filter

Currently there's no tunnel filter stored in SW.
This patch stores tunnel filter in SW with cuckoo
hash, also adds protection if a tunnel filter has
been added.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/i40e: store ethertype filter
Beilei Xing [Fri, 6 Jan 2017 05:27:03 +0000 (13:27 +0800)]
net/i40e: store ethertype filter

Currently there's no ethertype filter stored in SW.
This patch stores ethertype filter with cuckoo hash
in SW, also adds protection if an ethertype filter
has been added.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
7 years agonet/mlx5: fix multi segment packet send
Shahaf Shuler [Mon, 26 Dec 2016 15:28:36 +0000 (17:28 +0200)]
net/mlx5: fix multi segment packet send

Dseg pointer is not initialized when the first segment is inlined
causing a segmentation fault in such situation.

Fixes: 2a66cf378954 ("net/mlx5: support inline send")

Signed-off-by: Shahaf Shuler <shahafs@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
7 years agonet/mlx5: fix Tx doorbell
Nélio Laranjeiro [Fri, 9 Dec 2016 13:27:58 +0000 (14:27 +0100)]
net/mlx5: fix Tx doorbell

Too much data is uselessly written to the Tx doorbell, which since v16.11
may also cause Tx queues to behave erratically and crash applications.

This regression was seen on VF devices when the BlueFlame buffer size is
zero (txq->bf_buf_size) due to the following change:

 -       txq->bf_offset ^= txq->bf_buf_size;
 +       txq->bf_offset ^= (1 << txq->bf_buf_size);

Fixes: 1d88ba171942 ("net/mlx5: refactor Tx data path")
Fixes: d5793daefec8 ("net/mlx5: reduce memory overhead for BF handling")

Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>