dpdk.git
3 years agonet/i40e: fix available RSS hash function
Steve Yang [Mon, 21 Jun 2021 08:03:42 +0000 (08:03 +0000)]
net/i40e: fix available RSS hash function

i40e can support following rss hash function types: default/toeplitz,
symmetric toeplitz, and simple_xor. However, when filter engine parses
pattern action, it only supports symmetric toeplitz & default.

Add simple_xor and toeplitz hash functions support when parsing pattern
action.

Fixes: ef4c16fd9148 ("net/i40e: refactor RSS flow")
Cc: stable@dpdk.org
Signed-off-by: Steve Yang <stevex.yang@intel.com>
Acked-by: Beilei Xing <beilei.xing@intel.com>
3 years agonet/ice: fix overflow in maximum packet length config
Tudor Cornea [Tue, 15 Jun 2021 10:38:34 +0000 (13:38 +0300)]
net/ice: fix overflow in maximum packet length config

The len variable, used in the computation of max_pkt_len could overflow,
if used to store the result of the following computation:

ICE_SUPPORT_CHAIN_NUM * rxq->rx_buf_len

Since, we could define the mbuf size to have a large value (i.e 13312),
and ICE_SUPPORT_CHAIN_NUM is defined as 5, the computation mentioned
above could potentially result in a value which might be bigger than
MAX_USHORT.

The result will be that Jumbo Frames will not work properly

Fixes: 1b009275e2c8 ("net/ice: add Rx queue init in DCF")
Cc: stable@dpdk.org
Signed-off-by: Tudor Cornea <tudor.cornea@keysight.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
3 years agonet/i40e: fix data path selection in secondary process
Dapeng Yu [Wed, 9 Jun 2021 07:05:08 +0000 (15:05 +0800)]
net/i40e: fix data path selection in secondary process

The flag use_avx2 and use_avx512 are defined as local variables, they
will not be aware by the secondary process, then wrong data path is
selected. Fix the issue by moving them into struct i40e_adapter.

Fixes: 6ada10deac66 ("net/i40e: remove devarg use-latest-supported-vec")
Fixes: e6a6a138919f ("net/i40e: add AVX512 vector path")
Cc: stable@dpdk.org
Signed-off-by: Dapeng Yu <dapengx.yu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
3 years agonet/iavf: support flow director for GRE tunnel packet
Wenjun Wu [Wed, 2 Jun 2021 02:24:42 +0000 (10:24 +0800)]
net/iavf: support flow director for GRE tunnel packet

Support AVF FDIR for inner header of GRE tunnel packet.

+------------------------------+---------------------------------------+
|           Pattern            |            Input Set                  |
+------------------------------+---------------------------------------+
| eth/ipv4/gre/ipv4            | inner: src/dst ip, dscp               |
| eth/ipv4/gre/ipv4/udp        | inner: src/dst ip, dscp, src/dst port |
| eth/ipv4/gre/ipv4/tcp        | inner: src/dst ip, dscp, src/dst port |
| eth/ipv4/gre/eh/ipv6         | inner: src/dst ip, tc                 |
| eth/ipv4/gre/eh/ipv6/udp     | inner: src/dst ip, tc, src/dst port   |
| eth/ipv4/gre/eh/ipv6/tcp     | inner: src/dst ip, tc, src/dst port   |
| eth/ipv6/gre/ipv4            | inner: src/dst ip, dscp               |
| eth/ipv6/gre/ipv4/udp        | inner: src/dst ip, dscp, src/dst port |
| eth/ipv6/gre/ipv4/tcp        | inner: src/dst ip, dscp, src/dst port |
| eth/ipv6/gre/ipv6            | inner: src/dst ip, tc                 |
| eth/ipv6/gre/ipv6/udp        | inner: src/dst ip, tc, src/dst port   |
| eth/ipv6/gre/ipv6/tcp        | inner: src/dst ip, tc, src/dst port   |
+------------------------------+---------------------------------------+

Signed-off-by: Wenjun Wu <wenjun1.wu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
3 years agonet/iavf: support RSS for GRE tunnel packet
Wenjun Wu [Wed, 2 Jun 2021 02:24:41 +0000 (10:24 +0800)]
net/iavf: support RSS for GRE tunnel packet

Support AVF RSS for inner header of GRE tunnel packet. It supports
RSS based on fields inner IP src + dst address and TCP/UDP src + dst
port.

Signed-off-by: Wenjun Wu <wenjun1.wu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
3 years agocommon/iavf: add GRE header type
Wenjun Wu [Wed, 2 Jun 2021 02:24:40 +0000 (10:24 +0800)]
common/iavf: add GRE header type

Add a virtchnl protocol header type to support AVF FDIR and RSS for GRE.

Signed-off-by: Wenjun Wu <wenjun1.wu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
3 years agonet/iavf: support flow pattern for GRE
Wenjun Wu [Wed, 2 Jun 2021 02:24:39 +0000 (10:24 +0800)]
net/iavf: support flow pattern for GRE

Add GRE pattern support for AVF FDIR and RSS.

