Commit Graph

2972 Commits

Author SHA1 Message Date
Matej Vido
8c21057185 net/szedata2: add more supported firmwares
Add IBUF and OBUF offsets definitions for new firmwares.

Signed-off-by: Matej Vido <vido@cesnet.cz>
2017-06-12 15:21:22 +01:00
Matej Vido
18402f9f70 net/szedata2: move ibuf and obuf to specific header
Signed-off-by: Matej Vido <vido@cesnet.cz>
2017-06-12 15:21:22 +01:00
Matej Vido
54c2576268 net/szedata2: refactor ibuf and obuf address definition
This is to prepare for firmwares with multiple ibufs and obufs.
Ibufs and obufs are the modules in FPGA firmware implementing
the Ethernet port.
There is one ibuf+obuf per Ethernet port.
The cards and firmwares allow one physical port to be one Ethernet
port or split into more Ethernet ports, e.g. one 100GE physical
port can be one Ethernet port of 100GE or split into ten Ethernet
ports of 10GE.
All DMA queues in the device are shared between all Ethernet ports.
Offsets of ibufs and obufs are defined in array.
Functions which operate on ibufs and obufs iterate over this array.

Signed-off-by: Matej Vido <vido@cesnet.cz>
2017-06-12 15:21:21 +01:00
Matej Vido
393da2a338 net/szedata2: refactor ibuf and obuf read and write
Remove unused read and write functions.
Use rte_read*, rte_write* functions to access ibuf and obuf
address space.

Signed-off-by: Matej Vido <vido@cesnet.cz>
2017-06-12 15:21:21 +01:00
Matej Vido
963c128751 net/szedata2: refactor ibuf and obuf names
Prefix "cgmii" is removed because it is too specific.
There are different ibuf/obuf modules in different firmwares
but the address space definition is the same.
This patch makes the name general.

Signed-off-by: Matej Vido <vido@cesnet.cz>
2017-06-12 15:21:21 +01:00
Wei Zhao
6a4d050e28 net/igb: flush all the filter
This patch adds a function to flush all the fliter list
and filter rule on a port.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
2017-06-12 11:40:28 +01:00
Wei Zhao
4be9e84ec8 net/igb: destroy consistent filter
This patch adds a function to destroy the flow fliter.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
2017-06-12 11:40:28 +01:00
Wei Zhao
22bb13410c net/igb: create consistent filter
This patch adds a function to create the flow directory filter.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
2017-06-12 11:40:27 +01:00
Wei Zhao
7cd77faf71 net/igb: parse flow API flex filter
check if the rule is a flex byte rule, and get the flex info.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
2017-06-12 11:40:20 +01:00
Wei Zhao
a13d9475a2 net/igb: parse flow API TCP SYN filter
check if the rule is a TCP SYN rule, and get the SYN info.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
2017-06-12 11:40:10 +01:00
Wei Zhao
a8600af437 net/igb: parse flow API ethertype filter
check if the rule is a ethertype rule, and get the ethertype info.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
2017-06-12 11:40:03 +01:00
Wei Zhao
c0688ef1ed net/igb: parse flow API n-tuple filter
Add rule validate function and check if the rule is a
n-tuple rule, and get the n-tuple info.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
2017-06-12 11:38:45 +01:00
Wei Zhao
69fdf74d8b net/igb: restore flex type filter
Add support for restoring flex type filter in SW.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
2017-06-12 11:34:42 +01:00
Wei Zhao
e2a2268b53 net/igb: restore ether type filter
Add support for restoring ether type filter in SW.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
2017-06-12 11:34:28 +01:00
Wei Zhao
862bd41ece net/igb: restore n-tuple filter
Add support for restoring n-tuple filter in SW.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
2017-06-12 11:34:12 +01:00
Wei Zhao
7db41ec827 net/igb: store and restore TCP SYN filter
Add support for storing and restoring TCP SYN filter in SW.

Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
2017-06-12 11:33:38 +01:00
Shijith Thotton
f544804f4b net/liquidio: do not touch mbuf initialized fields
Avoid re-initializing of mbuf fields which are set while in pool.
Replaced lio_recv_buffer_alloc with rte_pktmbuf_alloc.

