Xiao Wang [Sun, 25 Sep 2016 08:59:49 +0000 (16:59 +0800)]
net/ixgbe/base: clear page register in error path
The error exit should at least try to set the page register to 0
since other code will assume that state.
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Xiao Wang [Sun, 25 Sep 2016 08:59:48 +0000 (16:59 +0800)]
net/ixgbe/base: add flow control autoneg for X550em_a fiber
This patch adds a separate function for enabling Flow Control (FC)
auto-negotiation on X550em_a:
- rename ixgbe_fc_autoneg_x550a() to ixgbe_fc_autoneg_backplane_x550em_a().
- create ixgbe_fc_autoneg_fiber_x550em_a() specifically for fiber.
- add definitions for KRM_PCS_KX_AN_LP register and related bits.
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Xiao Wang [Sun, 25 Sep 2016 08:59:47 +0000 (16:59 +0800)]
net/ixgbe/base: add flow control for X550em_a fiber
This patch adds a separate function for setting up Flow Control (FC)
on X550em_a fiber:
- rename ixgbe_setup_fc_x550a() to ixgbe_setup_fc_backplane_x550em_a().
- create ixgbe_setup_fc_fiber_x550em_a() to configure FC for fiber.
- add definitions for KRM_AN_CNTL_4 and KRM_PCS_KX_AN along with related
definitions.
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Xiao Wang [Sun, 25 Sep 2016 08:59:46 +0000 (16:59 +0800)]
net/ixgbe/base: add VF promiscuous mode constants
Add new definitions to support VF unicast promiscuous mode which
will be implemented in a later patch.
Besides, rename definitions of subdevice IDs on SFP LOM to make it
easier to distinguish.
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Xiao Wang [Sun, 25 Sep 2016 08:59:45 +0000 (16:59 +0800)]
net/ixgbe/base: rework X550em_a 1G PHY init
Fully initialize X550em_a 1G PHYs; move the PHY definitions from
ixgbe_x550.h to ixgbe_phy.h, where they really belong; define
register numbers in decimal because that is how they are in the spec.
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Xiao Wang [Sun, 25 Sep 2016 08:59:44 +0000 (16:59 +0800)]
net/ixgbe/base: extract PHY probing function
Move the PHY probe code into a separate function so that it can be
reused. A subsequent patch will use it for configurations that
provide the PHY address explicitly.
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Xiao Wang [Sun, 25 Sep 2016 08:59:43 +0000 (16:59 +0800)]
net/ixgbe/base: move X550 MAC ops init into functions
This patch introduces new init_ops functions for X550EM_a and X550EM_x.
This makes it easier to assign function pointers with specific
dependencies (like media type) for each MAC.
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Xiao Wang [Sun, 25 Sep 2016 08:59:42 +0000 (16:59 +0800)]
net/ixgbe/base: move multicast mode update
This patch adds update_xcast_mode callback in mac ops, and moves
ixgbevf_update_xcast_mode function into base code.
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Xiao Wang [Sun, 25 Sep 2016 08:59:41 +0000 (16:59 +0800)]
net/ixgbe/base: support X550em_a 10G PHY
This patch uses the shared Management Data Input/output (MDIO)
functions ixgbe_read_phy_reg_x550a and ixgbe_write_phy_reg_x550a
for X550em_a 10G PHY which supports flow control auto-negotiation.
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Xiao Wang [Sun, 25 Sep 2016 08:59:40 +0000 (16:59 +0800)]
net/ixgbe/base: change endianness of PHY data
The x550a related firmware reverses the endianness of the PHY data read
and written via host interface command, so make corresponding changes
to that.
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Xiao Wang [Sun, 25 Sep 2016 08:59:39 +0000 (16:59 +0800)]
net/ixgbe/base: remove X550em SFP iXFI setup
This patch removes X550em SFP iXFI setup for the drivers since there
is no released hardware production with SFP iXFI.
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Xiao Wang [Sun, 25 Sep 2016 08:59:38 +0000 (16:59 +0800)]
net/ixgbe/base: fix pointer check
The vfta_delta value rather than the pointer should be checked.
Fixes:
b978f7b38c14 ("net/ixgbe/base: simplify VLAN management")
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Qi Zhang [Tue, 27 Sep 2016 01:37:22 +0000 (09:37 +0800)]
net/i40e: enable 25G device
Add support for 25G link speed to enable 25G device.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
Qi Zhang [Tue, 27 Sep 2016 01:37:21 +0000 (09:37 +0800)]
net/i40e: use PHY type to check PHY capability
Using device ID to check PHY capability is not extensible.
Now we are using PHY type to detect PHY capability.
All link speeds supported by the device are encoded into PHY type,
and PHY type value can be read by admin queue "get_phy_capability"
command at initialization stage.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
John Daley [Thu, 22 Sep 2016 17:02:46 +0000 (10:02 -0700)]
net/enic: support scatter Rx in MTU update
Re-initialize Rq's when MTU is changed. This allows for more
efficient use of mbufs when moving from an MTU that is greater
than the mbuf size to one that is less. Also move to using Rx
scatter mode when moving from an MTU less than the mbuf size
to one that is greater.
Signed-off-by: Nelson Escobar <neescoba@cisco.com>
Signed-off-by: John Daley <johndale@cisco.com>
Nelson Escobar [Thu, 22 Sep 2016 17:02:45 +0000 (10:02 -0700)]
net/enic: fix freeing memory for descriptor ring
The function vnic_dev_free_desc_ring() didn't actually free memory. Fix
this by first changing vnic_dev_alloc_desc_ring() to use the common
allocation function, then in vnic_dev_free_desc_ring call the common
free function.
Fixes:
fefed3d1e62c ("enic: new driver")
Signed-off-by: Nelson Escobar <neescoba@cisco.com>
Nelson Escobar [Mon, 19 Sep 2016 18:50:11 +0000 (11:50 -0700)]
net/enic: enable link check interrupt
Signed-off-by: Nelson Escobar <neescoba@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
Nelson Escobar [Mon, 19 Sep 2016 18:50:10 +0000 (11:50 -0700)]
net/enic: extract code for checking link status
Move link check code to a new function so that it can be reused
by the interrupt handler.
Signed-off-by: Nelson Escobar <neescoba@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
Nelson Escobar [Mon, 19 Sep 2016 18:50:09 +0000 (11:50 -0700)]
net/enic: unregister interrupt handler when stopping
enic_disable() wasn't calling rte_intr_disable() or
rte_intr_callback_unregister(). stopping/starting a port would
result in the same interrupt callback being registered multiple
times, which would then cause it to be called multiple times on
every interrupt.
Fixes:
fefed3d1e62c ("enic: new driver")
Signed-off-by: Nelson Escobar <neescoba@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
Nélio Laranjeiro [Wed, 21 Sep 2016 13:48:12 +0000 (15:48 +0200)]
net/mlx5: support Mellanox OFED 3.4
Some macros are renamed by Mellanox OFED 3.4.
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Ajit Khaparde [Wed, 21 Sep 2016 22:27:14 +0000 (17:27 -0500)]
maintainers: add new bnxt driver maintainer
Add Ajit Khaparde as the maintainer of the bnxt PMD
Reviewed-by: David Christensen <david.christensen@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Stephen Hurd <stephen.hurd@broadcom.com>
Jianbo Liu [Fri, 5 Aug 2016 09:06:23 +0000 (14:36 +0530)]
net/i40e: support ARM platform
And add read memory barrier to avoid status inconsistency
between two Rx descriptors readings.
Signed-off-by: Jianbo Liu <jianbo.liu@linaro.org>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Nelson Escobar [Mon, 19 Sep 2016 18:50:29 +0000 (11:50 -0700)]
net/enic: get Rx queue count
Add support to enic for rte_eth_rx_queue_count().
Signed-off-by: Nelson Escobar <neescoba@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
Yunjian Wang [Sat, 27 Aug 2016 03:28:54 +0000 (11:28 +0800)]
net/ixgbe: use macro for PCI log format
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Remy Horton <remy.horton@intel.com>
Qi Zhang [Thu, 25 Aug 2016 20:05:18 +0000 (16:05 -0400)]
net/i40e/base: support FCoE
Add Fibre Channel Over Ethernet (FCoE) in PHY capabilities.
Add data structure for FCoE statistics collection.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Qi Zhang [Thu, 25 Aug 2016 20:05:17 +0000 (16:05 -0400)]
net/i40e/base: get SAN MAC address
Add function that reads the adapter's Storage Area Network (SAN) MAC
address from NVM.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Qi Zhang [Thu, 25 Aug 2016 20:05:16 +0000 (16:05 -0400)]
net/i40e/base: minor clean up
Remove unused device ID.
Remove unused compile option.
Adjust code alignment.
Standardize macros.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Qi Zhang [Thu, 25 Aug 2016 20:05:15 +0000 (16:05 -0400)]
net/i40e/base: enable proxy command for X722
Add definitions to enable proxy cmd.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Qi Zhang [Thu, 25 Aug 2016 20:05:14 +0000 (16:05 -0400)]
net/i40e/base: add multicast magic packet enable flag
Add a definition for multicast magic packet enable flag
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Qi Zhang [Thu, 25 Aug 2016 20:05:13 +0000 (16:05 -0400)]
net/i40e/base: enable set/get HMC resource profile
Enable admin queue command that can get or set host memory cache (HMC)
resource profile.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Qi Zhang [Thu, 25 Aug 2016 20:05:12 +0000 (16:05 -0400)]
net/i40e/base: enable wake on LAN for X722
Add macros and data structure to support wake on
LAN feature for X722.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Qi Zhang [Thu, 25 Aug 2016 20:05:11 +0000 (16:05 -0400)]
net/i40e/base: get PHY abilities for 25G
Add extended PHY types to get PHY abilities for 25G, then put
PHY types for 25G into the proper field when the PHY capabilities
are queried.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Qi Zhang [Thu, 25 Aug 2016 20:05:10 +0000 (16:05 -0400)]
net/i40e/base: add 25G PHY capability
Add PHY type macros for 25G PHY capabilities.
Change data type and bit setting defines for 25G.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Qi Zhang [Thu, 25 Aug 2016 20:05:09 +0000 (16:05 -0400)]
net/i40e/base: define PHY type capability constants
Define macros for PHY type capabilities to replace exist enum type.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Qi Zhang [Thu, 25 Aug 2016 20:05:08 +0000 (16:05 -0400)]
net/i40e/base: fix UDP packet header
Correct Rx ptype payload layer for non_tunneled ipv6 with UDP.
Fixes:
8db9e2a1b232 ("i40e: base driver")
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Qi Zhang [Thu, 25 Aug 2016 20:05:07 +0000 (16:05 -0400)]
net/i40e/base: add function to clear default VSI
Add a function to return the VSI to default settings.
Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
Beilei Xing [Mon, 12 Sep 2016 09:41:46 +0000 (17:41 +0800)]
net/i40e: fix parsing QinQ packets type
Previously, PTYPE filed in the RX descriptors is not set properly
for QinQ packets. The wrong PTYPE is generated because outer Tag did
not have ORT/PIT configured, so fix this issue by configuring ORT/PIT.
This patch also changes bitmask of outer VLAN tag in L2 header
to support RSS and flow director for QinQ.
Fixes:
4861cde46116 ("i40e: new poll mode driver")
Fixes:
4072d503aaa5 ("i40e: fix VLAN bitmasks for input set")
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
Rich Lane [Tue, 2 Aug 2016 19:34:56 +0000 (12:34 -0700)]
net/i40e: fix null pointer dereferences when using VMDq+RSS
When using VMDQ+RSS, the queue ids used by the application are not
contiguous (see i40e_pf_config_rss). Most of the driver already handled
this, but there were a few cases where it assumed all configured queues
had been setup.
Fixes:
4861cde46116 ("i40e: new poll mode driver")
Fixes:
6b4537128394 ("i40e: free queue memory when closing")
Fixes:
8e109464c022 ("i40e: allow vector Rx and Tx usage")
Signed-off-by: Rich Lane <rich.lane@bigswitch.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
Alex Zelezniak [Tue, 30 Aug 2016 01:23:29 +0000 (20:23 -0500)]
net/ixgbe: fix VF reset to apply to correct VF
In SR-IOV configuration, queues 0 - nb_rx_queues belong to VF0,
which means that with the current implementation when a reset mbox
message comes from any VF, it affects the settings of VF0.
Fix this by using PF queue index to update the correct queue.
Fixes:
dbb0b8737f64 ("ixgbe: add vlan offload support")
Signed-off-by: Alex Zelezniak <alexz@att.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Wang Wei [Tue, 6 Sep 2016 12:05:17 +0000 (20:05 +0800)]
net/ixgbe: start Rx/Tx after all config done
Starting rxtx before flow director config will cause driver not to
receive packets from NIC.
Signed-off-by: Wang Wei <lnykww@gmail.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
Beilei Xing [Wed, 17 Aug 2016 01:58:06 +0000 (09:58 +0800)]
net/i40e: fix dropping packets with ethertype 0x88A8
In FW default settings, Ethertype 0x88A8 is treated as S-TAG,
and packets with S-TAG should be received in Port Virtualizer mode.
However, Port Virtualizer mode is not initialized in DPDK, so X710 will
drop packets with Ethertype 0x88A8.
This patch fixes this issue by turning off S-TAG identification.
Fixes:
4861cde46116 ("i40e: new poll mode driver")
Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
John Daley [Wed, 17 Aug 2016 22:15:26 +0000 (15:15 -0700)]
net/enic: fix bad L4 checksum flag on ICMP packets
The bad L4 checksum flag was set on IP packets which were not
also TCP or UDP packets. This includes ICMP, IGMP and OSPF packets.
L4 ptypes were being treated as bits instead of values within the
L4 mask causing the code to check L4 checksum in the completion
queue and incorrectly set the L4 bad checksum flag.
Fixes:
947d860c821f ("enic: improve Rx performance")
Reviewed-by: Nelson Escobar <neescoba@cisco.com>
Signed-off-by: John Daley <johndale@cisco.com>
Xiao Wang [Fri, 5 Aug 2016 03:17:43 +0000 (11:17 +0800)]
net/fm10k: fix MAC address removal from switch
When testpmd quits with two ports, the second port's MAC address
remains in the MAC table of switch manager.
There needs to be some time for HW to quiesce when closing a port,
otherwise a subsequent port close won't be handled correctly.
This patch adds a delay after turning off a logic port, just as
the kernel driver does.
Fixes:
8b5c9ec20b7b ("fm10k: support VMDQ in MAC/VLAN filter")
Reported-by: Xueqin Lin <xueqin.lin@intel.com>
Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Jing Chen <jing.d.chen@intel.com>
Nelson Escobar [Tue, 9 Aug 2016 21:42:04 +0000 (14:42 -0700)]
net/enic: move link checking init to probe time
The enic DMAs link status information to the host and this requires a
little setup. This setup was being done as a result of calling
rte_eth_dev_start(). But applications expect to be able to check link
status before calling rte_eth_dev_start().
This patch moves the link status setup to enic_init() which is called
at device probe time so that link status can be checked anytime.
Fixes:
fefed3d1e62c ("enic: new driver")
Signed-off-by: Nelson Escobar <neescoba@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
Dror Birkman [Tue, 20 Sep 2016 12:08:56 +0000 (15:08 +0300)]
net/pcap: fix memory leak in jumbo frames
If rte_pktmbuf_alloc() fails on any segment that is not the initial
segment, previously allocated mbufs are not freed.
Fixes:
6db141c91e1f ("pcap: support jumbo frames")
Signed-off-by: Dror Birkman <dror.birkman@lightcyber.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Nélio Laranjeiro [Tue, 20 Sep 2016 08:53:51 +0000 (10:53 +0200)]
net/mlx5: remove gather loop on segments
Tx function was handling a double loop to send segmented packets, it can be
done in a single one.
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Signed-off-by: Vasily Philipov <vasilyf@mellanox.com>
Nélio Laranjeiro [Tue, 20 Sep 2016 08:53:50 +0000 (10:53 +0200)]
net/mlx5: reduce memory overhead for WQE handling
PMD uses only power of two number of Work Queue Elements (aka WQE), storing
the number of elements in log2 helps to reduce the size of the container to
store it.
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Nélio Laranjeiro [Tue, 20 Sep 2016 08:53:49 +0000 (10:53 +0200)]
net/mlx5: reduce memory overhead for BF handling
Blue Flame (aka BF) is a buffer allocated with a power of two value, its
size is returned by Verbs in log2.
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Nélio Laranjeiro [Tue, 20 Sep 2016 08:53:48 +0000 (10:53 +0200)]
net/mlx5: reduce memory overhead for CQE handling
PMD uses only power of two number of Completion Queue Elements (aka CQE),
storing the number of elements in log2 helps to reduce the size of the
container to store it.
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Nélio Laranjeiro [Tue, 20 Sep 2016 08:53:47 +0000 (10:53 +0200)]
net/mlx5: reduce memory overhead of Rx/Tx descriptors
PMD uses only power of two number of descriptors, storing the number of
elements in log2 helps to reduce the size of the container to store it.
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Nélio Laranjeiro [Tue, 20 Sep 2016 08:53:46 +0000 (10:53 +0200)]
net/mlx5: rework hardware structures
Rework Work Queue Element (aka WQE) structures to fit PMD needs.
A WQE is an aggregation of 16 bytes elements known as "data segments"
(aka dseg).
The only common part is the first two elements i.e. the control one to
define the job type, and the Ethernet segment which embed offload requests
with other information, after that, it can have:
- a raw data packet,
- a data pointer to the packet itself,
- both.
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Alejandro Lucero [Fri, 16 Sep 2016 11:11:14 +0000 (12:11 +0100)]
net/nfp: unregister interrupt callback when closing
With an app using hotplug feature, when a device is unplugged without
unregistering makes the interrupt handling unstable.
Fixes:
6c53f87b3497 ("nfp: add link status interrupt")
Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
Alejandro Lucero [Fri, 16 Sep 2016 11:11:04 +0000 (12:11 +0100)]
net/nfp: fix copying MAC address
Fixes:
defb9a5dd156 ("nfp: introduce driver initialization")
Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
Alejandro Lucero [Fri, 16 Sep 2016 11:10:48 +0000 (12:10 +0100)]
net/nfp: use random MAC address if not configured
Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
Jerin Jacob [Thu, 21 Jul 2016 14:01:47 +0000 (19:31 +0530)]
net/thunderx: support 81xx SoC
81xx NIC subsystem differs in new PCI subsystem_device_id and
NICVF_CAP_CQE_RX2 capability.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Jerin Jacob [Thu, 21 Jul 2016 14:01:46 +0000 (19:31 +0530)]
net/thunderx: add tunneling extension info capability flag
Certain thunderx SoC pass has additional optional word
in Rx descriptor to hold tunneling extension info.
Based on this capability, the location where packet pointer
address stored in Rx descriptor will vary.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Jerin Jacob [Thu, 21 Jul 2016 14:01:45 +0000 (19:31 +0530)]
net/thunderx: remove generic passX references
thunderx pmd driver needs to support multiple SoC
variants in ThunderX family.
Remove generic pass references from driver as each SoC
can have same pass number.
Signed-off-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
Bruce Richardson [Mon, 19 Sep 2016 14:36:54 +0000 (15:36 +0100)]
net/mlx: fix debug build with gcc 6.1
With recent gcc versions, e.g. gcc 6.1, compilation of mlx drivers with
debug enabled produces lots of errors complaining that "pedantic" is
not a warning level that can be ignored.
error: ‘-pedantic’ is not an option that controls warnings [-Werror=pragmas]
#pragma GCC diagnostic ignored "-pedantic"
^~~~~~~~~~~
These errors can be removed by changing the "-pedantic" to "-Wpedantic".
Fixes:
7fae69eeff13 ("mlx4: new poll mode driver")
Fixes:
771fa900b73a ("mlx5: introduce new driver for Mellanox ConnectX-4 adapters")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Ferruh Yigit [Fri, 26 Aug 2016 11:17:59 +0000 (12:17 +0100)]
net/pcap: fix checkpatch warnings
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Ferruh Yigit [Fri, 26 Aug 2016 11:17:58 +0000 (12:17 +0100)]
net/pcap: remove rte prefix from static functions
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Ferruh Yigit [Fri, 26 Aug 2016 11:17:57 +0000 (12:17 +0100)]
net/pcap: coding convention updates
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Ferruh Yigit [Fri, 26 Aug 2016 11:17:56 +0000 (12:17 +0100)]
net/pcap: fix missing Tx interface assignment
Missing pcap assignment may cause pcap file/interface to be opened
again, and previous one not closed.
Fixes:
1e38a7c66923 ("pcap: fix storage of name and type in queues")
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Ferruh Yigit [Fri, 26 Aug 2016 11:17:55 +0000 (12:17 +0100)]
net/pcap: simplify function
simplify function rte_eth_from_pcaps_common by using interim variables.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Ferruh Yigit [Fri, 26 Aug 2016 11:17:54 +0000 (12:17 +0100)]
net/pcap: remove redundant assignment
data->name assigned twice.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Ferruh Yigit [Fri, 26 Aug 2016 11:17:53 +0000 (12:17 +0100)]
net/pcap: remove unnecessary check
Both fields are fields of same type of struct, one's size can't be bigger
than others.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Ferruh Yigit [Fri, 26 Aug 2016 11:17:52 +0000 (12:17 +0100)]
net/pcap: update single interface handling
Remove hardcoded single interface values, make it more obvious.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Ferruh Yigit [Fri, 26 Aug 2016 11:17:51 +0000 (12:17 +0100)]
net/pcap: reorder functions
Reorder functions to be able to remove function declarations in .c file.
Function definitions not modified.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Ferruh Yigit [Fri, 26 Aug 2016 11:17:50 +0000 (12:17 +0100)]
net/pcap: reorder includes
Remove unused ones and sort remaining.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Ferruh Yigit [Fri, 26 Aug 2016 11:17:49 +0000 (12:17 +0100)]
net/pcap: make const array static
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Ferruh Yigit [Fri, 26 Aug 2016 11:17:48 +0000 (12:17 +0100)]
net/pcap: group stats related fields into a struct
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Ferruh Yigit [Fri, 26 Aug 2016 11:17:47 +0000 (12:17 +0100)]
net/pcap: use single interface flag instead of hardcoding
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Ferruh Yigit [Fri, 26 Aug 2016 11:17:46 +0000 (12:17 +0100)]
net/pcap: remove duplicated max queue number check
Remove duplicated check by reorganizing the code, no functional change.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Ferruh Yigit [Fri, 26 Aug 2016 11:17:45 +0000 (12:17 +0100)]
net/pcap: move comment
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Ferruh Yigit [Fri, 26 Aug 2016 11:17:44 +0000 (12:17 +0100)]
net/pcap: do not carry kvlist argument
Don't carry kvlist argument into sub function and used it, use kvlist
argument in upper level of call stack.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Ferruh Yigit [Fri, 26 Aug 2016 11:17:43 +0000 (12:17 +0100)]
net/pcap: do not carry numa node argument
Instead of defining numa_node variable upper level of call stack and
carry into sub function, set it where needs to be used.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Ferruh Yigit [Fri, 26 Aug 2016 11:17:42 +0000 (12:17 +0100)]
net/pcap: update function to allow reuse
rte_eth_from_pcaps and rte_eth_from_pcaps_n_dumpers functions are very
close, updated rte_eth_from_pcaps function and reused.
No functional update.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Ferruh Yigit [Fri, 26 Aug 2016 11:17:41 +0000 (12:17 +0100)]
net/pcap: check max queue number
Number of queues is defined by devargs, a check added to be sure this
number is not bigger than configured max number of queue.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Ferruh Yigit [Fri, 26 Aug 2016 11:17:40 +0000 (12:17 +0100)]
net/pcap: reorganize private structs
struct rx_pcaps and tx_pcaps used to point parsed devargs, but it is not
clear with current names.
Merged both into single struct and modified struct name and field names.
Functionality not changed, only struct names.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Ferruh Yigit [Fri, 26 Aug 2016 11:17:39 +0000 (12:17 +0100)]
net/pcap: use macros for parameter string
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Ferruh Yigit [Fri, 26 Aug 2016 11:17:38 +0000 (12:17 +0100)]
net/pcap: convert config option to a macro
pcap PMD is using ring PMD configuration parameters to set max number of
queues. This creates an unnecessary dependency and confusion.
Stop using configuration parameter to set max number of queues and
convert this variable into a macro within source code, to simplify
configuration file.
Default value of macro is same as ring parameter's default.
pcap pmd doesn't need to be configured in a detail to set rx and tx max
queue numbers separately, so using same macro for both queues.
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Ali Volkan Atli [Wed, 27 Jul 2016 13:11:09 +0000 (16:11 +0300)]
net/e1000: fix returned number of available Rx descriptors
Fixes:
0f6b7c7f7a37 ("igb: use DD bit to count RX available descriptors")
Signed-off-by: Ali Volkan Atli <volkan.atli@argela.com.tr>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Nélio Laranjeiro [Wed, 14 Sep 2016 11:53:55 +0000 (13:53 +0200)]
net/mlx5: fix inline logic
To improve performance the NIC expects for large packets to have a pointer
to a cache aligned address, old inline code could break this assumption
which hurts performance.
Fixes:
2a66cf378954 ("net/mlx5: support inline send")
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Signed-off-by: Vasily Philipov <vasilyf@mellanox.com>
Nélio Laranjeiro [Wed, 14 Sep 2016 11:53:54 +0000 (13:53 +0200)]
net/mlx5: re-factorize functions
Rework logic of wqe_write() and wqe_write_vlan() which are pretty similar
to keep a single one.
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Nélio Laranjeiro [Wed, 14 Sep 2016 11:53:53 +0000 (13:53 +0200)]
net/mlx5: force inline for completion function
This function was supposed to be inlined, but was not because several
functions calls it. This function should always be inline avoid
external function calls and to optimize code in data-path.
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Yaacov Hazan [Wed, 14 Sep 2016 11:53:52 +0000 (13:53 +0200)]
net/mlx5: fix flow director drop mode
Packet rejection was routed to a polled queue. This patch route them to a
dummy queue which is not polled.
Fixes:
76f5c99e6840 ("mlx5: support flow director")
Signed-off-by: Yaacov Hazan <yaacovh@mellanox.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Yaacov Hazan [Wed, 14 Sep 2016 11:53:51 +0000 (13:53 +0200)]
net/mlx5: refactor allocation of flow director queues
This is done to prepare support for drop queues, which are not related to
existing Rx queues and need to be managed separately.
Signed-off-by: Yaacov Hazan <yaacovh@mellanox.com>
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Raslan Darawsheh [Wed, 14 Sep 2016 11:53:50 +0000 (13:53 +0200)]
net/mlx5: fix removing VLAN filter
memmove was moving bytes as the number of elements next to i, while it
should move the number of elements multiplied by the size of each element.
Fixes:
e9086978 ("mlx5: support VLAN filtering")
Signed-off-by: Raslan Darawsheh <rdarawsheh@asaltech.com>
Adrien Mazarguil [Wed, 14 Sep 2016 11:53:49 +0000 (13:53 +0200)]
net/mlx5: fix Rx VLAN offload capability report
This capability is implemented but not reported.
Fixes:
f3db9489188a ("mlx5: support Rx VLAN stripping")
Signed-off-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Yaacov Hazan [Wed, 14 Sep 2016 11:53:48 +0000 (13:53 +0200)]
net/mlx5: fix inconsistent return value in flow director
The return value in DPDK is negative errno on failure.
Since internal functions in mlx driver return positive
values need to negate this value when it returned to
dpdk layer.
Fixes:
76f5c99 ("mlx5: support flow director")
Signed-off-by: Yaacov Hazan <yaacovh@mellanox.com>
Rami Rosen [Sat, 6 Aug 2016 06:16:23 +0000 (09:16 +0300)]
doc: fix typo in VF guide
This patch fixes a typo in doc/guides/nics/intel_vf.rst.
Fixes:
fc1f2750a3ec ("doc: programmers guide")
Signed-off-by: Rami Rosen <rami.rosen@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
Sagi Grimberg [Tue, 2 Aug 2016 14:41:21 +0000 (17:41 +0300)]
net/mlx5: fix possible NULL dereference in Rx path
The user is allowed to call ->rx_pkt_burst() even without free
mbufs in the pool. In this scenario we'll fail allocating a rep mbuf
on the first iteration (where pkt is still NULL). This would cause us
to deref a NULL pkt (reset refcount and free).
Fix this by checking the pkt before freeing it.
Fixes:
a1bdb71a32da ("net/mlx5: fix crash in Rx")
Signed-off-by: Sagi Grimberg <sagi@grimberg.me>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
Jeff Guo [Wed, 7 Sep 2016 09:38:40 +0000 (05:38 -0400)]
net/i40e: add packet type translation for X722
To make the PCTYPE in x722 compatible with original PCTYPE in
flow director (FD) filters, the PCTYPE in the FD programming
descriptor needs to be translated into a different PCTYPE using
GLQF_FD_PCTYPE table.
Translation needs to be done before the FD filter is programmed.
Signed-off-by: Jeff Guo <jia.guo@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
Jeff Guo [Wed, 7 Sep 2016 09:38:02 +0000 (05:38 -0400)]
net/i40e: add new packet types for device X722
There are 6 new PCTYPEs enabled in the device x722.
The 6 new PCTYPEs As below:
* NonF Unicast IPv4, UDP
* NonF Multicast IPv4, UDP
* NonF IPv4, TCP, SYN, no ACK
* NonF Unicast IPv6, UDP
* NonF Multicast IPv6, UDP
Signed-off-by: Jeff Guo <jia.guo@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
Yong Wang [Mon, 29 Aug 2016 19:18:50 +0000 (12:18 -0700)]
net/vmxnet3: enable LRO
This change enables device LRO if requested.
The current implementation of jumbo frame Rx can be used for LRO
directly without changes.
Note that since jumbo frame uses both ring0 and ring1, it cannot
be enabled in UPT (VMDirectPath) mode.
Signed-off-by: Yong Wang <yongwang@vmware.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Yong Wang [Mon, 29 Aug 2016 19:18:49 +0000 (12:18 -0700)]
net/vmxnet3: update NIC documentation
Signed-off-by: Yong Wang <yongwang@vmware.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Yong Wang [Mon, 29 Aug 2016 19:18:48 +0000 (12:18 -0700)]
net/vmxnet3: update feature doc
Signed-off-by: Yong Wang <yongwang@vmware.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Yong Wang [Mon, 29 Aug 2016 19:18:47 +0000 (12:18 -0700)]
net/vmxnet3: reallocate shared memzone on re-config
When adding a DPDK port to ovs-vswitchd with DPDK, the vmxnet3 device
fails to activate due to mismatched magic number. This failure causes
following operations to run: start the port, stop the port,
reconfigure and re-start the port.
During reconfigure, if there is an existing memzone, driver will reuse
it. But reconfigure may request different number of Tx/Rx queues.
This results in a memzone with wrong size and potential invalid memory
access.
To fix this, free the memzone if found and reserve a new one.
Signed-off-by: Yong Wang <yongwang@vmware.com>
Reviewed-by: Guolin Yang <gyang@vmware.com>
Reviewed-by: Daniele Di Proietto <ddiproietto@vmware.com>
Tested-by: Daniele Di Proietto <ddiproietto@vmware.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Yong Wang [Mon, 29 Aug 2016 19:18:46 +0000 (12:18 -0700)]
net/vmxnet3: coding style changes
Signed-off-by: Yong Wang <yongwang@vmware.com>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Yong Wang [Mon, 29 Aug 2016 19:18:45 +0000 (12:18 -0700)]
net/vmxnet3: improve error checks and return values
Signed-off-by: Yong Wang <yongwang@vmware.com>
Reviewed-by: Juho Snellman <jsnell@iki.fi>
Acked-by: Stephen Hemminger <stephen@networkplumber.org>
Yury Kylulin [Mon, 29 Aug 2016 16:50:48 +0000 (19:50 +0300)]
net/i40e: fix mbuf leak during Rx queue release
For the vector PMD, release all mbufs from the Rx queue if no packets
are received after device start.
Fixes:
9ed94e5bb04e ("i40e: add vector Rx")
Signed-off-by: Yury Kylulin <yury.kylulin@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>