Patterns are listed below:
  1. eth/ipv4/gre/ipv4
  2. eth/ipv4/gre/ipv6
  3. eth/ipv6/gre/ipv4
  4. eth/ipv6/gre/ipv6
  5. eth/ipv4/gre/ipv4/tcp
  6. eth/ipv4/gre/ipv6/tcp
  7. eth/ipv4/gre/ipv4/udp
  8. eth/ipv4/gre/ipv6/udp
  9. eth/ipv6/gre/ipv4/tcp
  10. eth/ipv6/gre/ipv6/tcp
  11. eth/ipv6/gre/ipv4/udp
  12. eth/ipv6/gre/ipv6/udp

Signed-off-by: Wenjun Wu <wenjun1.wu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
3 years agonet/ice: support ESP/NATT flow director to match outer IP
Simei Su [Wed, 9 Jun 2021 02:49:51 +0000 (10:49 +0800)]
net/ice: support ESP/NATT flow director to match outer IP

This patch adds IPV4/IPV6 SRC/DST input set for ESP/NAT_T_ESP to
support outer IP match.

Signed-off-by: Simei Su <simei.su@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
3 years agonet/ice/base: support ESP flow director to match outer IP
Simei Su [Wed, 9 Jun 2021 02:49:50 +0000 (10:49 +0800)]
net/ice/base: support ESP flow director to match outer IP

Enable FDIR ESP for matching outer IPV4/IPV6 SRC/DST field.

Signed-off-by: Simei Su <simei.su@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
3 years agonet/iavf: support ESP flow director to match outer IP
Simei Su [Wed, 9 Jun 2021 02:49:49 +0000 (10:49 +0800)]
net/iavf: support ESP flow director to match outer IP

This patch adds IPV4/IPV6 SRC/DST input set for ESP to support
outer IP match.

Signed-off-by: Simei Su <simei.su@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
3 years agonet/octeontx_ep: fix null pointer access
Thierry Herbelot [Mon, 24 May 2021 08:59:35 +0000 (10:59 +0200)]
net/octeontx_ep: fix null pointer access

mz is known to be NULL. Do not use it to print a memzone name.

Fixes: 242e18c056890 ("net/octeontx_ep: add Rx queue setup and release")
Cc: stable@dpdk.org
Signed-off-by: Thierry Herbelot <thierry.herbelot@6wind.com>
3 years agonet/cnxk: support multi-segment vector Tx
Pavan Nikhilesh [Tue, 29 Jun 2021 07:44:23 +0000 (13:14 +0530)]
net/cnxk: support multi-segment vector Tx

Add multi segment Tx vector routine.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
3 years agonet/cnxk: enable TSO processing in vector Tx
Pavan Nikhilesh [Tue, 29 Jun 2021 07:44:22 +0000 (13:14 +0530)]
net/cnxk: enable TSO processing in vector Tx

Enable TSO offload in vector Tx burst function.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
3 years agonet/cnxk: enable PTP processing in vector Tx
Pavan Nikhilesh [Tue, 29 Jun 2021 07:44:21 +0000 (13:14 +0530)]
net/cnxk: enable PTP processing in vector Tx

Enable PTP offload in vector Tx burst function. Since, we can
no-longer use a single LMT line for burst of 4, split the LMT
into two and transmit twice.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
3 years agonet/cnxk: enable VLAN processing in vector Tx
Pavan Nikhilesh [Tue, 29 Jun 2021 07:44:20 +0000 (13:14 +0530)]
net/cnxk: enable VLAN processing in vector Tx

Enable VLAN offload in vector Tx burst function.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
3 years agonet/cnxk: enable PTP processing in vector Rx
Pavan Nikhilesh [Tue, 29 Jun 2021 07:44:19 +0000 (13:14 +0530)]
net/cnxk: enable PTP processing in vector Rx

Enable PTP offload in vector Rx burst function, use vector path
for processing mbufs and finally switch to scalar when extracting
timestamp.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
3 years agonet/cnxk: support multi-segment vector Rx
Pavan Nikhilesh [Tue, 29 Jun 2021 07:44:18 +0000 (13:14 +0530)]
net/cnxk: support multi-segment vector Rx

Add multi-segment Rx vector routine, form the primary mbufs using
vector path switch to scalar path when extracting segments.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
3 years agonet/octeontx2: support link status
Harman Kalra [Tue, 22 Jun 2021 20:05:54 +0000 (01:35 +0530)]
net/octeontx2: support link status

Adding a new callback for reading the link status. PF can read it's
link status and can forward the same to VF once it comes up.

Signed-off-by: Harman Kalra <hkalra@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
3 years agocommon/octeontx2: send link event to VF
Harman Kalra [Tue, 22 Jun 2021 20:05:53 +0000 (01:35 +0530)]
common/octeontx2: send link event to VF

Currently link event is only sent to the PF by AF as soon as it comes
up, or in case of any physical change in link. PF will broadcast
these link events to all its VFs as soon as it receives it.
But no event is sent when a new VF comes up, hence it will not have
the link status.
Adding support for sending link status to the VF once it comes up
successfully.

Signed-off-by: Harman Kalra <hkalra@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
3 years agonet/octeontx2: use runtime LSO format indices
Nithin Dabilpuram [Fri, 18 Jun 2021 13:06:06 +0000 (18:36 +0530)]
net/octeontx2: use runtime LSO format indices

Currently LSO formats setup initially are expected to be
compile time constants and start from 0.

Change the logic in slow and fast path so that LSO format indexes
are only determined runtime.

