dpdk.git
8 years agonet/bnxt: support NIC Partitioning
Ajit Khaparde [Mon, 26 Sep 2016 16:18:16 +0000 (11:18 -0500)]
net/bnxt: support NIC Partitioning

Adding code to enable support for NIC Partitioning or NPAR 1.0
As a part of NPAR, we don't allow port settings like speed or flow
control to be changed.

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Stephen Hurd <stephen.hurd@broadcom.com>
Reviewed-by: David Christensen <david.christensen@broadcom.com>
8 years agonet/bnxt: support Broadcom StrataGX
Ajit Khaparde [Mon, 26 Sep 2016 16:16:54 +0000 (11:16 -0500)]
net/bnxt: support Broadcom StrataGX

This patch adds support for the Broadcom StrataGX® BCM5871X
series of Communications Processors.

These ARM based processors target a broad range of networking
applications including virtual CPE (vCPE) and NFV appliances,
10G service routers and gateways, control plane processing for
Ethernet switches, and network attached storage (NAS).

Other than adding the PCI Id for supporting the device,
the patch also adds a memory barrier before the Tx doorbell
and Completing ring doorbell is written to. Since ARM has a
weakly ordered memory model this enforces a strict ordering
of the descriptor writes before the doorbell writes happen.

Signed-off-by: John Carney <john.carney@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
8 years agonet/ixgbe/base: add base driver update brief
Xiao Wang [Sun, 25 Sep 2016 09:00:17 +0000 (17:00 +0800)]
net/ixgbe/base: add base driver update brief

The ixgbe base driver was updated to version
cid-10g-shared-code.2016.04.12.

Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
8 years agonet/ixgbe/base: clean up
Xiao Wang [Sun, 25 Sep 2016 09:00:16 +0000 (17:00 +0800)]
net/ixgbe/base: clean up

Change the parameter bypass_vlvf to vlvf_bypass for consistency
with ixgbe_common.c.

Clean up some whitespace and misalignment.

Change variable type of secrxreg from int to u32 as it's used
to store register value.

Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
8 years agonet/ixgbe/base: fix skipping PHY config
Xiao Wang [Sun, 25 Sep 2016 09:00:15 +0000 (17:00 +0800)]
net/ixgbe/base: fix skipping PHY config

By exiting early we could skip the PHY configuration and as such
the driver may not configure the PHY correctly for SFP+.

This patch removes the logic which would previously skip the PHY
configuration in the case where we are already at the requested
speed in ixgbe_setup_mac_link_multispeed_fiber().

Fixes: f3430431abaf ("ixgbe/base: add SFP+ dual-speed support")

Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
8 years agonet/ixgbe/base: remove unneeded flow control code
Xiao Wang [Sun, 25 Sep 2016 09:00:14 +0000 (17:00 +0800)]
net/ixgbe/base: remove unneeded flow control code

Support for flow control auto negotiation is defeatured from X550em_a
fiber when connected to speeds lower than 10Gbps. This patch cleans up
the code path which is mostly dead to begin with.

- add device IDs check in ixgbe_device_supports_autoneg_fc().
- ixgbe_fc_autoneg_fiber_x550em_a() is now used only to pass the user
  settings to ixgbe_fc_enable_generic().
- make sure that start_hw does not fail when setup_fc is not implemented.
- small fix in the debug message when ixgbe_device_supports_autoneg_fc()
  returns false.

Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
8 years agonet/ixgbe/base: update X550em_a backplane speed
Xiao Wang [Sun, 25 Sep 2016 09:00:13 +0000 (17:00 +0800)]
net/ixgbe/base: update X550em_a backplane speed

Correct link flow for X550em_a backplane with ALEF.

Report the correct link capabilities:
   SKUs configured for 2.5G only support 2.5G.
   non-10G SKUs can only support 2.5 or 1G.

Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
8 years agonet/ixgbe/base: fix possible corruption of shadow RAM
Xiao Wang [Sun, 25 Sep 2016 09:00:12 +0000 (17:00 +0800)]
net/ixgbe/base: fix possible corruption of shadow RAM

Currently, not all shadow RAM accesses are being done under the
protection of a semaphore, which could result in corruption.

Refactor the code so that it is possible to hold the semaphore
around ixgbe_host_interface_command by introducing an unlocked form.
This patch also eliminates the function ixgbe_read_ee_hostif_data_X550
in favor of the function ixgbe_read_ee_hostif_X550.
The new arrangement is able to get both the management interface semaphore
and the EEPROM semaphore at the same time instead of separately.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
8 years agonet/ixgbe/base: add two MAC ops for Hyper-V
Xiao Wang [Sun, 25 Sep 2016 09:00:11 +0000 (17:00 +0800)]
net/ixgbe/base: add two MAC ops for Hyper-V

