Wenjun Wu [Wed, 7 Jul 2021 06:18:53 +0000 (14:18 +0800)]
net/iavf: simplify flow director rules for IP fragment
This patch simplify the pattern of flow rules of FDIR for IP fragment.
Flow rule can be created by the following command:
1. flow create 0 ingress pattern eth /
ipv4 fragment_offset spec 0x2000 fragment_offset mask 0x2000 /
end <actions>
2. flow create 0 ingress pattern eth / ipv6 /
ipv6_frag_ext fragment_offset spec 0x0001 fragment_offset mask 0x0001 /
end <actions>
Signed-off-by: Wenjun Wu <wenjun1.wu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
Wenjun Wu [Wed, 7 Jul 2021 06:18:13 +0000 (14:18 +0800)]
net/ice: simplify flow director rules for IP fragment
This patch simplify the pattern of flow rules of FDIR for IP fragment.
Flow rule can be created by the following command:
1. flow create 0 ingress pattern eth /
ipv4 fragment_offset spec 0x2000 fragment_offset mask 0x2000 /
end <actions>
2. flow create 0 ingress pattern eth / ipv6 /
ipv6_frag_ext fragment_offset spec 0x0001 fragment_offset mask 0x0001 /
end <actions>
Signed-off-by: Wenjun Wu <wenjun1.wu@intel.com>
Acked-by: Qi Zhang <qi.z.zhang@intel.com>
David Marchand [Tue, 6 Jul 2021 14:12:37 +0000 (16:12 +0200)]
net/ice: fix memzone leak when firmware is missing
Caught by our QE.
When the firmware is missing, memzones were not released.
$ dpdk-testpmd -c 0x1f -a 0:0:0.0 -- -i
...
testpmd> dump_memzone
...
Zone 6: name:<RTE_METRICS>, len:0x15040, virt:0x1661b24c0, socket_id:0,
flags:0
physical segments used:
addr: 0x140000000 iova: 0x140000000 len: 0x40000000 pagesz: 0x40000000
testpmd> port attach 0000:5e:00.0
Attaching a new port...
EAL: Using IOMMU type 1 (Type 1)
EAL: Probe PCI driver: net_ice (8086:159b) device: 0000:5e:00.0 (socket 0)
ice_load_pkg(): failed to open file: /lib/firmware/intel/ice/ddp/ice.pkg
ice_dev_init(): Failed to load the DDP package,Use safe-mode-support=1 to
enter Safe Mode
EAL: Releasing PCI mapped resource for 0000:5e:00.0
EAL: Calling pci_unmap_resource for 0000:5e:00.0 at 0x2200000000
EAL: Calling pci_unmap_resource for 0000:5e:00.0 at 0x2202000000
EAL: Driver cannot attach the device (0000:5e:00.0)
EAL: Failed to attach device on primary process
testpmd: Failed to attach port 0000:5e:00.0
testpmd> dump_memzone
...
Zone 139: name:<ice_dma_17168374657430093156>, len:0x1000,
virt:0x1660ed800, socket_id:0, flags:0 physical segments used:
addr: 0x140000000 iova: 0x140000000 len: 0x40000000 pagesz: 0x40000000
With 20 tries attaching a net/ice port, we would end up with:
EAL: Probe PCI driver: net_ice (8086:159b) device: 0000:5e:00.0 (socket 0)
EAL: memzone_reserve_aligned_thread_unsafe(): Number of requested memzone
segments exceeds RTE_MAX_MEMZONE
ice_dev_init(): Failed to initialize HW
Fixes:
a4c8c48fe3f4 ("net/ice: load OS default package")
Cc: stable@dpdk.org
Signed-off-by: David Marchand <david.marchand@redhat.com>
Acked-by: Haiyue Wang <haiyue.wang@intel.com>
Viacheslav Ovsiienko [Wed, 7 Jul 2021 15:54:28 +0000 (18:54 +0300)]
common/mlx5: fix compatibility with OFED port query API
The compilation flag HAVE_MLX5DV_DR_DEVX_PORT depends on presence
of mlx5dv_query_devx_port routine in rdma-core library.
The mlx5dv_query_devx_port routine exists only in OFED versions
of rdma-core library and is being planned to be removed and replaced
with Upstream compatible mlx5dv_query_port.
As mlx5dv_query_devx_port is being removed all the dependencies on
the HAVE_MLX5DV_DR_DEVX_PORT compilation flag are reconsidered.
The new compilation flag HAVE_MLX5DV_DR_CREATE_DEST_IB_PORT is for
backward compatibility with older OFED versions.
Fixes:
6cfe84fbe7b1 ("net/mlx5: fix port action for LAG")
Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Viacheslav Ovsiienko [Wed, 7 Jul 2021 15:54:27 +0000 (18:54 +0300)]
common/mlx5: use new port query API if available
In order to get E-Switch vport identifiers the mlx5 PMD relies
on two approaches:
[a] use port query API if it is provided by rdma-core library
[b] otherwise, deduce vport ids from the related VF index
The latter is not reliable and may not work with newer kernel
drivers and in some configurations (LAG), causing E-Switch
malfunction. Hence, engaging the port query API is highly
desirable.
Depending on rdma-core version the port query API is:
- very old OFED versions have no query API (approach [b])
- rdma-core OFED < 5.5 provides mlx5dv_query_devx_port,
HAVE_MLX5DV_DR_DEVX_PORT flag is defined (approach [a])
- rdma-core OFED >= 5.5 has mlx5dv_query_port, flag
HAVE_MLX5DV_DR_DEVX_PORT_V35 is defined (approach [a])
- future OFED versions might remove mlx5dv_query_devx_port
and HAVE_MLX5DV_DR_DEVX_PORT will not be defined
- Upstream rdma-core < v35 has no port query API (approach [b])
- Upstream rdma-core >= v35 has mlx5dv_query_port, flag
HAVE_MLX5DV_DR_DEVX_PORT_V35 is defined (approach [a])
In order to support the new mlx5dv_query_port routine, the
conditional compilation flag HAVE_MLX5DV_DR_DEVX_PORT_V35
is introduced by this patch. The flag HAVE_MLX5DV_DR_DEVX_PORT
is kept for compatibility with previous rdma-core versions.
Despite this patch is not a bugfix (it follows the introduced API
variation in underlying library), it resolves the compatibility
issue and is highly desired to be ported to DPDK LTS.
Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Jiawei Wang [Tue, 6 Jul 2021 08:12:27 +0000 (11:12 +0300)]
net/mlx5: control flow rules with identical pattern
In order to allow\disallow configuring rules with identical
patterns, the new device argument 'allow_duplicate_pattern'
is introduced.
If allow, these rules be inserted successfully and only the
first rule take affect.
If disallow, the first rule will be inserted and other rules
be rejected.
The default is to allow.
Set it to 0 if disallow, for example:
-a <PCI_BDF>,allow_duplicate_pattern=0
Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Shun Hao [Tue, 6 Jul 2021 13:14:50 +0000 (16:14 +0300)]
net/mlx5: validate meter action in policy
This adds the validation when creating a policy with meter action.
Currently meter action is only allowed for green color in policy, and
8 meters are supported at maximum in one meter hierarchy.
Signed-off-by: Shun Hao <shunh@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Shun Hao [Tue, 6 Jul 2021 13:14:49 +0000 (16:14 +0300)]
net/mlx5: add meter hierarchy destroy and cleanup
When creating hierarchy meter, its color rules will increase next
meter's reference count, so when destroy the hierarchy meter, also
need to dereference the next meter's count.
During flushing all meters of a port, need to destroy all hierarchy
meters and their policies first, to dereference the last meter in
hierarchy. Then all meters have no reference and can be destroyed.
Signed-off-by: Shun Hao <shunh@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Shun Hao [Tue, 6 Jul 2021 13:14:48 +0000 (16:14 +0300)]
net/mlx5: support meter hierarchy drop count
When using meter hierarchy with multiple meters, every meter may have
drop counter, so a packet being set red color by one meter should be
counted to that specific meter only.
To support this, add tag action in the color rule so packet going to
next new meter can have its meter id, so as to be counted to the
correct drop counter in drop table.
Signed-off-by: Shun Hao <shunh@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Shun Hao [Tue, 6 Jul 2021 13:14:47 +0000 (16:14 +0300)]
net/mlx5: support meter action in meter policy
This makes the meter policy support meter action. So multiple meters
can be chained as a meter hierarchy.
Only termination meter is allowed as the last meter in a hierarchy,
and there're two cases:
1. The last meter has non-RSS policy, can directly create sub-policy
and color rules during each meter's policy creation.
2. The last meter has RSS policy, don't create sub-policy/rules when
creating meter policy. Only when a RTE flow is using the meter hierarchy,
will iterate all meters of the hierarchy and create needed sub-
policies and color rules for them.
Signed-off-by: Shun Hao <shunh@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Xiaoyu Min [Fri, 2 Jul 2021 08:34:48 +0000 (16:34 +0800)]
net/mlx5: limit inner RSS expansion for MPLS
If user wants to do MPLS inner RSS and only provides pattern
till MPLS without inner items [1], RSS expansion will expand flows
into 13 sub-flows[2] which is too many and it impacts flow insert
rate, stack usage becomes large as well.
This expansion into 13 sub-flows seems not worthy of and it can
be significantly reduced (i.e, 7 sub-flows [3]) by user providing
at least one inner L2/L3 item [4].
[1]:
pattern eth / ipv4 / udp / mpls / end actions rss type tcp udp ip
end level 2 / end
[2]:
eth / ipv4 / udp / mpls
eth / ipv4 / udp / mpls / ipv4
eth / ipv4 / udp / mpls / ipv4 / udp
eth / ipv4 / udp / mpls / ipv4 / tcp
eth / ipv4 / udp / mpls / ipv6
eth / ipv4 / udp / mpls / ipv6 / udp
eth / ipv4 / udp / mpls / ipv6 / tcp
eth / ipv4 / udp / mpls / eth / ipv4
eth / ipv4 / udp / mpls / eth / ipv4 / udp
eth / ipv4 / udp / mpls / eth / ipv4 / tcp
eth / ipv4 / udp / mpls / eth / ipv6
eth / ipv4 / udp / mpls / eth / ipv6 / udp
eth / ipv4 / udp / mpls / eth / ipv6 / tcp
[3]:
eth / ipv4 / udp / mpls / eth
eth / ipv4 / udp / mpls / eth / ipv4 / udp
eth / ipv4 / udp / mpls / eth / ipv4 / tcp
eth / ipv4 / udp / mpls / eth / ipv6
eth / ipv4 / udp / mpls / eth / ipv6 / udp
eth / ipv4 / udp / mpls / eth / ipv6 / tcp
[4]:
pattern eth / ipv4 / udp / mpls / eth / end actions rss type tcp udp ip
level 2 / end
Signed-off-by: Xiaoyu Min <jackmin@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Xiaoyu Min [Fri, 2 Jul 2021 08:34:47 +0000 (16:34 +0800)]
net/mlx5: fix MPLS RSS expansion
MPLSoUDP and MPLSoGRE are supported by PMD from
rte flow point of view.
RSS expansion doesn't support above but, instead, supports
normal MPLS over L2, which actually will be rejected by PMD.
This patch removes RSS expansion support of the MPLS over L2
and adds support of MPLSoUDP and MPLSoGRE.
In addition to above, support for eth over MPLS expansion is
added too.
Fixes:
a4a5cd21d20a ("net/mlx5: add flow MPLS item")
Cc: stable@dpdk.org
Signed-off-by: Xiaoyu Min <jackmin@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Xiaoyu Min [Fri, 2 Jul 2021 08:34:46 +0000 (16:34 +0800)]
net/mlx5: remove unsupported flow item MPLS over IP
HW doesn't support match MPLS over IP traffic.
Remove related code.
Fixes:
d1abe664ddde ("net/mlx5: add MPLS to Direct Verbs flow engine")
Cc: stable@dpdk.org
Signed-off-by: Xiaoyu Min <jackmin@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Alexander Kozyrev [Mon, 5 Jul 2021 09:47:04 +0000 (12:47 +0300)]
net/mlx5: fix offset calculation for modify field action
Offsets are not taken into account during MAC addresses
manipulation for the MODIFY_FIELD action. That leads to
a wrong split between 0-15 and 16-47 bits and corrupted
data being copied to/from MAC addresses. Use both source
and destination offsets to calcucate the proper modify
header action specification.
Fixes:
fdd0c046f4 ("net/mlx5: fix modify field action order for MAC")
Cc: stable@dpdk.org
Signed-off-by: Alexander Kozyrev <akozyrev@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Gregory Etelson [Mon, 5 Jul 2021 09:05:00 +0000 (12:05 +0300)]
net/mlx5: fix L4 integrity translation
MLX5 PMD supports L3 and L4 integrity bits.
L4 checksum-ok bit was not translated correctly.
The patch updates the l4_csum_ok integrity bit translation.
Fixes:
79f8952783d0 ("net/mlx5: support integrity flow item")
Cc: stable@dpdk.org
Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Viacheslav Ovsiienko [Thu, 1 Jul 2021 07:31:33 +0000 (10:31 +0300)]
common/mlx5: fix Netlink receive message buffer size
If there are many VFs the Netlink message length sent by kernel
in reply to RTM_GETLINK request can be large. We should query
the size of message being received in advance and allocate
the large enough buffer to handle these large messages.
Fixes:
ccdcba53a3f4 ("net/mlx5: use Netlink to add/remove MAC addresses")
Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Xiaoyu Min [Thu, 1 Jul 2021 05:54:56 +0000 (13:54 +0800)]
net/mlx5: fix match MPLS over GRE with key
Currently PMD needs previous layer information in order to set
corresponding match field for MPLSoGRE or MPLSoUDP.
GRE_KEY item is missing as supported previous layer when translate
item MPLS, which causes flow[1] cannot match MPLS over GRE traffic.
According to RFC4023, MPLS over GRE tunnel with optional key
field needs to be supported too.
By adding missing GRE_KEY as supported previous layer fix problem.
[1]:
flow create 0 ingress pattern eth / ipv6 / gre k_bit is 1 / gre_key /
mpls label is 966138 / end actions queue index 1 / mark id 0xa / end
Fixes:
a7a0365565a4 ("net/mlx5: match GRE key and present bits")
Cc: stable@dpdk.org
Signed-off-by: Xiaoyu Min <jackmin@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Gregory Etelson [Wed, 30 Jun 2021 07:19:52 +0000 (10:19 +0300)]
net/mlx5: fix pattern expansion in RSS flow rules
Flow rule pattern may be implicitly expanded by the PMD if the rule
has RSS flow action. The expansion adds network headers to the
original pattern. The new pattern lists all network levels that
participate in the rule RSS action.
The patch validates that buffer for expanded pattern has enough bytes
for new flow items.
Fixes:
c7870bfe09dc ("ethdev: move RSS expansion code to mlx5 driver")
Cc: stable@dpdk.org
Signed-off-by: Gregory Etelson <getelson@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Haifei Luo [Mon, 31 May 2021 02:22:08 +0000 (05:22 +0300)]
net/mlx5: add more details to flow dump
Currently the flow dump provides few information about actions
- just the pointers. Add implementations to display details for
counter, modify_hdr and encap_decap actions.
For counter, the regular flow operation query is engaged and
the counter content information is provided, including hits
and bytes values.For modify_hdr, encap_and decap actions,
the information stored in the ipool objects is dumped.
There are the formats of information presented in the dump:
Counter: rec_type,id,hits,bytes
Modify_hdr: rec_type,id,actions_number,actions
Encap_decap: rec_type,id,buf
Signed-off-by: Haifei Luo <haifeil@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Feifei Wang [Thu, 27 May 2021 09:48:06 +0000 (17:48 +0800)]
net/mlx5: fix r/w lock usage in DMA unmap
For mlx5 DMA unmap, write lock should be used for rebuilding memory
region cache table rather than read lock.
Fixes:
989e999d9305 ("net/mlx5: support PCI device DMA map and unmap")
Cc: stable@dpdk.org
Signed-off-by: Feifei Wang <feifei.wang2@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Shun Hao [Fri, 2 Jul 2021 09:14:46 +0000 (12:14 +0300)]
net/mlx5: fix meter policy flow match item
Currently when creating meter policy, a src port_id match item will
always be added in switch domain. So if one meter is used by another
port, it will not work correctly.
This issue is solved:
1. If policy fate action is port_id, add the src port_id match item,
and the meter cannot be shared by another port.
2. If policy fate action isn't port_id, don't add the src port_id
match, meter can be shared by another port.
This fix enables one meter being shared by different ports. User can
create a meter flow using a port_id match item to make this meter
shared by other port.
Fixes:
afb4aa4f122 ("net/mlx5: support meter policy operations")
Cc: stable@dpdk.org
Signed-off-by: Shun Hao <shunh@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Shun Hao [Fri, 2 Jul 2021 09:14:45 +0000 (12:14 +0300)]
net/mlx5: fix meter flow direction check
When preparing prefix flow using ASO meter, if it's tx flow, need
to make meter action the first one.
Currently the check of flow direction in switch domain is incorrect
that it checks the flow dev port only.
This adds the fix for the check that if there's port_id match item
in flow, use that port_id as src port to determine flow direction.
Fixes:
c99b4f8bc2f1 ("net/mlx5: support ASO meter action")
Cc: stable@dpdk.org
Signed-off-by: Shun Hao <shunh@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Shun Hao [Fri, 2 Jul 2021 09:14:44 +0000 (12:14 +0300)]
net/mlx5: fix meter policy ID table container
The meter policy handlers are managed by user IDs and the driver used l3
table in order to map the user ID to the internal driver handler of the
policy.
The l3 table was wrongly saved in the shared device structure which
manages all the switch domain ports what made the user IDs shared
between different ethdev ports.
Move the policy l3 table to be per port by saving it in the port private
structure.
Fixes:
afb4aa4f122 ("net/mlx5: support meter policy operations")
Cc: stable@dpdk.org
Signed-off-by: Shun Hao <shunh@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Shun Hao [Fri, 2 Jul 2021 09:14:43 +0000 (12:14 +0300)]
net/mlx5: optimize meter profile lookup
Currently a list is used to save all meter profile ids, which is
not efficient when looking up profile from huge amount of profiles.
This changes to use an l3 table instead to save meter profile ids,
so as to improve the lookup performance.
Signed-off-by: Shun Hao <shunh@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Dmitry Kozlyuk [Wed, 30 Jun 2021 07:01:06 +0000 (10:01 +0300)]
doc: add limitation for ConnectX-4 with L2 in mlx5 guide
ConnectX-4 and ConnectX-4 Lx NICs require all L2 headers of transmitted
packets to be inlined. By default only first 18 bytes are inlined,
which is insufficient if additional encapsulation is used, like Q-in-Q.
Thus, default settings caused such traffic to be dropepd on Tx.
Document a recommendation to increase inlined data size in such cases.
Fixes:
505f1fe426d3 ("net/mlx5: add Tx devargs")
Cc: stable@dpdk.org
Signed-off-by: Dmitry Kozlyuk <dkozlyuk@nvidia.com>
Reviewed-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Viacheslav Ovsiienko [Sun, 20 Jun 2021 06:30:28 +0000 (09:30 +0300)]
net/mlx5: fix TSO multi-segment inline length
The inline data length for TSO ethernet segment should be
calculated from the TSO header instead of the inline size
configured by txq_inline_min devarg or reported by the NIC.
It is imposed by the nature of TSO offload - inline header
is being duplicated to every output TCP packet.
Fixes:
cacb44a09962 ("net/mlx5: add no-inline Tx flag")
Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Jiawei Wang [Tue, 29 Jun 2021 06:59:53 +0000 (09:59 +0300)]
net/mlx5: fix representor ID check for sampling
The representor definition was introduced in the latest code.
For non-representor port, like PF port, use the 0xffff instead of -1.
This patch updates the representor id checking during splitting sample
flow.
Fixes:
cb95feefdd03 ("net/mlx5: support sub-function representor")
Cc: stable@dpdk.org
Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com>
Acked-by: Xueming Li <xuemingl@nvidia.com>
Michael Baum [Mon, 28 Jun 2021 15:06:14 +0000 (18:06 +0300)]
common/mlx5: fix memory region leak
All the mlx5 drivers using MRs for data-path must unregister the mapped
memory when it is freed by the dpdk process.
Currently, only the net/eth driver unregisters MRs in free event.
Move the net callback handler from net driver to common.
Cc: stable@dpdk.org
Signed-off-by: Michael Baum <michaelba@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Jiawei Wang [Mon, 28 Jun 2021 10:58:28 +0000 (13:58 +0300)]
net/mlx5: fix flow modify action validation
The introduced MODIFY_FIELD action was used to manipulate
the packet header field through copy or set operations.
These modify header actions should be counted as one action
in low level, the current code used wrong actions flags
checking for modify field action.
This patch update the action flags checking into the correct
MODIFY_HDR_ACTIONS set.
Fixes:
641dbe4fb053 ("net/mlx5: support modify field flow action")
Cc: stable@dpdk.org
Signed-off-by: Jiawei Wang <jiaweiw@nvidia.com>
Acked-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Viacheslav Ovsiienko [Tue, 22 Jun 2021 16:40:49 +0000 (19:40 +0300)]
net/mlx5: fix multi-segment inline for the first segments
Before 19.08 release the Tx burst routines of mlx5 PMD
provided data inline for the first short segments of the
multi-segment packets. In the release 19.08 mlx5 Tx datapath
was refactored and this behavior was broken, affecting the
performance.
For example, the T-Rex traffic generator might use small
leading segments to handle packet headers and performance
degradation was noticed.
If the first segments of the multi-segment packet are short
and the overall length is below the inline threshold it
should be inline into the WQE to fix the performance.
Fixes:
18a1c20044c0 ("net/mlx5: implement Tx burst template")
Cc: stable@dpdk.org
Signed-off-by: Viacheslav Ovsiienko <viacheslavo@nvidia.com>
Li Zhang [Wed, 23 Jun 2021 07:24:40 +0000 (10:24 +0300)]
net/mlx5: fix meter policy with RSS action
When creating the meter sub-policy RSS rule,
the RSS descriptor was used before its update.
It also need update tunnel bit in RSS descriptor
after flow translate.
Use it only when it is updated.
Fixes:
ec962bad14e ("net/mlx5: fix metering cleanup on stop")
Cc: stable@dpdk.org
Signed-off-by: Li Zhang <lizh@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Tal Shnaiderman [Tue, 22 Jun 2021 15:34:50 +0000 (18:34 +0300)]
net/mlx5: add TCP and IPv6 to supported items for Windows
WINOF2 2.70 Windows kernel driver allows DevX rule creation
of types TCP and IPv6.
Added the types to the supported items in mlx5_flow_os_item_supported
to allow them to be created in the PMD.
Added description of new rules support in Windows kernel driver WINOF2 2.70
to the mlx5 driver guide.
Signed-off-by: Tal Shnaiderman <talshn@nvidia.com>
Acked-by: Matan Azrad <matan@nvidia.com>
Ajit Khaparde [Tue, 25 May 2021 17:35:22 +0000 (10:35 -0700)]
net/bnxt: fix Rx interrupt setting
Don't set rxq interrupt config
Applications can set the rxq interrupt config to 1 or 0 as needed.
If an application is not interested in handling Rx interrupts and
prefers to poll Rx rings, there is no need for the PMD to set this
config option to 1.
Fixes:
1fe427fd08ee ("net/bnxt: support enable/disable interrupt")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
Ajit Khaparde [Thu, 24 Jun 2021 20:47:08 +0000 (13:47 -0700)]
net/bnxt: fix ring allocation and free
Fix handling of ring alloc and free logic to fix check for invalid ring and
context IDs. This also avoids code duplication.
Fixes:
6133f207970c ("net/bnxt: add Rx queue create/destroy")
Fixes:
51c87ebafc7d ("net/bnxt: add Tx queue create/destroy")
Cc: stable@dpdk.org
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Ajit Khaparde [Wed, 12 May 2021 07:58:07 +0000 (00:58 -0700)]
net/bnxt: support runtime queue setup
Add support for runtime Rx and Tx queue setup. This will allow
Rx/Tx queue setup after the interface is started.
Signed-off-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Lance Richardson [Wed, 16 Jun 2021 17:55:23 +0000 (13:55 -0400)]
net/bnxt: remove dead code
Code related to maintaining completion ring "valid" state is
no longer needed, remove it.
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Lance Richardson [Wed, 16 Jun 2021 17:55:22 +0000 (13:55 -0400)]
net/bnxt: fix scalar Tx completion handling
Preserve the raw (unmasked) transmit completion ring
consumer index.
Remove cache prefetches that have no measurable performance
benefit.
Fixes:
c7de4195cc4c ("net/bnxt: modify ring index logic")
Cc: stable@dpdk.org
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Lance Richardson [Wed, 16 Jun 2021 17:55:21 +0000 (13:55 -0400)]
net/bnxt: fix Tx descriptor status implementation
With Tx completion batching, a single transmit completion
can correspond to one or more transmit descriptors, adjust
implementation to account for this.
RTE_ETH_TX_DESC_DONE should be returned for descriptors that
are available for use instead of RTE_ETH_TX_DESC_UNAVAIL.
Fixes:
5735eb241947 ("net/bnxt: support Tx batching")
Fixes:
478ed3bb7b9d ("net/bnxt: support Tx descriptor status")
Cc: stable@dpdk.org
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Lance Richardson [Wed, 16 Jun 2021 17:55:20 +0000 (13:55 -0400)]
net/bnxt: fix ring and context memory allocation
Use requested socket ID when allocating memory for transmit rings,
receive rings, and completion queues. Use device NUMA ID when
allocating context memory, notification queue rings, async
completion queue rings, and VNIC attributes.
Fixes:
6eb3cc2294fd ("net/bnxt: add initial Tx code")
Fixes:
9738793f28ec ("net/bnxt: add VNIC functions and structs")
Fixes:
f8168ca0e690 ("net/bnxt: support thor controller")
Fixes:
bd0a14c99f65 ("net/bnxt: use dedicated CPR for async events")
Fixes:
683e5cf79249 ("net/bnxt: use common NQ ring")
Cc: stable@dpdk.org
Signed-off-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kalesh AP [Wed, 9 Jun 2021 03:13:32 +0000 (08:43 +0530)]
net/bnxt: invoke device removal event on recovery failure
When the driver receives RESET_NOTIFY async event from FW or detects
a FW fatal error condition, it tries to recover from the error.
When the driver fails to recover from the error condition, fixed to
send device removal event to the application.
Fixes:
df6cd7c1f73a ("net/bnxt: handle reset notify async event from FW")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kalesh AP [Wed, 9 Jun 2021 03:13:31 +0000 (08:43 +0530)]
net/bnxt: fix auto-negociation on Whitney+
Driver should enable autoneg on a port if FW supports it.
Because of a wrong check, driver is not enabling autoneg
on a port after setting forced speed on Whitney+.
Fixes:
7bc8e9a227cc ("net/bnxt: support async link notification")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kalesh AP [Wed, 9 Jun 2021 03:13:30 +0000 (08:43 +0530)]
net/bnxt: fix typo in log message
In bnxt_rss_hash_update_op, check for valid RSS hashkey length is
made against size HW_HASH_KEY_SIZE(40). But the failure log says
"Invalid hashkey length, should be 16 bytes".
Fixes:
91aee9711ee3 ("net/bnxt: validate RSS hash key length")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Kalesh AP [Wed, 9 Jun 2021 03:13:29 +0000 (08:43 +0530)]
net/bnxt: cleanup code
This is a cleanup commit and no functional change.
1. use macros instead of hard coded values
2. remove unnecessary comments
Fixes:
5cd0e2889c43 ("net/bnxt: support NIC Partitioning")
Fixes:
2ba07b7dbd9d ("net/bnxt: set the hash key size")
Cc: stable@dpdk.org
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kalesh AP [Wed, 9 Jun 2021 02:45:15 +0000 (08:15 +0530)]
net/bnxt: dump SFP module info
Add support to fetch the SFP EEPROM settings from the firmware.
For SFP+ modules we will display 0xA0 page for status and 0xA2 page
for other information. For QSFP modules we will show the 0xA0 page.
Also identify the module types for QSFP28, QSFP, QSFP+ apart
from the SFP modules and return an error for 10GBase-T PHY.
Signed-off-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Mike Baucom [Sun, 30 May 2021 08:59:29 +0000 (14:29 +0530)]
net/bnxt: support Thor template
Template adds non-VF representor based support.
Item matches supported:
- DMAC, SIP, DIP, Proto, Sport, Dport
- SIP, DIP, Proto, Sport, Dport
Actions supported:
- count, drop
Signed-off-by: Mike Baucom <michael.baucom@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Venkat Duvvuru [Sun, 30 May 2021 08:59:28 +0000 (14:29 +0530)]
net/bnxt: reorganize ULP template directory structure
Reorganize ULP template directory structure and add meson.build
file to the respective directories.
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Shahaji Bhosle [Sun, 30 May 2021 08:59:27 +0000 (14:29 +0530)]
net/bnxt: cleanup ULP parser and mapper
1. Disable accum_stats for Thor
2. Delete the generic port table for default flow
3. The packet mask to calculate the number of packets must be 28 bits.
4. Increase the WC TCAM entries to 512 per application and add 2
shared L2 context TCAM entries to match identifiers for flow
scaling
5. Ignore multiple critical resources in ULP flow database
6. Renamed conditional code update to function opcode.
7. Updated TRUFLOW debug logs to support the above changes.
8. As part of the HA cleanup, the shared session name now allows the user
to designate that the session uses the wc_tcam regions within the
shared session.
9. The CFA action pointer does not exist if there is no support for
VF representor, so no need to display the message for use case where
there is no support for VF representors.
10. Cleanup flow counter software accumulation.
11. When an application exits ungracefully, the HA code now
clears the appropriate shared WC region and sets the HA state.
12. Removal of unnecessary INFO message. The message is an indicator that
the ports are being removed from DPDK, but all cleanup has not
completed. Once the cleanup is completed, the timer will be stopped.
Signed-off-by: Shahaji Bhosle <sbhosle@broadcom.com>
Signed-off-by: Mike Baucom <michael.baucom@broadcom.com>
Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kishore Padmanabha [Sun, 30 May 2021 08:59:26 +0000 (14:29 +0530)]
net/bnxt: add context list for timers
Add context in ULP for timers.
The alarm callback needs to have a valid context pointer when it is
invoked. The context could become invalid if the port goes down and
the callback is invoked before it is cancelled.
Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kishore Padmanabha [Sun, 30 May 2021 08:59:25 +0000 (14:29 +0530)]
net/bnxt: add ICMPv6 parser to ULP
This patch adds support for parsing rte_flow items for ICMPv6 flows.
Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Mike Baucom [Sun, 30 May 2021 08:59:24 +0000 (14:29 +0530)]
net/bnxt: add HA support in ULP
Add the ability for cooperative applications to share resources and
use the high availability functionality in the HW.
Signed-off-by: Mike Baucom <michael.baucom@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Shahaji Bhosle <sbhosle@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kishore Padmanabha [Sun, 30 May 2021 08:59:23 +0000 (14:29 +0530)]
net/bnxt: add templates for shared sessions
1. Add template support for shared sessions.
2. Store the shared session flag in flow data base.
3. Store WC TCAM region in the computational field.
Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Mike Baucom [Sun, 30 May 2021 08:59:22 +0000 (14:29 +0530)]
net/bnxt: process resource lists before session open
Shared sessions require both named and unnamed resources to be requested
during a tf_open_session. ULP uses named resources for global resources
that are pre-allocated and remain through the life of the application.
Unnamed resources are generally per flow resources and allocated on
demand. The sum of both named and unnamed resources must be requested
when initializing the session. The ulp_init now processes both lists
prior to calling tf_open_session for both shared and regular sessions.
Signed-off-by: Mike Baucom <michael.baucom@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kishore Padmanabha [Sun, 30 May 2021 08:59:21 +0000 (14:29 +0530)]
net/bnxt: support application ID in ULP matcher
The application id in the ULP matcher makes the template matching
restrict to only flows that are supported for that application.
Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Shahaji Bhosle <sbhosle@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kishore Padmanabha [Sun, 30 May 2021 08:59:20 +0000 (14:29 +0530)]
net/bnxt: add field opcodes in ULP
Add field opcodes that perform logical evaluation of
multiple conditions. Also add more logging especially in
error path.
Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Mike Baucom [Sun, 30 May 2021 08:59:19 +0000 (14:29 +0530)]
net/bnxt: add shared session support to ULP
Shared session permits cooperative sharing of prescribed resources
between applications.
- devargs added for app-id in order to enable sharing session
resources across applications
- shared session management added
- TRUFLOW resource reservations are now app ID and device dependent
Signed-off-by: Mike Baucom <michael.baucom@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kishore Padmanabha [Sun, 30 May 2021 08:59:18 +0000 (14:29 +0530)]
net/bnxt: refactor flow parser in ULP
1. Remove Ether type, VLAN type and IP proto type from pattern matching,
since the header bits can be used for matching. This reduces the class
template signatures by a factor of 8.
2. Remove the wild card bit in the pattern matching since same template
can be used for both exact and wild card entries.
3. The action record pointers have to use higher range to not collide
with the firmware action record pointers. Hence reduced the number of
action record pointers for Whitney platform.
4. The conditional update opcode provide functionality to reject flows
for instance reject flows that do not adhere to flow signature match.
5. Added check to not populate protocol specifications if the
protocol mask is null or zero.
6. Check that field array is not overrun.
Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kishore Padmanabha [Sun, 30 May 2021 08:59:17 +0000 (14:29 +0530)]
net/bnxt: support Thor platform
1. Add templates to support Thor platform.
2. Flow counter manager is not enabled if no flow counters are
configured.
3. Mark database is not enabled if mark action is not supported.
4. Removed application to port default flow.
5. Add allocate and write for the global registry file.
6. Multiple default flow templates are combined to one.
7. Remove default loopback action record, this is required in order to
support multiple platforms.
8. Enable port table support in the generic table.
9. remove global template table in order to support multiple platforms.
10. Add support to get parent VNIC from port table database.
11. VF representor action mark is made optional since not all
configurations need representor support.
12. Add layer 4 ports to computational fields.
13. Update templates to support the above changes.
14. Add support for wildcard.
Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kishore Padmanabha [Sun, 30 May 2021 08:59:16 +0000 (14:29 +0530)]
net/bnxt: support generic hash table
Added support for generic table to enable search of keys that
are larger than 16 bits using hash table.
Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kishore Padmanabha [Sun, 30 May 2021 08:59:15 +0000 (14:29 +0530)]
net/bnxt: refactor ULP mapper
1. The internal and external exact match table resource types
is combined since the resource handle contains the encoded
type whether it is internal or external exact match entry.
2. When a flow doesn't hit the offloaded rules, the default action is
to send it to the kernel (L2 driver interface). In order to do that,
TRUFLOW must know the kernel interface's (PF's) default vnic id.
This patch fetches the PF's default vnic id from the dpdk core and
stores it in port database. It also stores the mac addr for the
future usage. Renamed compute field for layer 4 port enums.
Added support for port database opcode that can get port details
like mac address which can then be populated in the l2 context entry.
3. Both active and default bit set need to considered to check if a
specific flow type is enabled or not.
4. ulp mapper fetches the dpdk port id from the compute field index
BNXT_ULP_CF_IDX_DEV_PORT_ID which is used to get the interface’s
mac address eventually. However, the compute field array is not
populated with dpdk port id at the index BNXT_ULP_CF_IDX_DEV_PORT_ID.
The problem fixed by populating the compute field array correctly.
5. Some dpdk applications may accumulate the flow counters while some
may not. In cases where the application is accumulating the counters
the PMD need not do the accumulation itself and viceversa to report
the correct flow counters.
6. Pointer to bp is added to open session parms to support
shared session.
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Jay Ding <jay.ding@broadcom.com>
Reviewed-by: Lance Richardson <lance.richardson@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
Kishore Padmanabha [Sun, 30 May 2021 08:59:14 +0000 (14:29 +0530)]
net/bnxt: support extended exact match
The templates are updated to enable the extended exact match
table support. As part of this change, the action record size of
the action has to be calculated dynamically so it can be included
in the match table.
Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
Reviewed-by: Farah Smith <farah.smith@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Venkat Duvvuru [Sun, 30 May 2021 08:59:13 +0000 (14:29 +0530)]
net/bnxt: support GRE flows
This patch does the following to support GRE flows:
1. RTE_FLOW_ITEM_TYPE_ANY & RTE_FLOW_ITEM_TYPE_GRE processing
2. Calculate the absolute function ID from the logical VF ID
passed as part of RTE_FLOW_ACTION_TYPE_VF action.
3. Move bnxt_get_bp API to bnxt_ethdev.c
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kishore Padmanabha [Sun, 30 May 2021 08:59:12 +0000 (14:29 +0530)]
net/bnxt: support wildcard pattern matching
The computational field is enabled for wild card pattern support.
The template checks the computational field to add a flow as wild
card entry or exact match entry.
Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Reviewed-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kishore Padmanabha [Sun, 30 May 2021 08:59:11 +0000 (14:29 +0530)]
net/bnxt: add partial header field processing
For support for wild card TCAM, some of the header fields have to
be partially written, hence this new opcode is added.
Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kishore Padmanabha [Sun, 30 May 2021 08:59:10 +0000 (14:29 +0530)]
net/bnxt: refactor TRUFLOW processing
1. The flow database opcode is updated to split the alloc push resource
item so it can be controlled using the control table.
2. The class and action match signatures are populated with pattern ids
that are matched against template pattern id to reject any unsupported
class and action combinations.
3. The flow DB opcode should be no op when accessing the
global registry identifiers.
4. The resource function for branch is changed to control so that it
is extended to perform flow database operations and not just branch
operations.
5. The conditional goto processing now supports negative numbers to
support looping of the mapper tables to support flow ranges and
also enable conditional fail goto to support failure path mapper
tables.
6. The field mapper opcode is updated to add all ones to fields
that support exact match.
7. Added key info and identifier list to whitney action templates
The whitney plus templates are updated to use the mapper infrastructure
changes.
8. The partition interface table configuration of the default
egress rule for the representor interface needs to use the
reserved parif interface that is specific to each
platform. The pipeline for the representor interface is broken
since incorrect parif configuration cause the miss path packets to
be dropped.
9. In the mapper table processing, if a failure condition is hit
due to invalid memory type then use the conditional goto failure
configuration instead of jumping to next table. This causes ipv6
exact match entry to be skipped. This patch fixes that issue.
Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Shahaji Bhosle <sbhosle@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kishore Padmanabha [Sun, 30 May 2021 08:59:09 +0000 (14:29 +0530)]
net/bnxt: add conditional opcode and L4 port fields
The conditional field opcode provides capability to perform
changes to the field values specified by template to address
platform specific modifications. For instance, mirror id value
is modified before it is configured in the hardware.
The addition of L4 port compute fields enables support of
generic exact match rule that can support both TCP and UDP
flows with the same template.
Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Shahaji Bhosle <sbhosle@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kishore Padmanabha [Sun, 30 May 2021 08:59:08 +0000 (14:29 +0530)]
net/bnxt: modify ULP template
1. Update template to add both ipv4 and ipv6 flows.
2. The VF representor template missed generic table read.
Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Shahaji Bhosle <sbhosle@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kishore Padmanabha [Sun, 30 May 2021 08:59:07 +0000 (14:29 +0530)]
net/bnxt: set shared handle for generic table
The shared handle is set in the mapper params when generic resource
are created, this shall be used by application as a handle to the
shared resource like mirror handle.
Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kishore Padmanabha [Sun, 30 May 2021 08:59:06 +0000 (14:29 +0530)]
net/bnxt: add conditional goto processing
The condition execute of the mapper tables have goto field that
defines the offset of the next table to be processed instead of
sequential processing of the tables, this improving the performance.
Also, modify key and mask field opcode processing
Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kishore Padmanabha [Sun, 30 May 2021 08:59:05 +0000 (14:29 +0530)]
net/bnxt: identify duplicate flows
Conflict resolution feature allows rejection of flows based on
the previously added flows that conflict. For instance, a five
tuple flow is added and then you add a new flow with only 4 tuple
instead having same layer2 details then it will be rejected.
Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kishore Padmanabha [Sun, 30 May 2021 08:59:04 +0000 (14:29 +0530)]
net/bnxt: add ULP priority opcode processing
Added ULP priority opcode to enable flexibility to
the usage of the flow priority. New opcodes help template
specify the flow priority accordingly.
Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Douglas Flint <douglas.flint@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kishore Padmanabha [Sun, 30 May 2021 08:59:03 +0000 (14:29 +0530)]
net/bnxt: modify table processing
1. Added interface table specific opcode to process interface table
entry creation and reuse. This allows reuse of the interface table
entry for multiple flows. Changed the regfile apis to store
the data in big endian format.
2. The result blob creation being done in tcam, interface, index
tables are consolidate to a common method.
3. Added result blob processing for generic table write
4. Modified the index table opcode processing to support new opcodes.
5. The driver was setting key size that did not take into account
the word alignment.
6. The hard coded values for critical resource is replaced with
template defined values.
Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Venkat Duvvuru [Sun, 30 May 2021 08:59:02 +0000 (14:29 +0530)]
net/bnxt: modify VXLAN decap for multichannel mode
The driver is using physical port id as the index into
the tunnel inner flow table. However, this will not work in case
of multichannel mode where multiple physical functions are going
to share the same physical port id.
When tunnel inner flow offload request comes before tunnel
outer flow offload request, the driver caches the tunnel inner flow
details and programs it in the hardware after installing the tunnel
outer flow in the hardware. If more than one tunnel inner flow arrives
before tunnel outer flow is offloaded, the driver rejects any such
tunnel inner flow offload requests.
This patch fixes the above two problems by
1. Using dpdk port id as the index to store tunnel inner info.
2. Caching any number of tunnel inner flow offload requests that come
before offloading tunnel outer flow offload request
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Shahaji Bhosle <sbhosle@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kishore Padmanabha [Sun, 30 May 2021 08:59:01 +0000 (14:29 +0530)]
net/bnxt: modify TCAM opcode processing
Added TCAM table specific opcode to process TCAM entry creation
and reuse. This change removes the TCAM cache mechanism and uses
the generic table mechanism for reuse of TCAM entries.
Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Mike Baucom [Sun, 30 May 2021 08:59:00 +0000 (14:29 +0530)]
net/bnxt: add conditional processing of templates
Conditional execution and rejection processing added for templates and
tables. This allows the mapper to skip tables and reject templates
based on the content without having to hard code rules.
Signed-off-by: Mike Baucom <michael.baucom@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kishore Padmanabha [Sun, 30 May 2021 08:58:59 +0000 (14:28 +0530)]
net/bnxt: support mapper flow database opcodes
Added support for mapper flow database opcode to enable
shared resources like mirror action. This allows mapper
to conditionally populate flow database based on template content.
Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Kishore Padmanabha [Sun, 30 May 2021 08:58:58 +0000 (14:28 +0530)]
net/bnxt: support generic table processing
Added support for generic table processing, this feature shall
enable support for shared resource like mirror and TCAM
cache tables.
Signed-off-by: Kishore Padmanabha <kishore.padmanabha@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Venkat Duvvuru [Sun, 30 May 2021 08:58:57 +0000 (14:28 +0530)]
net/bnxt: check FW capability to support TRUFLOW
Currently, a devarg (host-based-truflow) is passed while launching
the app to enable TRUFLOW feature. However, this mechanism adds
an extra step in enabling TRUFLOW. This doesn't give a seamless
experience when flow offloads has to work with FW that doesn't/does
support TRUFLOW feature. Also, it's likely that customers may not
want to use devarg to enable flow offloads.
This patch fixes it by checking for TRUFLOW feature support in
device's capabilities and configurations field of the hwrm_ver_get.
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Kalesh AP <kalesh-anakkur.purayil@broadcom.com>
Reviewed-by: Somnath Kotur <somnath.kotur@broadcom.com>
Farah Smith [Sun, 30 May 2021 08:58:56 +0000 (14:28 +0530)]
net/bnxt: add functions to clear TCAM regions
Add TRUFLOW API to clear either the hi or the low regions
in WildCard TCAM for ungraceful exit cleanup.
Signed-off-by: Farah Smith <farah.smith@broadcom.com>
Signed-off-by: Randy Schacher <stuart.schacher@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Jay Ding <jay.ding@broadcom.com>
Reviewed-by: Peter Spreadborough <peter.spreadborough@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Jay Ding [Sun, 30 May 2021 08:58:55 +0000 (14:28 +0530)]
net/bnxt: support WC TCAM shared session
If the session shares WC TCAM entries with others,
specify it in the session name by attach "-wc_tcam".
Firmware will flush the shared WC TCAM entries if
the last shared session using them is closed.
Signed-off-by: Jay Ding <jay.ding@broadcom.com>
Signed-off-by: Randy Schacher <stuart.schacher@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Mike Baucom <michael.baucom@broadcom.com>
Reviewed-by: Farah Smith <farah.smith@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Farah Smith [Sun, 30 May 2021 08:58:54 +0000 (14:28 +0530)]
net/bnxt: cleanup WC TCAM shared pool
Clean up all allocated hi or lo pool TCAM regions on close.
Along with message cleanup and remove unnecessary multi-slice options
Also make sure that find next free entry should start from 0 first time.
Signed-off-by: Farah Smith <farah.smith@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Jay Ding [Sun, 30 May 2021 08:58:53 +0000 (14:28 +0530)]
net/bnxt: refactor host session failure cleanup
- Close FW session if session open fails after Fw session open.
- Additional WC TCAM debug info to help in future debug
- Reduce key/mask buffer sizes for performance
- When a 64b counter is freed, clear the entry
Signed-off-by: Jay Ding <jay.ding@broadcom.com>
Signed-off-by: Farah Smith <farah.smith@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Farah Smith [Sun, 30 May 2021 08:58:52 +0000 (14:28 +0530)]
net/bnxt: add functions to get shared table increments
Add TRUFLOW API to get the shared table increment value
for a given TRUFLOW table type.
The API is being added for Wh+ and Thor devices.
Signed-off-by: Farah Smith <farah.smith@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Farah Smith [Sun, 30 May 2021 08:58:51 +0000 (14:28 +0530)]
net/bnxt: support WC TCAM management
- Add new API to move WC TCAM regions from the hi pool
to the low pool.
- Enable shared TCAM get/set functions on Thor.
Signed-off-by: Farah Smith <farah.smith@broadcom.com>
Signed-off-by: Randy Schacher <stuart.schacher@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Farah Smith [Sun, 30 May 2021 08:58:50 +0000 (14:28 +0530)]
net/bnxt: cleanup logs in session handling paths
Cleanup some of the log messages in the session open and close paths.
Signed-off-by: Farah Smith <farah.smith@broadcom.com>
Signed-off-by: Jay Ding <jay.ding@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
Reviewed-by: Peter Spreadborough <peter.spreadborough@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Farah Smith [Sun, 30 May 2021 08:58:49 +0000 (14:28 +0530)]
net/bnxt: support shared TCAM region
- switch to single slice management on Wh+
- Support of shared session WC_TCAM_HIGH and WC_TCAM_LOW regions
- Enable/disable using TF_TCAM_SHARED flag in tf_core.h
- Fix empty session module DBs in the case that none are
allocated for a given module type
Signed-off-by: Farah Smith <farah.smith@broadcom.com>
Signed-off-by: Jay Ding <jay.ding@broadcom.com>
Signed-off-by: Randy Schacher <stuart.schacher@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Jay Ding [Sun, 30 May 2021 08:58:48 +0000 (14:28 +0530)]
net/bnxt: modify resource reservation strategy
Allow an application to only reserve resources for one direction.
Signed-off-by: Jay Ding <jay.ding@broadcom.com>
Signed-off-by: Randy Schacher <stuart.schacher@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Jay Ding [Sun, 30 May 2021 08:58:47 +0000 (14:28 +0530)]
net/bnxt: update shared session functionality
- Distinguish the shared session on host side using PCI address
- One session could be shared by multiple interfaces.
Signed-off-by: Jay Ding <jay.ding@broadcom.com>
Signed-off-by: Randy Schacher <stuart.schacher@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Farah Smith <farah.smith@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Peter Spreadborough [Sun, 30 May 2021 08:58:46 +0000 (14:28 +0530)]
net/bnxt: add dpool allocator for EM allocation
The dpool allocator supports variable size entries and
also supports defragmentation of the allocation space.
EM will by default use the fixed size stack allocator.
The dynamic allocator may be selected at build time.
The dpool allocator supports variable size entries and
also supports defragmentation of the allocation space.
Signed-off-by: Peter Spreadborough <peter.spreadborough@broadcom.com>
Signed-off-by: Randy Schacher <stuart.schacher@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Farah Smith <farah.smith@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Jay Ding [Sun, 30 May 2021 08:58:45 +0000 (14:28 +0530)]
net/bnxt: support shared session
There are 2 types of sessions - shared and non-shared. For non-shared
all the allocated resources are owned and managed by a single
session instance. No other applications have access to the
resources owned by the non-shared session. For a shared session,
resources are shared between 2 applications.
The FW shared session can only be created by one application and
shared by other apps. The host session that creates the FW shared
session is the creator.
Applications can retrieve the reserved resources through a new API
tf_get_session_resc_info.
Each module supports two sessions, one is shared session, the other
is non-shared session.
Signed-off-by: Jay Ding <jay.ding@broadcom.com>
Signed-off-by: Randy Schacher <stuart.schacher@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Farah Smith <farah.smith@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Jay Ding [Sun, 30 May 2021 08:58:44 +0000 (14:28 +0530)]
net/bnxt: change RM database type
RM databases are statically defined in each module. New static
database needs to be defined in the code when multiple sessions
are added. Add dynamic alloc database and associate it to each
session.
Signed-off-by: Jay Ding <jay.ding@broadcom.com>
Signed-off-by: Randy Schacher <stuart.schacher@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Farah Smith <farah.smith@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Farah Smith [Sun, 30 May 2021 08:58:43 +0000 (14:28 +0530)]
net/bnxt: modify TRUFLOW HWRM messages
- Move Bulk get to a direct HWRM message
- Deprecate code based on HCAPI changes
Signed-off-by: Farah Smith <farah.smith@broadcom.com>
Signed-off-by: Peter Spreadborough <peter.spreadborough@broadcom.com>
Signed-off-by: Randy Schacher <stuart.schacher@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Peter Spreadborough [Sun, 30 May 2021 08:58:42 +0000 (14:28 +0530)]
net/bnxt: add hashing changes for Thor
- Move HCAPI hashing code to common file and add Thor support.
- Change DPDK EM insert for FKB to use limited size Type 3 key.
- Update FKB builder to be able to tell between EM and WC keys
during transform.
FKB is the Flexible Key Builder in Thor used while inserting flows.
Signed-off-by: Peter Spreadborough <peter.spreadborough@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Randy Schacher <stuart.schacher@broadcom.com>
Reviewed-by: Farah Smith <farah.smith@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Farah Smith [Sun, 30 May 2021 08:58:41 +0000 (14:28 +0530)]
net/bnxt: add 64B SRAM record management with RM
HCAPI RM now manages 64Byte records instead of 8Byte.
Truflow core RM will manage the same. The tf_tbl core
APIs now return 8B pointer addresses. These can
be used directly as SRAM pointers in Action Records.
When communicating with the firmware 8 byte addresses
will be used.
Signed-off-by: Farah Smith <farah.smith@broadcom.com>
Signed-off-by: Randy Schacher <stuart.schacher@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Jay Ding [Sun, 30 May 2021 08:58:40 +0000 (14:28 +0530)]
net/bnxt: support Thor WC TCAM
1. Add set/get/free/alloc for WC TCAM
2. Rework the key size in slice management.
3. Add 3 FKB WC keys for WC TCAM set cli cmd
4. Add transform key function for WC TCAM FKB key
5. Add checking for key buffer length for get_tcam
Signed-off-by: Jay Ding <jay.ding@broadcom.com>
Signed-off-by: Randy Schacher <stuart.schacher@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Farah Smith <farah.smith@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Farah Smith [Sun, 30 May 2021 08:58:39 +0000 (14:28 +0530)]
net/bnxt: add action SRAM translation
- Translate Truflow action types for Thor to HCAPI RM
resource defined SRAM banks.
- move module type enum definitions to tf_core API
- Switch to subtype concept for RM.
- alloc/free working for Thor SRAM table type for full AR.
Signed-off-by: Farah Smith <farah.smith@broadcom.com>
Signed-off-by: Randy Schacher <stuart.schacher@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Peter Spreadborough <peter.spreadborough@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Jay Ding [Sun, 30 May 2021 08:58:38 +0000 (14:28 +0530)]
net/bnxt: support L2 context TCAM operations
- Implement TCAM get in host
- Add Thor support for TCAM set/free
Signed-off-by: Jay Ding <jay.ding@broadcom.com>
Signed-off-by: Randy Schacher <stuart.schacher@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Peter Spreadborough <peter.spreadborough@broadcom.com>
Reviewed-by: Farah Smith <farah.smith@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Peter Spreadborough [Sun, 30 May 2021 08:58:37 +0000 (14:28 +0530)]
net/bnxt: support EM with FKB
Main TF changes to support EM insert with FKB.
Flexible Key builder is required to create Wild Card
and Exact Match keys for TCAM lookups.
Signed-off-by: Peter Spreadborough <peter.spreadborough@broadcom.com>
Signed-off-by: Randy Schacher <stuart.schacher@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Farah Smith <farah.smith@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Farah Smith [Sun, 30 May 2021 08:58:36 +0000 (14:28 +0530)]
net/bnxt: update TRUFLOW resources
- Remove unused tables from tf_tbl_type
- Encode flow type into flow handle (internal or external)
- Clean up Whitney resource tables
- Clean up Truflow CLI open tables and update Thor resources
- Add Thor SRAM and external pool types to core API
- Remove unneeded Stingray table reference
Signed-off-by: Farah Smith <farah.smith@broadcom.com>
Signed-off-by: Randy Schacher <stuart.schacher@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Jay Ding <jay.ding@broadcom.com>
Reviewed-by: Peter Spreadborough <peter.spreadborough@broadcom.com>
Reviewed-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Jay Ding [Sun, 30 May 2021 08:58:35 +0000 (14:28 +0530)]
net/bnxt: check resource reservation in TRUFLOW
- Allow tf_open to continue if no resource is allocated
for some table type.
- Close the session if binding fails for any table.
- Close the session if no resource is allocated for all tables.
Signed-off-by: Jay Ding <jay.ding@broadcom.com>
Signed-off-by: Randy Schacher <stuart.schacher@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Peter Spreadborough <peter.spreadborough@broadcom.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>
Peter Spreadborough [Sun, 30 May 2021 08:58:34 +0000 (14:28 +0530)]
net/bnxt: add mailbox selection via device operation
Add get mailbox dev op so that mailbox offset is based on device
instead of a hard coded value.
Signed-off-by: Peter Spreadborough <peter.spreadborough@broadcom.com>
Signed-off-by: Randy Schacher <stuart.schacher@broadcom.com>
Signed-off-by: Venkat Duvvuru <venkatkumar.duvvuru@broadcom.com>
Reviewed-by: Farah Smith <farah.smith@broadcom.com>
Acked-by: Ajit Khaparde <ajit.khaparde@broadcom.com>