Fixes: 3b635472a998 ("net/octeontx2: support TSO offload")
Cc: stable@dpdk.org
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
3 years agonet/octeontx2: fix flow creation limit on CN98xx
Satheesh Paul [Tue, 1 Jun 2021 10:25:51 +0000 (15:55 +0530)]
net/octeontx2: fix flow creation limit on CN98xx

CN96xx and CN98xx have 4096 and 16384 MCAM entries respectively.
Aligning the code with the same numbers.

Fixes: 092b3834185 ("net/octeontx2: add flow init and fini")
Cc: stable@dpdk.org
Signed-off-by: Satheesh Paul <psatheesh@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
3 years agonet/octeontx2: support fast free for inline IPsec
Tejasree Kondoj [Wed, 12 May 2021 10:11:43 +0000 (15:41 +0530)]
net/octeontx2: support fast free for inline IPsec

Add support for DEV_TX_OFFLOAD_MBUF_FAST_FREE for inline IPsec path

Signed-off-by: Tejasree Kondoj <ktejasree@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
3 years agonet/cnxk: support marking and VLAN tagging
Satheesh Paul [Wed, 23 Jun 2021 04:47:02 +0000 (10:17 +0530)]
net/cnxk: support marking and VLAN tagging

This patch adds support for mark, flag, VLAN pop and
push flow actions.

Signed-off-by: Satheesh Paul <psatheesh@marvell.com>
3 years agonet/cnxk: support multicast filter
Sunil Kumar Kori [Wed, 23 Jun 2021 04:47:01 +0000 (10:17 +0530)]
net/cnxk: support multicast filter

Patch adds multicast filter support for cn9k and cn10k platforms.

CGX DMAC filter table(32 entries) is divided among all LMACs
connected to it i.e. if CGX has 4 LMACs then each LMAC can have
up to 8 filters. If CGX has 1 LMAC then it can have up to 32
filters.

Above mentioned filter table is used to install unicast and multicast
DMAC address filters. Unicast filters are installed via
rte_eth_dev_mac_addr_add API while multicast filters are installed
via rte_eth_dev_set_mc_addr_list API.

So in total, supported MAC filters are equal to DMAC filters plus
mcast filters.

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
3 years agonet/cnxk: support RETA and RSS hash
Satha Rao [Wed, 23 Jun 2021 04:47:00 +0000 (10:17 +0530)]
net/cnxk: support RETA and RSS hash

This patch will implement RETA and RSS hash apis. Also added
device argument to lock rx context.

Signed-off-by: Satha Rao <skoteshwar@marvell.com>
3 years agonet/cnxk: support clock read
Sunil Kumar Kori [Wed, 23 Jun 2021 04:46:59 +0000 (10:16 +0530)]
net/cnxk: support clock read

Patch implements read raw clock operation for cn9k and
cn10k.

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
3 years agonet/cnxk: support time read/write/adjust
Sunil Kumar Kori [Wed, 23 Jun 2021 04:46:58 +0000 (10:16 +0530)]
net/cnxk: support time read/write/adjust

Patch implements read/write/adjust time operations for
cn9k and cn10k platforms.

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
3 years agonet/cnxk: support Rx/Tx timestamp read
Sunil Kumar Kori [Wed, 23 Jun 2021 04:46:57 +0000 (10:16 +0530)]
net/cnxk: support Rx/Tx timestamp read

Patch implements Rx/Tx timestamp read operations for cn9k
and cn10k platforms.

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
3 years agonet/cnxk: support timesync operations
Sunil Kumar Kori [Wed, 23 Jun 2021 04:46:56 +0000 (10:16 +0530)]
net/cnxk: support timesync operations

Patch implements timesync enable/disable operations for
cn9k and cn10k platforms.

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
3 years agonet/cnxk: support base PTP timesync
Sunil Kumar Kori [Wed, 23 Jun 2021 04:46:55 +0000 (10:16 +0530)]
net/cnxk: support base PTP timesync

Base PTP timesync support is added for cn9k and cn10k platforms.

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
3 years agonet/cnxk: get PTP status
Sunil Kumar Kori [Wed, 23 Jun 2021 04:46:54 +0000 (10:16 +0530)]
net/cnxk: get PTP status

Once PTP status is changed at H/W i.e. enable/disable then
it is propagated to user via registered callback.

So corresponding callback is registered to get PTP status.

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
3 years agonet/cnxk: support flow RSS
Satheesh Paul [Wed, 23 Jun 2021 04:46:53 +0000 (10:16 +0530)]
net/cnxk: support flow RSS

Added support for RSS action in rte flow code based on ROC.

Signed-off-by: Satheesh Paul <psatheesh@marvell.com>
3 years agonet/cnxk: support registers dump
Satha Rao [Wed, 23 Jun 2021 04:46:52 +0000 (10:16 +0530)]
net/cnxk: support registers dump

With this patch implemented api to dump platform registers for
debug purposes.

Signed-off-by: Satha Rao <skoteshwar@marvell.com>
3 years agonet/cnxk: support firmware version query
Satha Rao [Wed, 23 Jun 2021 04:46:51 +0000 (10:16 +0530)]
net/cnxk: support firmware version query

Add callback to get ethdev firmware version.