This patch adds negotiate_api_version and set_rlpml into mac_ops. With the
introduction of Hyper-V functionality, we can have separate functions to
accommodate different implementations without have one break the other.

Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
8 years agonet/ixgbe/base: add X550em_a FW ALEF support
Xiao Wang [Sun, 25 Sep 2016 09:00:10 +0000 (17:00 +0800)]
net/ixgbe/base: add X550em_a FW ALEF support

This patch adds X550em_a FW ALEF support. ALEF is the new unified FW.
The driver uses the KRM_PMD_RX_FLEX_PORT/FLX_MASK_ST20 registers to
configure the lane mode.

Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
8 years agonet/ixgbe/base: separate PHY ops init from PHY init
Xiao Wang [Sun, 25 Sep 2016 09:00:09 +0000 (17:00 +0800)]
net/ixgbe/base: separate PHY ops init from PHY init

This patch moves PHY ops pointers initialization to
ixgbe_init_phy_ops_X550em and PHY identifying/initializing
to ixgbe_identify_phy_x550em.

Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
8 years agonet/ixgbe/base: prevent link speed value conflict
Xiao Wang [Sun, 25 Sep 2016 09:00:08 +0000 (17:00 +0800)]
net/ixgbe/base: prevent link speed value conflict

This patch changes the value of IXGBE_LINK_SPEED_10_FULL from 4 to 2,
as 4 is reserved to 100Mbit Half Duplex in E1000 shared code.

Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
8 years agonet/ixgbe/base: remove X550em_a 100Mbps
Xiao Wang [Sun, 25 Sep 2016 09:00:07 +0000 (17:00 +0800)]
net/ixgbe/base: remove X550em_a 100Mbps

X550em_a only supports 10G/1G link.

Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
8 years agonet/ixgbe/base: report autoneg supported for X550
Xiao Wang [Sun, 25 Sep 2016 09:00:06 +0000 (17:00 +0800)]
net/ixgbe/base: report autoneg supported for X550

Make sure ixgbe_device_supports_autoneg_fc() returns true for the device
IDs of X550EM_A_1G_T and X550EM_A_1G_T_L.

Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
8 years agonet/ixgbe/base: reduce delay for SWFW semaphore
Xiao Wang [Sun, 25 Sep 2016 09:00:05 +0000 (17:00 +0800)]
net/ixgbe/base: reduce delay for SWFW semaphore

This patch reduces the SWFW semaphore/PHY Token retry delay.

ixgbe_release_swfw_sync_X540: Reduce 5 ms delay after releasing
semaphore to 2 ms. HW team indicated 1 ms delay would be sufficient
for FW access.

ixgbe_acquire_swfw_sync_X540: Remove 5 ms delay after acquiring
semaphore.

ixgbe_acquire_swfw_sync_X550a: Remove 5 ms delay since there are
two 2 ms delays in the semaphore release flow.

Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
8 years agonet/ixgbe/base: factorize mailbox write needing ack
Xiao Wang [Sun, 25 Sep 2016 09:00:04 +0000 (17:00 +0800)]
net/ixgbe/base: factorize mailbox write needing ack

ixgbevf_write_msg_read_ack() is now performing mailbox write and read,
so this patch use this function to commonize mailbox write and read.

Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
8 years agonet/ixgbe/base: add missing FDIRSCTPM mask setting
Xiao Wang [Sun, 25 Sep 2016 09:00:03 +0000 (17:00 +0800)]
net/ixgbe/base: add missing FDIRSCTPM mask setting

This patch adds missing FDIRSCTPM mask setting for tunneled packets.
It should be set the same way as FDIRTCPM and FDIRUDPM so that SCTP
packets can be filtered correctly.

Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
8 years agonet/ixgbe/base: set default autoneg speed at reset
Xiao Wang [Sun, 25 Sep 2016 09:00:02 +0000 (17:00 +0800)]
net/ixgbe/base: set default autoneg speed at reset

This patch avoids the situation where we initialize an adapter but have not
yet set up phy.autoneg_advertised speeds. In that case we could end
up with having no autoneg speeds enabled and therefore get no link until we
reset the link and set the autoneg speeds correctly.

Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
8 years agonet/ixgbe/base: use default check link for X550em_a
Xiao Wang [Sun, 25 Sep 2016 09:00:01 +0000 (17:00 +0800)]
net/ixgbe/base: use default check link for X550em_a

This patch removes the X550em_a specific check link function and uses
ixgbe_check_mac_link_generic instead. It is not necessary to
check both the MAC link register and external PHY registers when
checking the link.

Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
8 years agonet/ixgbe/base: add bounds check in LED functions
Xiao Wang [Sun, 25 Sep 2016 09:00:00 +0000 (17:00 +0800)]
net/ixgbe/base: add bounds check in LED functions