See commit 8f094a9ac5 ("mbuf: set mbuf fields while in pool").

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
2017-06-12 10:41:29 +01:00
Ajit Khaparde
bc8ee8572e net/bnxt: fix reporting of link status
This patch fixes incorrect reporting of link status

1) When link is down, set speed to zero. Otherwise a wrong non-zero
   speed will be displayed.

2) DAC cables can detect there is a signal, but it necessarily does not
   mean link is up. Code previously treated this as link up.

Fixes: 7bc8e9a227 ("net/bnxt: support async link notification")
Cc: stable@dpdk.org

Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2017-06-12 10:41:29 +01:00
Ajit Khaparde
a0cd82e044 net/bnxt: update HWRM defines
Some HWRM defines are missing from hsi_struct_def_dpdk.h
This patch adds them.

Also remove duplicate HWRM_RING_GRP_ALLOC entry.

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2017-06-12 10:41:29 +01:00
Ajit Khaparde
20c8f79d22 net/bnxt: move PMD specific functions
Move PMD specific functions in the appropriate rte_pmd_bnxt.c file

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2017-06-12 10:41:29 +01:00
Beilei Xing
d926743473 net/i40e: support ether pattern for FDIR
Previously, i40e PMD will select ethertype filter
parser when adding ether pattern rules. In fact,
FDIR also supports ether pattern.
This patch adds ether pattern support for FDIR.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-06-12 10:41:29 +01:00
Beilei Xing
c0d8994f42 net/i40e: update supported patterns for FDIR
This patch updates supported patterns for flow
director filters.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-06-12 10:41:29 +01:00
Beilei Xing
42044b69c6 net/i40e: support input set selection for FDIR
This patch supports input set selection for flow
director filter.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-06-12 10:41:29 +01:00
Beilei Xing
6ced3dd72f net/i40e: support flexible payload parsing for FDIR
This patch adds flexible payload parsing support for
flow director filter.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-06-12 10:41:29 +01:00
Beilei Xing
30965ca341 net/i40e: add NVGRE flow parsing
This patch adds NVGRE flow parsing function to support NVGRE
classification.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-06-12 10:41:29 +01:00
Beilei Xing
2e756a9f8f net/i40e: refactor VXLAN flow parsing function
The current vxlan parsing function is not easy to read when parsing
filter type, this patch optimizes the function and makes it more
readable.

Signed-off-by: Beilei Xing <beilei.xing@intel.com>
Acked-by: Wenzhuo Lu <wenzhuo.lu@intel.com>
2017-06-12 10:41:29 +01:00
Shijith Thotton
dc7037ba73 net/liquidio: fix MTU calculation from port configuration
max_rx_pkt_len member of port RX configuration indicates max frame
length. Ethernet header and CRC length should be subtracted from it to
find MTU.

Fixes: 605164c8e7 ("net/liquidio: add API to validate VF MTU")
Cc: stable@dpdk.org

Signed-off-by: Shijith Thotton <shijith.thotton@caviumnetworks.com>
2017-06-12 10:41:29 +01:00
Moti Haimovsky
9f05a4b818 net/mlx4: support user space Rx interrupt event
Implement rxq interrupt callbacks

Signed-off-by: Moti Haimovsky <motih@mellanox.com>
Acked-by: Adrien Mazarguil <adrien.mazarguil@6wind.com>
2017-06-12 10:41:29 +01:00
Harish Patil
91cc1bb97c net/qede: refactor Tx routine
Refactor TX routine such that TX BD updates can all be grouped together.
Based on the TX offloads requested the TX bitfields are calculated in
a temporary variable and TX BDs are updated at the end. This will minimize
the if checks also. This change is done to easily accommodate newer TX
offload operations in the future.

Signed-off-by: Harish Patil <harish.patil@cavium.com>
2017-06-12 10:41:29 +01:00
Harish Patil
44346c24b7 net/qede: fix VXLAN tunnel Tx offload flag setting
This patch fixes missing PKT_TX_TUNNEL_VXLAN Tx offload flag from the
supported Tx offloads and an incorrect tunnel TX BD bit setting.

