Commit Graph

61 Commits

Author SHA1 Message Date
Srujana Challa
3c3ea76cff net/cnxk: support CPT CTX write through microcode op
Adds support to write CPT CTX through microcode op(SET_CTX/WRITE_SA)
for cn10k inline mode.

Signed-off-by: Srujana Challa <schalla@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2021-11-03 16:05:47 +01:00
Olivier Matz
daa02b5cdd mbuf: add namespace to offload flags
Fix the mbuf offload flags namespace by adding an RTE_ prefix to the
name. The old flags remain usable, but a deprecation warning is issued
at compilation.

Signed-off-by: Olivier Matz <olivier.matz@6wind.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Somnath Kotur <somnath.kotur@broadcom.com>
2021-10-24 13:37:43 +02:00
Ferruh Yigit
295968d174 ethdev: add namespace
Add 'RTE_ETH' namespace to all enums & macros in a backward compatible
way. The macros for backward compatibility can be removed in next LTS.
Also updated some struct names to have 'rte_eth' prefix.

All internal components switched to using new names.

Syntax fixed on lines that this patch touches.

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Tyler Retzlaff <roretzla@linux.microsoft.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
Acked-by: Wisam Jaddo <wisamm@nvidia.com>
Acked-by: Rosen Xu <rosen.xu@intel.com>
Acked-by: Chenbo Xia <chenbo.xia@intel.com>
Acked-by: Hemant Agrawal <hemant.agrawal@nxp.com>
Acked-by: Somnath Kotur <somnath.kotur@broadcom.com>
2021-10-22 18:15:38 +02:00
Sunil Kumar Kori
6af19a9d89 net/cnxk: support meter action to flow destroy
Meters are configured per flow using rte_flow_create API.
Patch adds support for destroy operation for meter action
applied on the flow.

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Signed-off-by: Rakesh Kudurumalla <rkudurumalla@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2021-10-19 16:25:36 +02:00
Sunil Kumar Kori
58397fedc6 net/cnxk: support meter action to flow create
Meters are configured per flow using rte_flow_create API.
Implement support for meter action applied on the flow.

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Signed-off-by: Rakesh Kudurumalla <rkudurumalla@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2021-10-19 16:25:31 +02:00
Sunil Kumar Kori
d0ea0beb6a net/cnxk: support to create meter
Implement API to create meter instance for CNXK platform.

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Signed-off-by: Rakesh Kudurumalla <rkudurumalla@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2021-10-19 16:25:15 +02:00
Sunil Kumar Kori
ffee183e97 net/cnxk: support to create meter policy
Implement API to add meter policy for CNXK platform.

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Signed-off-by: Rakesh Kudurumalla <rkudurumalla@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2021-10-19 16:25:08 +02:00
Sunil Kumar Kori
a83db6b3c1 net/cnxk: support to create meter profile
Implement API to add meter profile for CNXK platform.

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Signed-off-by: Rakesh Kudurumalla <rkudurumalla@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2021-10-19 16:24:47 +02:00
Sunil Kumar Kori
a7c236b894 net/cnxk: support meter ops get
To enable support for ingress meter, supported operations
are exposed for CNXK platform.

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
Signed-off-by: Rakesh Kudurumalla <rkudurumalla@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2021-10-19 16:24:34 +02:00
Ferruh Yigit
b563c14212 ethdev: remove jumbo offload flag
Removing 'DEV_RX_OFFLOAD_JUMBO_FRAME' offload flag.

Instead of drivers announce this capability, application can deduct the
capability by checking reported 'dev_info.max_mtu' or
'dev_info.max_rx_pktlen'.

And instead of application setting this flag explicitly to enable jumbo
frames, this can be deduced by driver by comparing requested 'mtu' to
'RTE_ETHER_MTU'.

Removing this additional configuration for simplification.

Suggested-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Reviewed-by: Rosen Xu <rosen.xu@intel.com>
Acked-by: Somnath Kotur <somnath.kotur@broadcom.com>
Acked-by: Konstantin Ananyev <konstantin.ananyev@intel.com>
Acked-by: Huisong Li <lihuisong@huawei.com>
Acked-by: Hyong Youb Kim <hyonkim@cisco.com>
Acked-by: Michal Krawczyk <mk@semihalf.com>
2021-10-18 19:20:21 +02:00
Srujana Challa
2a6d9fa8bc net/cnxk: allow zero UDP6 checksum for non-inline device
Sets IP6_UDP_OPT in NIX RX config to allow optional
UDP checksum for IPv6 in case of security offload.
Also disable drop_re when inline inbound is enabled.

Signed-off-by: Srujana Challa <schalla@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2021-10-02 15:45:28 +02:00
Nithin Dabilpuram
c19f95b320 net/cnxk: support Rx security offload on cn9k
Add support to receive CPT processed packets on Rx for
CN9K.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2021-10-02 15:45:08 +02:00
Nithin Dabilpuram
7eabd6c637 net/cnxk: support inline security setup for cn9k
Add support for inline inbound and outbound IPSec for SA create,
destroy and other NIX / CPT LF configurations.

Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2021-10-02 15:45:02 +02:00
Andrew Rybchenko
8c9f976f05 ethdev: improve xstats names by IDs get prototype
Adjust parameters order to eth_xstats_get_by_id_t prototype.
Make ids the second parameter similar to eth_xstats_get_by_id_t.