Signed-off-by: Satha Rao <skoteshwar@marvell.com>
3 years agonet/cnxk: get flow operations
Satheesh Paul [Wed, 23 Jun 2021 04:46:50 +0000 (10:16 +0530)]
net/cnxk: get flow operations

This patch adds flow ops get operation to enable rte_flow_ops.A

This patch also add support for flow dev dump API.
Every flow rule added will be dumped in the below format.

MCAM Index:1881
Interface :NIX-RX (0)
Priority  :1
NPC RX Action:0X00000000404001
ActionOp:NIX_RX_ACTIONOP_UCAST (1)
PF_FUNC: 0X400
RQ Index:0X004
Match Id:0000
Flow Key Alg:0
NPC RX VTAG Action:0X00000000008100
VTAG0:relptr:0
lid:0X1
type:0
Patterns:
NPC_PARSE_NIBBLE_CHAN:000
NPC_PARSE_NIBBLE_LA_LTYPE:LA_ETHER
NPC_PARSE_NIBBLE_LB_LTYPE:NONE
NPC_PARSE_NIBBLE_LC_LTYPE:LC_IP
NPC_PARSE_NIBBLE_LD_LTYPE:LD_TCP
NPC_PARSE_NIBBLE_LE_LTYPE:NONE
LA_ETHER, hdr offset:0, len:0X6, key offset:0X8,\
Data:0X4AE124FC7FFF, Mask:0XFFFFFFFFFFFF
LA_ETHER, hdr offset:0XC, len:0X2, key offset:0X4, Data:0XCA5A,\
Mask:0XFFFF
LC_IP, hdr offset:0XC, len:0X8, key offset:0X10,\
Data:0X0A01010300000000, Mask:0XFFFFFFFF00000000
LD_TCP, hdr offset:0, len:0X4, key offset:0X18, Data:0X03450000,\
Mask:0XFFFF0000
MCAM Raw Data :
DW0     :0000CA5A01202000
DW0_Mask:0000FFFF0FF0F000
DW1     :00004AE124FC7FFF
DW1_Mask:0000FFFFFFFFFFFF
DW2     :0A01010300000000
DW2_Mask:FFFFFFFF00000000
DW3     :0000000003450000
DW3_Mask:00000000FFFF0000
DW4     :0000000000000000
DW4_Mask:0000000000000000
DW5     :0000000000000000
DW5_Mask:0000000000000000
DW6     :0000000000000000
DW6_Mask:0000000000000000

Signed-off-by: Satheesh Paul <psatheesh@marvell.com>
Reviewed-by: Kiran Kumar K <kirankumark@marvell.com>
3 years agonet/cnxk: support flow API
Kiran Kumar K [Wed, 23 Jun 2021 04:46:49 +0000 (10:16 +0530)]
net/cnxk: support flow API

Adding initial version of rte_flow support for cnxk family device.
Supported rte_flow ops are flow_validate, flow_create, flow_destroy,
flow_flush, flow_query, flow_isolate.

Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
3 years agonet/cnxk: add NPC configuration
Kiran Kumar K [Wed, 23 Jun 2021 04:46:48 +0000 (10:16 +0530)]
net/cnxk: add NPC configuration

Adding support to configure NPC on device initialization. This involves
reading the MKEX and initializing the necessary data.

Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
3 years agonet/cnxk: support pending Tx mbuf cleanup
Sunil Kumar Kori [Wed, 23 Jun 2021 04:46:47 +0000 (10:16 +0530)]
net/cnxk: support pending Tx mbuf cleanup

Once mbufs are transmitted, mbufs are freed by H/W. No mbufs are
accumalated as a pending mbuf.
Hence operation is NOP for cnxk platform.

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
3 years agonet/cnxk: support close and reset
Sunil Kumar Kori [Wed, 23 Jun 2021 04:46:46 +0000 (10:16 +0530)]
net/cnxk: support close and reset

Patch implements device close and reset operations for cn9k
and cn10k platforms.

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
3 years agonet/cnxk: support queue infos query
Satha Rao [Wed, 23 Jun 2021 04:46:45 +0000 (10:16 +0530)]
net/cnxk: support queue infos query

Initial apis to get default queue information.

Signed-off-by: Satha Rao <skoteshwar@marvell.com>
3 years agonet/cnxk: support extended statistics
Satha Rao [Wed, 23 Jun 2021 04:46:44 +0000 (10:16 +0530)]
net/cnxk: support extended statistics

Initial implementation of xstats operations.

Signed-off-by: Satha Rao <skoteshwar@marvell.com>
3 years agonet/cnxk: support basic port/queue statistics
Satha Rao [Wed, 23 Jun 2021 04:46:43 +0000 (10:16 +0530)]
net/cnxk: support basic port/queue statistics

This patch implements regular port statistics and queue mapping set
api to get queue statistics

Signed-off-by: Satha Rao <skoteshwar@marvell.com>
3 years agonet/cnxk: support mempool operations query
Sunil Kumar Kori [Wed, 23 Jun 2021 04:46:42 +0000 (10:16 +0530)]
net/cnxk: support mempool operations query

CN9K and CN10K support platform specific mempool ops.
This patch implements API to validate whether given mempool
ops is supported or not.

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
3 years agonet/cnxk: support Rx interrupt
Sunil Kumar Kori [Wed, 23 Jun 2021 04:46:41 +0000 (10:16 +0530)]
net/cnxk: support Rx interrupt