Fixes: 3d4bb44116 ("net/qede: add fastpath support for VXLAN tunneling")
Cc: stable@dpdk.org

Signed-off-by: Harish Patil <harish.patil@cavium.com>
2017-06-12 10:41:29 +01:00
Rasesh Mody
2e2f392b24 net/qede/base: upgrade the FW to 8.20.0.0
This patch adds changes to upgrade to 8.20.0.0 FW.

Signed-off-by: Rasesh Mody <rasesh.mody@cavium.com>
2017-06-12 10:41:29 +01:00
Harish Patil
4c4bdadfa9 net/qede: refactoring multi-queue implementation
This patch does the following refactoring and cleanup:

- As part of multi-queue support a struct member called 'type' was added
  in struct qede_fastpath in order to identify whether a queue is RX or
  TX and take actions based on that. This was unnecessary in the first
  place since pointers to RX and TX queues are already available in
  rte_eth_dev->data. So all usage of fp->type is removed.

- Remove remaining additional layer of internal callbacks for RX/TX
  queues and fastpath related operations from the qed_eth_ops_pass.
  With this change the files qede_eth_if.[c,h] are no longer needed.

- Add new per-queue start/stop APIs instead of clubbing it all together.

- Remove multiple TXQs references (num_tc and fp->txqs) since CoS is not
  supported.

- Enable sharing of the status block for each queue pair.

- Remove enum qede_dev_state and instead make use of existing port
  states RTE_ETH_QUEUE_STATE_STOPPED/RTE_ETH_QUEUE_STATE_STARTED.

- Move qede_dev_start() and qede_dev_stop() to qede_ethdev.c from
  qede_rxtc.c.

Signed-off-by: Harish Patil <harish.patil@cavium.com>
2017-06-12 10:41:29 +01:00
Harish Patil
9a6d30ae6d net/qede: refactoring vport handling code
The refactoring is mainly for two reasons:

- To remove an additional layer of internal callbacks for all vport
  related operations from the struct qed_eth_ops_pass. Instead, we
  can invoke base APIs directly.

- Splitting a single large vport-update configuration into multiple and
  independent vport-update operations. Each configuration would touch
  only the required config bits that needs an update.

Signed-off-by: Harish Patil <harish.patil@cavium.com>
2017-06-12 10:41:29 +01:00
Ajit Khaparde
4cfe399f65 net/bnxt: support to set VF rxmode
This patch adds support to configure the VF L2 Rx settings.
The per VF setting is maintained in bnxt_child_vf_info.l2_rx_mask

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2017-06-12 10:41:29 +01:00
Ajit Khaparde
18c2854b96 net/bnxt: configure a default VF VLAN
This patch adds code to insert a default VF VLAN.
Also track the current default VLAN per vnic for the VF.
When setting the default VLAN, avoid setting it to the current value.

Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2017-06-12 10:41:29 +01:00
Ajit Khaparde
7a5b087444 net/bnxt: support to add a VF MAC address
This patch adds support to allocate a filter and program
it in the hardware for every MAC address added to the specified
function.

Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2017-06-12 10:41:29 +01:00
Ajit Khaparde
ff63ebbb67 net/bnxt: determine the Rx status of VF
This patch adds code to determine the Rx status of a VF.
It adds the rte_pmd_bnxt_get_vf_rx_status call, which calculates
the VNIC count of the function to get the Rx status.

Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2017-06-12 10:41:28 +01:00
Ajit Khaparde
dd46c6bbd5 net/bnxt: support get and clear VF specific stats
This patch adds code to get and clear VF stats.

It also adds the necessary HWRM structures to send the command
to the firmware.

Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2017-06-12 10:41:28 +01:00
Ajit Khaparde
36735a932c net/bnxt: support set VF QOS and MAC anti spoof
This patch adds support to
1) enable VF MAC anti spoof.
2) QOS configuration for specified VF.

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2017-06-12 10:41:28 +01:00
Ajit Khaparde
49947a13ba net/bnxt: support Tx loopback, set VF MAC and queues drop
Add functions rte_pmd_bnxt_set_tx_loopback,
rte_pmd_bnxt_set_all_queues_drop_en and
rte_pmd_bnxt_set_vf_mac_addr to configure tx_loopback,
queue_drop and VF MAC address setting in the hardware.
It also adds the necessary functions to send the HWRM commands
to the firmware.