Do parameter check to prevent exceptional value being written into
register.

Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
8 years agonet/ixgbe/base: add constants for GENEVE UDP port
Xiao Wang [Sun, 25 Sep 2016 08:59:59 +0000 (16:59 +0800)]
net/ixgbe/base: add constants for GENEVE UDP port

X550em_a adds GENEVE support by using the upper 16 bits of VXLANCTRL
to store the UDP port (VXLANCTRL.GENEVE_UDP_PORT).

This patch adds definitions that can be used to manipulate the ports
depending on which protocol is being configured.

Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
8 years agonet/ixgbe/base: support X550em_a SGMII FC autoneg
Xiao Wang [Sun, 25 Sep 2016 08:59:58 +0000 (16:59 +0800)]
net/ixgbe/base: support X550em_a SGMII FC autoneg

Create flow control (FC) setup and enable functions to configure PHY
registers. These registers advertise FC settings according to the user
requested mode. On link establishment, these settings are negotiated
with the link partner to agree on the settings to use: RX and TX enabled,
TX only enabled, or FC disabled and RX enabled (which also enables TX).

Remove the part of code that performs FC auto-negotiation (AN) in
ixgbe_setup_m88 and put it in a new function to maintain consistency
with other FC AN implementations so far. Add function pointers to the
setup-fc and enable-fc functions so that they get called during init
to perform FC AN.

Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
8 years agonet/ixgbe/base: bypass checking link for crosstalk
Xiao Wang [Sun, 25 Sep 2016 08:59:57 +0000 (16:59 +0800)]
net/ixgbe/base: bypass checking link for crosstalk

When HW starts, first read the NVM to see if the crosstalk fix should
be used on the given HW and cache that information in the HW structure.

When we check_link we first see if 1) NVM requests this fix 2) if
we are an SFP+ device 3) see if a module is not in the SFP+ cage.
If all the above are true then don't bother checking the link, just
say it is down.

Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
8 years agonet/ixgbe/base: define X550 PCIe serial MAC address
Xiao Wang [Sun, 25 Sep 2016 08:59:56 +0000 (16:59 +0800)]
net/ixgbe/base: define X550 PCIe serial MAC address

Add SERIAL_NUMBER_MAC_ADDR definition for X550.

Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
8 years agonet/ixgbe/base: fix check for NACK
Xiao Wang [Sun, 25 Sep 2016 08:59:55 +0000 (16:59 +0800)]
net/ixgbe/base: fix check for NACK

Previously we checked return buffer for
(IXGBE_VF_SET_MACVLAN | IXGBE_VT_MSGTYPE_NACK), but this would not
work if index is not 0 and as a result NACK will not be detected.

Fixes: af75078fece3 ("first public release")

Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
8 years agonet/ixgbe/base: access IOSF by host interface
Xiao Wang [Sun, 25 Sep 2016 08:59:54 +0000 (16:59 +0800)]
net/ixgbe/base: access IOSF by host interface

This patch makes sure that we access IOSF registers through the
host interface command (HIC) for the majority of X550em devices.
All devices with NVM are capable of using the HIC.

For consistency all instances where the ixgbe_write_phy_reg_mdi is called
directly are converted to function pointer calls.

Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
8 years agonet/ixgbe/base: increment PF-VF mailbox version
Xiao Wang [Sun, 25 Sep 2016 08:59:53 +0000 (16:59 +0800)]
net/ixgbe/base: increment PF-VF mailbox version

This patch will pave the way for the new VF unicast promiscuous
mode support.

Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
8 years agonet/ixgbe/base: report VF MTU setting failure
Xiao Wang [Sun, 25 Sep 2016 08:59:52 +0000 (16:59 +0800)]
net/ixgbe/base: report VF MTU setting failure

Propagate return value when trying to set the maximum packet length. A
PF driver could return a NACK for this request, and the VF driver will
need to know this.

Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
8 years agonet/ixgbe/base: fix function comments about X550
Xiao Wang [Sun, 25 Sep 2016 08:59:51 +0000 (16:59 +0800)]
net/ixgbe/base: fix function comments about X550

Some function comments are obviously wrong, this patch rewords them.

Fixes: d2e72774e58c ("ixgbe/base: support X550")
Fixes: 0790adeb5675 ("ixgbe/base: support X550em_a device")

Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
8 years agonet/ixgbe/base: configure DMA coalescing for 10Mb
Xiao Wang [Sun, 25 Sep 2016 08:59:50 +0000 (16:59 +0800)]
net/ixgbe/base: configure DMA coalescing for 10Mb

Provide a DMA coalescing configuration for 10Mb link speed.