Application may choose to enable/disable interrupts on Rx queues
so that application can select its processing if no packets are
available on queues for a longer period.

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
3 years agonet/cnxk: support EEPROM module queries
Sunil Kumar Kori [Wed, 23 Jun 2021 04:46:40 +0000 (10:16 +0530)]
net/cnxk: support EEPROM module queries

Patch implements eeprom module info get ethops for cn9k and
cn10k platforms.

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
3 years agonet/cnxk: support link up/down operations
Sunil Kumar Kori [Wed, 23 Jun 2021 04:46:39 +0000 (10:16 +0530)]
net/cnxk: support link up/down operations

Patch implements link up/down ethdev operations for
cn9k and cn10k platform.

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
3 years agonet/cnxk: support flow control operations
Sunil Kumar Kori [Wed, 23 Jun 2021 04:46:38 +0000 (10:16 +0530)]
net/cnxk: support flow control operations

Patch implements set and get operations for flow control.

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
3 years agonet/cnxk: support Rx/Tx burst mode query
Sunil Kumar Kori [Wed, 23 Jun 2021 04:46:37 +0000 (10:16 +0530)]
net/cnxk: support Rx/Tx burst mode query

Patch implements ethdev operations to get Rx and Tx burst
mode.

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
3 years agonet/cnxk: support all multicast
Sunil Kumar Kori [Wed, 23 Jun 2021 04:46:36 +0000 (10:16 +0530)]
net/cnxk: support all multicast

L2 multicast packets can be allowed or blocked. Patch implements
corresponding ethops.

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
3 years agonet/cnxk: support DMAC filter
Sunil Kumar Kori [Wed, 23 Jun 2021 04:46:35 +0000 (10:16 +0530)]
net/cnxk: support DMAC filter

DMAC filter support is added for cn9k and cn10k platforms.

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
3 years agonet/cnxk: support promiscuous mode
Sunil Kumar Kori [Wed, 23 Jun 2021 04:46:34 +0000 (10:16 +0530)]
net/cnxk: support promiscuous mode

Add device operations to enable and disable promisc mode
for cn9k and cn10k.

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
3 years agonet/cnxk: support MTU set
Sunil Kumar Kori [Wed, 23 Jun 2021 04:46:33 +0000 (10:16 +0530)]
net/cnxk: support MTU set

This Patch implements mtu set dev op for cn9k and cn10k platforms.

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
3 years agonet/cnxk: support MAC address set
Sunil Kumar Kori [Wed, 23 Jun 2021 04:46:32 +0000 (10:16 +0530)]
net/cnxk: support MAC address set

Default mac address set operation is implemented for
cn9k and cn10k platforms.

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
3 years agonet/cnxk: add device start and stop
Nithin Dabilpuram [Wed, 23 Jun 2021 04:46:31 +0000 (10:16 +0530)]
net/cnxk: add device start and stop

Add device start and stop operation callbacks for
CN9K and CN10K. Device stop is common for both platforms
while device start as some platform dependent portion where
the platform specific offload flags are recomputed and
the right Rx/Tx burst function is chosen.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
3 years agonet/cnxk: add vector Tx for CN10K
Nithin Dabilpuram [Wed, 23 Jun 2021 04:46:30 +0000 (10:16 +0530)]
net/cnxk: add vector Tx for CN10K

Add Tx burst vector version for CN10K.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
3 years agonet/cnxk: add multi-segment Tx for CN10K
Nithin Dabilpuram [Wed, 23 Jun 2021 04:46:29 +0000 (10:16 +0530)]
net/cnxk: add multi-segment Tx for CN10K

Add Tx burst multi-segment version for CN10K.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
3 years agonet/cnxk: add Tx burst for CN10K
Jerin Jacob [Wed, 23 Jun 2021 04:46:28 +0000 (10:16 +0530)]
net/cnxk: add Tx burst for CN10K

Add Tx burst scalar version for CN10K.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Signed-off-by: Harman Kalra <hkalra@marvell.com>
3 years agonet/cnxk: add vector Rx for CN10K
Jerin Jacob [Wed, 23 Jun 2021 04:46:27 +0000 (10:16 +0530)]
net/cnxk: add vector Rx for CN10K

Add Rx burst vector version for CN10K.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
3 years agonet/cnxk: add multi-segment Rx for CN10K
Nithin Dabilpuram [Wed, 23 Jun 2021 04:46:26 +0000 (10:16 +0530)]
net/cnxk: add multi-segment Rx for CN10K

Add Rx burst multi-segment version for CN10K.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
3 years agonet/cnxk: add Rx burst for CN10K
Jerin Jacob [Wed, 23 Jun 2021 04:46:25 +0000 (10:16 +0530)]
net/cnxk: add Rx burst for CN10K

Add Rx burst support for CN10K SoC.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Signed-off-by: Harman Kalra <hkalra@marvell.com>
3 years agonet/cnxk: add vector Tx for CN9K
Nithin Dabilpuram [Wed, 23 Jun 2021 04:46:24 +0000 (10:16 +0530)]
net/cnxk: add vector Tx for CN9K