Signed-off-by: Steeven Li <steeven.li@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2017-06-12 10:41:28 +01:00
Ajit Khaparde
bb81e07323 net/bnxt: support LED on/off
This patch adds support for dev_led_on/off dev_ops

HWRM calls added:
bnxt_hwrm_port_led_qcaps()
bnxt_hwrm_port_led_cfg()

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2017-06-12 10:41:28 +01:00
Ajit Khaparde
577d3dced0 net/bnxt: refactor the query stats
1) Use hwrm_stat_ctx_query command to query statistics
   Using hwrm_stat_ctx_query command will allow polling
   the statistics from hardware instead of using the current push
   model from the hardware which does a DMA of the stats to the host
   at fixed intervals.

2) Use the rx_mbuf_alloc_fail to track mbuf alloc failures.

3) We were wrongly incrementing hwrm_cmd_seq in bnxt_hwrm_stat_clear
   and bnxt_hwrm_stat_ctx_alloc functions.  This patch fixes that.

Signed-off-by: Stephen Hurd <stephen.hurd@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2017-06-12 10:41:28 +01:00
Ajit Khaparde
3e12fdb78e net/bnxt: support VLAN pvid
This patch adds code to support vlan_pvid_set dev_op

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2017-06-12 10:41:28 +01:00
Ajit Khaparde
2fc201884b net/bnxt: support rxq/txq get information
Add support for txq_info_get and rxq_info_get dev_ops

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2017-06-12 10:41:28 +01:00
Ajit Khaparde
0958d8b643 net/bnxt: support LRO
This patch adds support to enable and disable LRO
To support this feature, the driver creates an aggregator ring.
When the hardware starts doing LRO, it sends a tpa_start completion.
When the driver receives a tpa_end completion, it indicates that the
LRO chaining is complete.

Signed-off-by: Steeven Li <steeven.li@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2017-06-12 10:41:28 +01:00
Ajit Khaparde
daef48efe5 net/bnxt: support set MTU
This patch adds support to modify MTU using the set_mtu dev_op.
To support frames > 2k, the PMD creates an aggregator ring.
When a frame greater than 2k is received, it is fragmented
and the resulting fragments are DMA'ed to the aggregator ring.
Now the driver can support jumbo frames upto 9500 bytes.

Signed-off-by: Steeven Li <steeven.li@broadcom.com>
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2017-06-12 10:41:28 +01:00
Ajit Khaparde
e2652b0a20 net/bnxt: support get FW version
This patch adds support for fw_version_get dev_op

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2017-06-12 10:41:28 +01:00
Ajit Khaparde
d69851df12 net/bnxt: support multicast filter and set MAC addr
This patch adds support for set_mc_addr_list and
mac_addr_set dev_ops

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2017-06-12 10:41:28 +01:00
Ajit Khaparde
7fe5668d2e net/bnxt: support VLAN filter and strip
This patch adds VLAN strip and offload callbacks.
To add a VLAN filter:
    For each VNIC and each associated filter(s)
        if VLAN exists:
            if VLAN matches vlan_id
                VLAN filter already exists, just skip and continue
            else
                add a new MAC+VLAN filter
        else
            Remove the old MAC only filter
            Add a new MAC+VLAN filter

To remove a VLAN filter:
    For each VNIC and each associated filter(s)
        if VLAN exists && VLAN matches vlan_id
            remove the MAC+VLAN filter
            add a new MAC only filter
        else
            VLAN filter doesn't exist, just skip and continue

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2017-06-12 10:41:28 +01:00
Ajit Khaparde
bfb9c2260b net/bnxt: support xstats get/reset
This patch adds support to get and reset xstats dev_ops

dev_ops added:
xstats_get, xstats_get_name, xstats_reset

HWRM commands added:
hwrm_port_qstats, hwrm_port_clr_stats

Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
2017-06-12 10:41:28 +01:00