Commit Graph

1535 Commits

Author SHA1 Message Date
Xiao Wang
260e2e22e2 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>
2016-09-30 12:27:18 +02:00
Xiao Wang
c3fb605491 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>
2016-09-30 12:27:18 +02:00
Xiao Wang
39eab21092 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>
2016-09-30 12:27:18 +02:00
Xiao Wang
1726b9cd9c 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>
2016-09-30 12:27:18 +02:00
Xiao Wang
11c1941b4a net/ixgbe/base: fix pointer check
The vfta_delta value rather than the pointer should be checked.

Fixes: b978f7b38c ("net/ixgbe/base: simplify VLAN management")

Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2016-09-30 12:27:18 +02:00
Qi Zhang
75d133dd32 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>
2016-09-30 12:27:18 +02:00
Qi Zhang
edfb226f69 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>
2016-09-30 12:27:18 +02:00
John Daley
c3e09182bc 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>
2016-09-30 12:27:18 +02:00
Nelson Escobar
d10798072c 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: fefed3d1e6 ("enic: new driver")

Signed-off-by: Nelson Escobar <neescoba@cisco.com>
2016-09-30 12:27:18 +02:00
Nelson Escobar
53fa8cc0d5 net/enic: enable link check interrupt
Signed-off-by: Nelson Escobar <neescoba@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
2016-09-30 12:27:18 +02:00
Nelson Escobar
cf8d9826b7 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>
2016-09-30 12:27:18 +02:00
Nelson Escobar
667b8a3bd4 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: fefed3d1e6 ("enic: new driver")

Signed-off-by: Nelson Escobar <neescoba@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
2016-09-30 12:27:18 +02:00
Nélio Laranjeiro
c904ae25fe 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>
2016-09-30 12:27:18 +02:00
Jianbo Liu
7b0cf70135 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>
2016-09-30 12:27:18 +02:00
Nelson Escobar
a787f7e69f 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>
2016-09-30 12:27:18 +02:00
Yunjian Wang
6e67657c26 net/ixgbe: use macro for PCI log format
Signed-off-by: Yunjian Wang <wangyunjian@huawei.com>
Acked-by: Remy Horton <remy.horton@intel.com>
2016-09-30 12:27:18 +02:00
Qi Zhang
d536192e7c 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>
2016-09-30 12:27:18 +02:00
Qi Zhang
fc1d8b8a16 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>
2016-09-30 12:27:18 +02:00
Qi Zhang
68cae24ffd 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>
2016-09-30 12:27:18 +02:00
Qi Zhang
33d17a274e net/i40e/base: enable proxy command for X722
Add definitions to enable proxy cmd.

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
2016-09-30 12:27:18 +02:00
Qi Zhang
a1cd66f4a0 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>
2016-09-30 12:27:18 +02:00
Qi Zhang
1de867b887 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>
2016-09-30 12:27:18 +02:00
Qi Zhang
ad5e1cce13 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>
2016-09-30 12:27:18 +02:00
Qi Zhang
51131ae119 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>
2016-09-30 12:27:18 +02:00
Qi Zhang
daacf4705f 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>
2016-09-30 12:27:18 +02:00
Qi Zhang
234e2cfec6 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>
2016-09-30 12:27:18 +02:00
Qi Zhang
eac42f4a73 net/i40e/base: fix UDP packet header
Correct Rx ptype payload layer for non_tunneled ipv6 with UDP.

Fixes: 8db9e2a1b2 ("i40e: base driver")

Signed-off-by: Qi Zhang <qi.z.zhang@intel.com>
2016-09-30 12:27:18 +02:00
Qi Zhang
167530157b 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>
2016-09-30 12:27:18 +02:00
Beilei Xing
e536c2e328 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: 4861cde461 ("i40e: new poll mode driver")
Fixes: 4072d503aa ("i40e: fix VLAN bitmasks for input set")

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2016-09-30 12:27:18 +02:00
Rich Lane
875b4899c6 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: 4861cde461 ("i40e: new poll mode driver")
Fixes: 6b45371283 ("i40e: free queue memory when closing")
Fixes: 8e109464c0 ("i40e: allow vector Rx and Tx usage")

Signed-off-by: Rich Lane <rich.lane@bigswitch.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2016-09-30 12:27:18 +02:00
Alex Zelezniak
a9a68b61ad 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: dbb0b8737f ("ixgbe: add vlan offload support")

Signed-off-by: Alex Zelezniak <alexz@att.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2016-09-30 12:27:18 +02:00
Wang Wei
a75e10c9f7 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>
2016-09-30 12:27:18 +02:00
Beilei Xing
4d61120d5c 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: 4861cde461 ("i40e: new poll mode driver")

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Jingjing Wu <jingjing.wu@intel.com>
2016-09-30 12:27:18 +02:00
John Daley
e7a29e46d1 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: 947d860c82 ("enic: improve Rx performance")

Reviewed-by: Nelson Escobar <neescoba@cisco.com>
Signed-off-by: John Daley <johndale@cisco.com>
2016-09-30 12:27:18 +02:00
Xiao Wang
b961fe9344 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: 8b5c9ec20b ("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>
2016-09-30 12:27:18 +02:00
Nelson Escobar
c98779abbc 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: fefed3d1e6 ("enic: new driver")

Signed-off-by: Nelson Escobar <neescoba@cisco.com>
Reviewed-by: John Daley <johndale@cisco.com>
2016-09-30 12:27:18 +02:00
Dror Birkman
19f8167c68 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: 6db141c91e ("pcap: support jumbo frames")

Signed-off-by: Dror Birkman <dror.birkman@lightcyber.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2016-09-30 12:27:18 +02:00
Nélio Laranjeiro
6579c27c11 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>
2016-09-30 12:27:18 +02:00
Nélio Laranjeiro
a821d09d32 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>
2016-09-30 12:27:18 +02:00
Nélio Laranjeiro
d5793daefe 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>
2016-09-30 12:27:18 +02:00
Nélio Laranjeiro
e2f116ee3c 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>
2016-09-30 12:27:18 +02:00
Nélio Laranjeiro
b4b12e55a0 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>
2016-09-30 12:27:18 +02:00
Nélio Laranjeiro
8688b2f8a8 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>
2016-09-30 12:27:18 +02:00
Alejandro Lucero
25853c71d3 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: 6c53f87b34 ("nfp: add link status interrupt")

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
2016-09-30 12:27:18 +02:00
Alejandro Lucero
84e5752ea5 net/nfp: fix copying MAC address
Fixes: defb9a5dd1 ("nfp: introduce driver initialization")

Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
2016-09-30 12:27:18 +02:00
Alejandro Lucero
e6decee382 net/nfp: use random MAC address if not configured
Signed-off-by: Alejandro Lucero <alejandro.lucero@netronome.com>
2016-09-30 12:27:18 +02:00
Jerin Jacob
b72a77685f 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>
2016-09-30 12:27:18 +02:00
Jerin Jacob
e2c519b392 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>
2016-09-30 12:27:18 +02:00
Jerin Jacob
398a1be141 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>
2016-09-30 12:27:18 +02:00
Bruce Richardson
fc5b160f3c 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: 7fae69eeff ("mlx4: new poll mode driver")
Fixes: 771fa900b7 ("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>
2016-09-30 12:27:18 +02:00