Add Tx burst vector version for CN9K.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
3 years agonet/cnxk: add multi-segment Tx for CN9K
Nithin Dabilpuram [Wed, 23 Jun 2021 04:46:23 +0000 (10:16 +0530)]
net/cnxk: add multi-segment Tx for CN9K

Add Tx burst multi-segment version for CN9K.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
3 years agonet/cnxk: add Tx burst for CN9K
Jerin Jacob [Wed, 23 Jun 2021 04:46:22 +0000 (10:16 +0530)]
net/cnxk: add Tx burst for CN9K

Add Tx burst scalar version for CN9K.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Signed-off-by: Harman Kalra <hkalra@marvell.com>
3 years agonet/cnxk: add vector Rx for CN9K
Jerin Jacob [Wed, 23 Jun 2021 04:46:21 +0000 (10:16 +0530)]
net/cnxk: add vector Rx for CN9K

Add Rx burst vector version for CN9K.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
3 years agonet/cnxk: add multi-segment Rx for CN9K
Nithin Dabilpuram [Wed, 23 Jun 2021 04:46:20 +0000 (10:16 +0530)]
net/cnxk: add multi-segment Rx for CN9K

Add Rx burst multi-segmented version for CN9K.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
3 years agonet/cnxk: add Rx burst for CN9K
Jerin Jacob [Wed, 23 Jun 2021 04:46:19 +0000 (10:16 +0530)]
net/cnxk: add Rx burst for CN9K

Add Rx burst scalar version for CN9K.

Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Reviewed-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
3 years agonet/cnxk: support queue start and stop
Nithin Dabilpuram [Wed, 23 Jun 2021 04:46:18 +0000 (10:16 +0530)]
net/cnxk: support queue start and stop

Add Rx/Tx queue start and stop callbacks for
CN9K and CN10K.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
3 years agonet/cnxk: support packet type
Nithin Dabilpuram [Wed, 23 Jun 2021 04:46:17 +0000 (10:16 +0530)]
net/cnxk: support packet type

Add support for packet type lookup on Rx to translate HW
specific types to  RTE_PTYPE_* defines

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
3 years agonet/cnxk: add Tx queue setup and release
Nithin Dabilpuram [Wed, 23 Jun 2021 04:46:16 +0000 (10:16 +0530)]
net/cnxk: add Tx queue setup and release

aDD tx queue setup and release for CN9K and CN10K.
Release is common while setup is platform dependent due
to differences in fast path Tx queue structures.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
3 years agonet/cnxk: add Rx queue setup and release
Nithin Dabilpuram [Wed, 23 Jun 2021 04:46:15 +0000 (10:16 +0530)]
net/cnxk: add Rx queue setup and release

Add Rx queue setup and release op for CN9K and CN10K
SoC. Release is completely common while setup is platform
dependent due to fast path Rx queue structure variation.
Fastpath is platform dependent partly due to core cacheline
size difference.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
3 years agonet/cnxk: support link status update
Nithin Dabilpuram [Wed, 23 Jun 2021 04:46:14 +0000 (10:16 +0530)]
net/cnxk: support link status update

Add link status update callback to get current
link status.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
3 years agonet/cnxk: add device configuration operation
Nithin Dabilpuram [Wed, 23 Jun 2021 04:46:13 +0000 (10:16 +0530)]
net/cnxk: add device configuration operation

Add device configuration op for CN9K and CN10K. Most of the
device configuration is common between two platforms except for
some supported offloads.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
3 years agonet/cnxk: support device infos query
Nithin Dabilpuram [Wed, 23 Jun 2021 04:46:12 +0000 (10:16 +0530)]
net/cnxk: support device infos query

Add support to retrieve dev infos get for CN9K and CN10K.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
3 years agonet/cnxk: add common devargs parsing
Nithin Dabilpuram [Wed, 23 Jun 2021 04:46:11 +0000 (10:16 +0530)]
net/cnxk: add common devargs parsing

Add various devargs parsing command line arguments
parsing functions supported by CN9K and CN10K.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
3 years agonet/cnxk: add platform specific probe and remove
Nithin Dabilpuram [Wed, 23 Jun 2021 04:46:10 +0000 (10:16 +0530)]
net/cnxk: add platform specific probe and remove

Add platform specific probe and remove callbacks for CN9K
and CN10K which use common probe and remove functions.
Register ethdev driver for CN9K and CN10K.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
3 years agonet/cnxk: add build infra and common probing
Nithin Dabilpuram [Wed, 23 Jun 2021 04:46:09 +0000 (10:16 +0530)]
net/cnxk: add build infra and common probing

Add build infrastructure and common probe and remove for cnxk driver
which is used by both CN10K and CN9K SoC.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
3 years agocommon/cnxk: support VLAN push/pop flow actions
Satheesh Paul [Wed, 23 Jun 2021 04:46:08 +0000 (10:16 +0530)]
common/cnxk: support VLAN push/pop flow actions

Add roc API to configure VLAN tag addition and removal.

This patch also adds 98xx support for increased MCAM
entries for rte flow.

Signed-off-by: Satheesh Paul <psatheesh@marvell.com>
Reviewed-by: Kiran Kumar K <kirankumark@marvell.com>
3 years agocommon/cnxk: remove camel case from model API
Nithin Dabilpuram [Wed, 23 Jun 2021 04:46:07 +0000 (10:16 +0530)]
common/cnxk: remove camel case from model API