Signed-off-by: Xiao Wang <xiao.w.wang@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
8 years agonet/ixgbe/base: clear page register in error path
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>
8 years agonet/ixgbe/base: add flow control autoneg for X550em_a fiber
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>
8 years agonet/ixgbe/base: add flow control for X550em_a fiber
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>
8 years agonet/ixgbe/base: add VF promiscuous mode constants
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>
8 years agonet/ixgbe/base: rework X550em_a 1G PHY init
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>
8 years agonet/ixgbe/base: extract PHY probing function
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>
8 years agonet/ixgbe/base: move X550 MAC ops init into functions
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>
8 years agonet/ixgbe/base: move multicast mode update
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>
8 years agonet/ixgbe/base: support X550em_a 10G PHY
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>
8 years agonet/ixgbe/base: change endianness of PHY data
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>
8 years agonet/ixgbe/base: remove X550em SFP iXFI setup
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>
8 years agonet/ixgbe/base: fix pointer check
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>
8 years agonet/i40e: enable 25G device
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>
8 years agonet/i40e: use PHY type to check PHY capability
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>
8 years agonet/enic: support scatter Rx in MTU update
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>
8 years agonet/enic: fix freeing memory for descriptor ring
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>
8 years agonet/enic: enable link check interrupt
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>
8 years agonet/enic: extract code for checking link status
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>
8 years agonet/enic: unregister interrupt handler when stopping
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>
8 years agonet/mlx5: support Mellanox OFED 3.4
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>
8 years agomaintainers: add new bnxt driver maintainer
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>
8 years agonet/i40e: support ARM platform
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>
8 years agonet/enic: get Rx queue count
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>
8 years agonet/ixgbe: use macro for PCI log format
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>
8 years agonet/i40e/base: support FCoE
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>
8 years agonet/i40e/base: get SAN MAC address
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>
8 years agonet/i40e/base: minor clean up
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>
8 years agonet/i40e/base: enable proxy command for X722
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>
8 years agonet/i40e/base: add multicast magic packet enable flag
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>
8 years agonet/i40e/base: enable set/get HMC resource profile
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>
8 years agonet/i40e/base: enable wake on LAN for X722
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>
8 years agonet/i40e/base: get PHY abilities for 25G
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>
8 years agonet/i40e/base: add 25G PHY capability
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>
8 years agonet/i40e/base: define PHY type capability constants
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>
8 years agonet/i40e/base: fix UDP packet header
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>
8 years agonet/i40e/base: add function to clear default VSI
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>
8 years agonet/i40e: fix parsing QinQ packets type
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>
8 years agonet/i40e: fix null pointer dereferences when using VMDq+RSS
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>
8 years agonet/ixgbe: fix VF reset to apply to correct VF
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>
8 years agonet/ixgbe: start Rx/Tx after all config done
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>
8 years agonet/i40e: fix dropping packets with ethertype 0x88A8
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>
8 years agonet/enic: fix bad L4 checksum flag on ICMP packets
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>
8 years agonet/fm10k: fix MAC address removal from switch
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>
8 years agonet/enic: move link checking init to probe time
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>
8 years agonet/pcap: fix memory leak in jumbo frames
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>
8 years agonet/mlx5: remove gather loop on segments
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>
8 years agonet/mlx5: reduce memory overhead for WQE handling
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>
8 years agonet/mlx5: reduce memory overhead for BF handling
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>
8 years agonet/mlx5: reduce memory overhead for CQE handling
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>
8 years agonet/mlx5: reduce memory overhead of Rx/Tx descriptors
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>
8 years agonet/mlx5: rework hardware structures
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>
8 years agonet/nfp: unregister interrupt callback when closing
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>
8 years agonet/nfp: fix copying MAC address
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>
8 years agonet/nfp: use random MAC address if not configured
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>
8 years agonet/thunderx: support 81xx SoC
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>
8 years agonet/thunderx: add tunneling extension info capability flag
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>
8 years agonet/thunderx: remove generic passX references
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>
8 years agonet/mlx: fix debug build with gcc 6.1
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>
8 years agonet/pcap: fix checkpatch warnings
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>
8 years agonet/pcap: remove rte prefix from static functions
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>
8 years agonet/pcap: coding convention updates
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>
8 years agonet/pcap: fix missing Tx interface assignment
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>
8 years agonet/pcap: simplify function
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>
8 years agonet/pcap: remove redundant assignment
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>
8 years agonet/pcap: remove unnecessary check
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>
8 years agonet/pcap: update single interface handling
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>
8 years agonet/pcap: reorder functions
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>
8 years agonet/pcap: reorder includes
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>
8 years agonet/pcap: make const array static
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>
8 years agonet/pcap: group stats related fields into a struct
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>