162306a36Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0-only
262306a36Sopenharmony_ci#
362306a36Sopenharmony_ci# Microchip VCAP API configuration
462306a36Sopenharmony_ci#
562306a36Sopenharmony_ci
662306a36Sopenharmony_ciif NET_VENDOR_MICROCHIP
762306a36Sopenharmony_ci
862306a36Sopenharmony_ciconfig VCAP
962306a36Sopenharmony_ci	bool "VCAP (Versatile Content-Aware Processor) library"
1062306a36Sopenharmony_ci	help
1162306a36Sopenharmony_ci	  Provides the basic VCAP functionality for multiple Microchip switchcores
1262306a36Sopenharmony_ci
1362306a36Sopenharmony_ci	  A VCAP is essentially a TCAM with rules consisting of
1462306a36Sopenharmony_ci
1562306a36Sopenharmony_ci	    - Programmable key fields
1662306a36Sopenharmony_ci	    - Programmable action fields
1762306a36Sopenharmony_ci	    - A counter (which may be only one bit wide)
1862306a36Sopenharmony_ci
1962306a36Sopenharmony_ci	  Besides this each VCAP has:
2062306a36Sopenharmony_ci
2162306a36Sopenharmony_ci	    - A number of lookups
2262306a36Sopenharmony_ci	    - A keyset configuration per port per lookup
2362306a36Sopenharmony_ci
2462306a36Sopenharmony_ci	  The VCAP implementation provides switchcore independent handling of rules
2562306a36Sopenharmony_ci	  and supports:
2662306a36Sopenharmony_ci
2762306a36Sopenharmony_ci	    - Creating and deleting rules
2862306a36Sopenharmony_ci	    - Updating and getting rules
2962306a36Sopenharmony_ci
3062306a36Sopenharmony_ci	  The platform specific configuration as well as the platform specific model
3162306a36Sopenharmony_ci	  of the VCAP instances are attached to the VCAP API and a client can then
3262306a36Sopenharmony_ci	  access rules via the API in a platform independent way, with the
3362306a36Sopenharmony_ci	  limitations that each VCAP has in terms of its supported keys and actions.
3462306a36Sopenharmony_ci
3562306a36Sopenharmony_ci	  Different switchcores will have different VCAP instances with different
3662306a36Sopenharmony_ci	  characteristics. Look in the datasheet for the VCAP specifications for the
3762306a36Sopenharmony_ci	  specific switchcore.
3862306a36Sopenharmony_ci
3962306a36Sopenharmony_ciconfig VCAP_KUNIT_TEST
4062306a36Sopenharmony_ci	bool "KUnit test for VCAP library" if !KUNIT_ALL_TESTS
4162306a36Sopenharmony_ci	depends on KUNIT
4262306a36Sopenharmony_ci	depends on KUNIT=y && VCAP=y && y
4362306a36Sopenharmony_ci	select DEBUG_FS
4462306a36Sopenharmony_ci	default KUNIT_ALL_TESTS
4562306a36Sopenharmony_ci	help
4662306a36Sopenharmony_ci	  This builds unit tests for the VCAP library.
4762306a36Sopenharmony_ci
4862306a36Sopenharmony_ci	  For more information on KUnit and unit tests in general, please refer
4962306a36Sopenharmony_ci	  to the KUnit documentation in Documentation/dev-tools/kunit/.
5062306a36Sopenharmony_ci
5162306a36Sopenharmony_ci	  If unsure, say N.
5262306a36Sopenharmony_ci
5362306a36Sopenharmony_ciendif # NET_VENDOR_MICROCHIP
54