Change model check API's to not use Camel case in function
names.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
3 years agocommon/cnxk: add provision to enable RED on RQ
Satha Rao [Wed, 23 Jun 2021 04:46:06 +0000 (10:16 +0530)]
common/cnxk: add provision to enable RED on RQ

Send RED pass/drop levels based on rq configurations to kernel.
Fixed the aura and pool shift value calculation.

Signed-off-by: Satha Rao <skoteshwar@marvell.com>
3 years agocommon/cnxk: allocate LMT region in userspace
Harman Kalra [Wed, 23 Jun 2021 04:46:05 +0000 (10:16 +0530)]
common/cnxk: allocate LMT region in userspace

As per the new LMTST design, userspace shall allocate LMT region,
setup the DMA translation and share the IOVA with kernel via MBOX.
Kernel will convert this IOVA to physical memory and update the
LMT table entry with the same.
With this new design also shared mode (i.e. all pci funcs sharing
the LMT region allocated by primary/base pci func) is intact.

Signed-off-by: Harman Kalra <hkalra@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
3 years agocommon/cnxk: support flow action mark and flag
Satheesh Paul [Wed, 23 Jun 2021 04:46:04 +0000 (10:16 +0530)]
common/cnxk: support flow action mark and flag

Add roc API to get mark action.

Signed-off-by: Satheesh Paul <psatheesh@marvell.com>
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
3 years agocommon/cnxk: support flow entry dump
Satheesh Paul [Wed, 23 Jun 2021 04:46:03 +0000 (10:16 +0530)]
common/cnxk: support flow entry dump

Add NPC support API to dump created flow entries.

Signed-off-by: Satheesh Paul <psatheesh@marvell.com>
Signed-off-by: Kiran Kumar K <kirankumark@marvell.com>
3 years agocommon/cnxk: fix batch alloc completion poll logic
Jerin Jacob [Wed, 23 Jun 2021 04:46:02 +0000 (10:16 +0530)]
common/cnxk: fix batch alloc completion poll logic

The instruction generation was not correct due to
fact that volatile suppose to use with ccode variable
as well.

Change the logic to use gcc atomic builtin to
simplify and avoid explicit volatile from the code.

Fixes: 81af26789316 ("common/cnxk: support NPA batch alloc/free")
Cc: stable@dpdk.org
Signed-off-by: Jerin Jacob <jerinj@marvell.com>
Signed-off-by: Ashwin Sekhar T K <asekhar@marvell.com>
3 years agocommon/cnxk: support locking NIX RQ contexts
Satha Rao [Wed, 23 Jun 2021 04:46:01 +0000 (10:16 +0530)]
common/cnxk: support locking NIX RQ contexts

This patch will consider device argument to lock RSS table
in NIX.

This patch also adds few misc fixes such as disabling NIX Tx
vlan insertion conf in SMQ, enabling SSO in NIX Tx SQ
for Tx completions and TM related stats API.

Signed-off-by: Satha Rao <skoteshwar@marvell.com>
3 years agotest/mbuf: fix virtual address conversion
Olivier Matz [Mon, 5 Jul 2021 07:27:34 +0000 (09:27 +0200)]
test/mbuf: fix virtual address conversion

Seen with address sanitizer.

rte_mempool_virt2iova() can only be used on mempool elements. In this case,
it is incorrect, and rte_mem_virt2iova() has to be used.

Bugzilla ID: 737
Fixes: 7b295dceea07 ("test/mbuf: add unit test cases")
Cc: stable@dpdk.org
Reported-by: Zhihong Peng <zhihongx.peng@intel.com>
Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Reviewed-by: David Marchand <david.marchand@redhat.com>
3 years agotest: remove hack for private header inclusion
David Marchand [Thu, 24 Jun 2021 11:53:19 +0000 (13:53 +0200)]
test: remove hack for private header inclusion

This hack was needed with the make build system.
With meson, any private header from a library is visible as long as a
dependency to this library is expressed.

Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Bruce Richardson <bruce.richardson@intel.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
3 years agobus/pci: fix leak for unbound devices
David Marchand [Wed, 16 Jun 2021 06:52:57 +0000 (08:52 +0200)]
bus/pci: fix leak for unbound devices

For devices not bound to any Linux kernel module, we leak a pci object
since it is never added to the PCI bus device list.

Fixes: c79a1c67465d ("bus/pci: optimize bus scan")
Cc: stable@dpdk.org
Reported-by: Owen Hilyard <ohilyard@iol.unh.edu>
Signed-off-by: David Marchand <david.marchand@redhat.com>
3 years agobus/pci: update files description
Thomas Monjalon [Sun, 2 May 2021 20:15:52 +0000 (22:15 +0200)]
bus/pci: update files description

Some files were starting with some outdated introductions.

Signed-off-by: Thomas Monjalon <thomas@monjalon.net>
Reviewed-by: David Marchand <david.marchand@redhat.com>
3 years agoraw/cnxk_bphy: support BPHY self test
Tomasz Duszynski [Mon, 21 Jun 2021 15:04:49 +0000 (17:04 +0200)]
raw/cnxk_bphy: support BPHY self test

Add support for performing selftest.