Signed-off-by: Andrew Rybchenko <andrew.rybchenko@oktetlabs.ru>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
2021-10-06 13:07:11 +02:00
Satha Rao
bd7b62d7e0 net/cnxk: add TM capabilities and queue rate limit handlers
Initial version of TM implementation added basic infrastructure,
TM node_get, capabilities operations and rate limit queue operation.

Signed-off-by: Satha Rao <skoteshwar@marvell.com>
Acked-by: Nithin Dabilpuram <ndabilpuram@marvell.com>
2021-09-28 12:06:39 +02:00
Harman Kalra
2c809af8a8 net/cnxk: add callback to get link status
Adding a new callback for reading the link status. PF can read its
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>
2021-09-16 16:29:47 +02:00
Pavan Nikhilesh
072a281873 event/cnxk: support vectorized Rx adapter
Add event vector support for cnxk event Rx adapter, add control path
APIs to get vector limits and ability to configure event vectorization
on a given Rx queue.

Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com>
Acked-by: Jerin Jacob <jerinj@marvell.com>
2021-07-16 14:16:44 +02:00
Pavan Nikhilesh
7c6bee3406 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>
2021-06-30 04:55:34 +02:00
Satheesh Paul
2c8438ac11 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>
2021-06-30 03:44:03 +02:00
Sunil Kumar Kori
21cc840198 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>
2021-06-30 03:36:38 +02:00
Satha Rao
00242a687d 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>
2021-06-30 03:29:04 +02:00
Sunil Kumar Kori
3199a7f6a3 net/cnxk: support clock read
Patch implements read raw clock operation for cn9k and
cn10k.

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
2021-06-30 03:21:30 +02:00
Sunil Kumar Kori
677fb66bde 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>
2021-06-30 03:13:57 +02:00
Sunil Kumar Kori
77398b9e5c 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>
2021-06-30 03:06:25 +02:00
Sunil Kumar Kori
76dff63874 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>
2021-06-30 02:51:28 +02:00
Sunil Kumar Kori
c7c7c8ed7d 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>
2021-06-30 02:44:01 +02:00
Satha Rao
48a882afd8 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>
2021-06-30 02:29:15 +02:00
Satha Rao
86ac1c9cef net/cnxk: support firmware version query
Add callback to get ethdev firmware version.

Signed-off-by: Satha Rao <skoteshwar@marvell.com>
2021-06-30 02:21:50 +02:00
Satheesh Paul
d43a7bee1a 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>
2021-06-30 02:14:27 +02:00
Kiran Kumar K
8c009b4505 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>
2021-06-30 02:07:05 +02:00
Kiran Kumar K
4093c5a81d 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>
2021-06-30 01:59:41 +02:00
Sunil Kumar Kori
4be0b2b140 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>
2021-06-30 01:52:18 +02:00
Satha Rao
62dcd9343b net/cnxk: support queue infos query
Initial apis to get default queue information.

Signed-off-by: Satha Rao <skoteshwar@marvell.com>
2021-06-30 01:37:35 +02:00
Satha Rao
8075b057b6 net/cnxk: support extended statistics
Initial implementation of xstats operations.

Signed-off-by: Satha Rao <skoteshwar@marvell.com>
2021-06-30 01:30:10 +02:00
Satha Rao
2fced8a1c1 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>
2021-06-30 01:22:49 +02:00
Sunil Kumar Kori
79b175d705 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>
2021-06-30 01:15:27 +02:00
Sunil Kumar Kori
a7ce2f546f 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>
2021-06-30 01:08:04 +02:00
Sunil Kumar Kori
aa898299d3 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>
2021-06-30 01:00:41 +02:00
Sunil Kumar Kori
fef6ee0729 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>
2021-06-30 00:53:18 +02:00
Sunil Kumar Kori
d2bebb1fee net/cnxk: support flow control operations
Patch implements set and get operations for flow control.

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
2021-06-30 00:45:54 +02:00
Sunil Kumar Kori
611c771c35 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>
2021-06-30 00:38:32 +02:00
Sunil Kumar Kori
325d79c00a 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>
2021-06-30 00:31:11 +02:00
Sunil Kumar Kori
cbb8c8098c net/cnxk: support DMAC filter
DMAC filter support is added for cn9k and cn10k platforms.

Signed-off-by: Sunil Kumar Kori <skori@marvell.com>
2021-06-30 00:23:48 +02:00
Sunil Kumar Kori
9cc3f3417f 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>
2021-06-30 00:16:23 +02:00
Sunil Kumar Kori
8589ec212e 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>
2021-06-30 00:09:00 +02:00
Sunil Kumar Kori
5fe86db2a0 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>
2021-06-30 00:01:39 +02:00
Nithin Dabilpuram
89df2225c9 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>
2021-06-29 23:54:17 +02:00
Nithin Dabilpuram
7e95c11df4 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>
2021-06-29 22:55:31 +02:00
Jerin Jacob
39dc567c19 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>
2021-06-29 22:48:07 +02:00
Nithin Dabilpuram
aff70f48d8 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>
2021-06-29 22:33:17 +02:00