Signed-off-by: Jakub Palider <jpalider@marvell.com>
Signed-off-by: Tomasz Duszynski <tduszynski@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
3 years agoraw/cnxk_bphy: support registering BPHY IRQ handlers
Tomasz Duszynski [Mon, 21 Jun 2021 15:04:48 +0000 (17:04 +0200)]
raw/cnxk_bphy: support registering BPHY IRQ handlers

Custom IRQ handlers may be registered/removed on demand.
Since registration and removal are related they are in the
same patch.

Signed-off-by: Jakub Palider <jpalider@marvell.com>
Signed-off-by: Tomasz Duszynski <tduszynski@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
3 years agoraw/cnxk_bphy: support retrieving BPHY device memory
Tomasz Duszynski [Mon, 21 Jun 2021 15:04:47 +0000 (17:04 +0200)]
raw/cnxk_bphy: support retrieving BPHY device memory

Allow user to retrieve baseband phy memory resources.

Signed-off-by: Jakub Palider <jpalider@marvell.com>
Signed-off-by: Tomasz Duszynski <tduszynski@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
3 years agoraw/cnxk_bphy: support reading number of BPHY IRQs
Tomasz Duszynski [Mon, 21 Jun 2021 15:04:46 +0000 (17:04 +0200)]
raw/cnxk_bphy: support reading number of BPHY IRQs

Add support for retrieving maximum number of interrupts.

Signed-off-by: Jakub Palider <jpalider@marvell.com>
Signed-off-by: Tomasz Duszynski <tduszynski@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
3 years agoraw/cnxk_bphy: support interrupt init and cleanup
Tomasz Duszynski [Mon, 21 Jun 2021 15:04:45 +0000 (17:04 +0200)]
raw/cnxk_bphy: support interrupt init and cleanup

Add support for interrupt initialization and cleanup. Internally
interrupt initialization performs low level setup that allows
custom interrupt handler registration later on.

Interrupt initialization and cleanup are related hence they
are in the same patch.

Signed-off-by: Jakub Palider <jpalider@marvell.com>
Signed-off-by: Tomasz Duszynski <tduszynski@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
3 years agoraw/cnxk_bphy: support BPHY dequeue operation
Tomasz Duszynski [Mon, 21 Jun 2021 15:04:44 +0000 (17:04 +0200)]
raw/cnxk_bphy: support BPHY dequeue operation

Add support for dequeueing responses to previously
enqueued messages.

Signed-off-by: Jakub Palider <jpalider@marvell.com>
Signed-off-by: Tomasz Duszynski <tduszynski@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
3 years agoraw/cnxk_bphy: support BPHY enqueue operation
Tomasz Duszynski [Mon, 21 Jun 2021 15:04:43 +0000 (17:04 +0200)]
raw/cnxk_bphy: support BPHY enqueue operation

Add preliminary support for enqueue operation.

Signed-off-by: Jakub Palider <jpalider@marvell.com>
Signed-off-by: Tomasz Duszynski <tduszynski@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
3 years agoraw/cnxk_bphy: support reading BPHY queue count
Tomasz Duszynski [Mon, 21 Jun 2021 15:04:42 +0000 (17:04 +0200)]
raw/cnxk_bphy: support reading BPHY queue count

Add support for reading number of available queues from baseband
phy. Currently only single queue is supported.

Signed-off-by: Jakub Palider <jpalider@marvell.com>
Signed-off-by: Tomasz Duszynski <tduszynski@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
3 years agoraw/cnxk_bphy: support reading BPHY queue configuration
Tomasz Duszynski [Mon, 21 Jun 2021 15:04:41 +0000 (17:04 +0200)]
raw/cnxk_bphy: support reading BPHY queue configuration

Add support for reading baseband phy queue configuration.

Signed-off-by: Jakub Palider <jpalider@marvell.com>
Signed-off-by: Tomasz Duszynski <tduszynski@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
3 years agoraw/cnxk_bphy: add baseband PHY skeleton driver
Tomasz Duszynski [Mon, 21 Jun 2021 15:04:40 +0000 (17:04 +0200)]
raw/cnxk_bphy: add baseband PHY skeleton driver

Add baseband phy skeleton driver. Baseband phy is a hardware subsystem
accelerating 5G/LTE related tasks. Note this driver isn't involved into
any sort baseband protocol processing. Instead it just provides means
for configuring hardware.

Signed-off-by: Jakub Palider <jpalider@marvell.com>
Signed-off-by: Tomasz Duszynski <tduszynski@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
3 years agocommon/cnxk: register BPHY IRQ
Tomasz Duszynski [Mon, 21 Jun 2021 15:04:39 +0000 (17:04 +0200)]
common/cnxk: register BPHY IRQ

Add support for registering user supplied baseband PHY IRQ handler.

Signed-off-by: Jakub Palider <jpalider@marvell.com>
Signed-off-by: Tomasz Duszynski <tduszynski@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>
3 years agocommon/cnxk: clear BPHY IRQ handler
Tomasz Duszynski [Mon, 21 Jun 2021 15:04:38 +0000 (17:04 +0200)]
common/cnxk: clear BPHY IRQ handler

Add support for clearing previously register baseband PHY IRQ handler.

Signed-off-by: Jakub Palider <jpalider@marvell.com>
Signed-off-by: Tomasz Duszynski <tduszynski@marvell.com>
Reviewed-by: Jerin Jacob <jerinj@marvell.com>