aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/net/ethernet/marvell/octeontx2/af/rvu_npa.c
AgeCommit message (Collapse)Author
2020-09-15octeontx2-af: Ratelimit prints from AF error interrupt handlersNaveen Mamindlapalli
commit 52f6042c889c8bb8a3743614ab1aab6f002ba8ba from git@git.assembla.com:cavium/WindRiver.linux.git Ratelimit prints from AF error interrupt handlers such as NIX AF error interrupt, NIX AF RVU error interrupt and NPA AF RVU error interrupt handler. This prevents unnecessary flooding of error messages on the console when any AF error interrupt condition triggers continuously. Change-Id: I216ef5c95ba7f320f9e7ed0800adc78044551a8e Signed-off-by: Naveen Mamindlapalli <naveenm@marvell.com> Reviewed-on: https://sj1git1.cavium.com/c/IP/SW/kernel/linux/+/34166 Tested-by: sa_ip-sw-jenkins <sa_ip-sw-jenkins@marvell.com> Reviewed-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Signed-off-by: Ruiqiang Hao <Ruiqiang.Hao@windriver.com>
2020-02-27octeontx2-af: fix backpressure cfg on lf alloc and freeNithin Dabilpuram
commit e4804915b954374aeaa1ab524d3c9b40bd66d5e6 from git@git.assembla.com:cavium/WindRiver.linux.git Explicitly disable backpressure in CQ and Aura contexts during lf teardown to deassert backpressure on link as clearing CQ.ena or AURA.ena is not sufficient. Also enable pause frame config everytime lf is allocated to override previous configurations. Change-Id: Ibe50c11e6e7992e56979bbb9757e2f3cc3c3f519 Signed-off-by: Nithin Dabilpuram <ndabilpuram@marvell.com> Reviewed-on: https://sj1git1.cavium.com/16217 Reviewed-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Tested-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Signed-off-by: Xiaotao Yin <xiaotao.yin@windriver.com>
2020-02-27octeontx2-af: Do not clear NPA_AQ_RES_S too earlySubbaraya Sundeep
commit 22ed4821a7cf30c580aa14040ab14c685633bba1 from git@git.assembla.com:cavium/WindRiver.linux.git When clearing NPA_AQ_RES_S result structure for submitting a new instruction software needs to wait until hardware is done with previous instruction. Otherwise software may clear previous instruction result before interpreting it. Change-Id: Ic409dac909c9eeb162c9b5c7c3ef15b6e243f92d Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com> Reviewed-on: https://sj1git1.cavium.com/12350 Reviewed-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Tested-by: Sunil Kovvuri Goutham <Sunil.Goutham@cavium.com> Signed-off-by: Xiaotao Yin <xiaotao.yin@windriver.com>
2020-02-27octeontx2-af: Add option to disable dynamic entry caching in NDCSunil Goutham
commit 2e95351b0f314c123ec0e8f28e899bb8a2d293ce from git@git.assembla.com:cavium/WindRiver.linux.git A config option is added to disable caching of dynamic entries like SQEs and stack pages. Also locks down all HW contexts in NDC, preventing them from being evicted. This option is useful in reducing number of cache misses thus getting rid of a probability of hitting couple of related HW issues. Note: This config option will result in performance loss Change-Id: I5e0bef0d1ce7b602ced1dc36ba6d7853d769614b Signed-off-by: Sunil Goutham <sgoutham@marvell.com> Signed-off-by: Xiaotao Yin <xiaotao.yin@windriver.com>
2020-02-27octeontx2-af: Support configurable NDC cache way_maskGeetha sowjanya
commit ee1e75915f4ff00e125adf98c9684c57cae4a88f upstream Each of the NIX/NPA LFs can choose which ways of their respective NDC caches should be used to cache their contexts. This enables flexible configurations like disabling caching for a LF, limiting it's context to a certain set of ways etc etc. Separate way_mask for NIX-TX and NIX-RX is not supported. Signed-off-by: Geetha sowjanya <gakula@marvell.com> Signed-off-by: Sunil Goutham <sgoutham@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2020-02-27octeontx2-af: add npa error af interrupt handlersJerin Jacob
commit 006465a47656655824410845002cdb065f978595 from git@git.assembla.com:cavium/WindRiver.linux.git Added debug messages for NPA NPA_AF_RVU_INT, NPA_AF_GEN_INT, NPA_AF_ERR_INT and NPA_AF_RAS error AF interrupts. Change-Id: I612a5e3a81ec6e83e016ed81260111bc1c367b19 Signed-off-by: Jerin Jacob <jerinj@marvell.com> Signed-off-by: Pavan Nikhilesh <pbhagavatula@marvell.com> Signed-off-by: Xiaotao Yin <xiaotao.yin@windriver.com>
2020-02-27octeontx2-af: Add NPA qsize {aura,pool}_contexts to debugfsPrakash Brahmajyosyula
commit ae73da4ca2c6f6b13665bd353d86b2aea6c95478 from git@git.assembla.com:cavium/WindRiver.linux.git To aid in debugging NPA related issues, added support to dump NPA (pool allocator) block LF's aura and pool hardware contexts in debugfs. User can check which contexts are enabled currently and dump it's current HW context. Three new files 'qsize', 'aura_ctx', 'pool_ctx' are added to the debugfs at 'sys/kernel/debug/octeontx2/npa/' "qsize" dumps the current enabled Aura/Pools and corresponding bitmaps. Usage: echo <npalf> > qsize' cat qsize To dump the aura_ctx and pool_ctx 'echo <npalf> [{aura/pool} number/all] > {aura/poll}_ctx' 'cat {aura/pool}_ctx' Change-Id: I7ed3b169f16dd166958f12c9204d4a9a4723a793 Signed-off-by: Prakash Brahmajyosyula <bprakash@marvell.com> Signed-off-by: Christina Jacob <cjacob@marvell.com> Signed-off-by: Xiaotao Yin <xiaotao.yin@windriver.com>
2018-11-19octeontx2-af: Teardown NPA, NIX LF upon receiving FLRGeetha sowjanya
Upon receiving FLR IRQ for a RVU PF, teardown or cleanup resources held by that PF_FUNC. This patch cleans up, NIX LF - Stop ingress/egress traffic - Disable NPC MCAM entries being used. - Free Tx scheduler queues - Disable RQ/SQ/CQ HW contexts NPA LF - Disable Pool/Aura HW contexts In future teardown of SSO/SSOW/TIM/CPT will be added. Also added a mailbox message for a RVU PF to request AF, to perform FLR for a RVU VF under it. Signed-off-by: Geetha sowjanya <gakula@marvell.com> Signed-off-by: Stanislaw Kardach <skardach@marvell.com> Signed-off-by: Sunil Goutham <sgoutham@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-11-19octeontx2-af: Convert mbox handlers APIs to lowercaseSunil Goutham
This patch converts all mailbox message handler API names to lowercase. Signed-off-by: Sunil Goutham <sgoutham@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-10-22octeontx2-af: Remove set but not used variable 'block'YueHaibing
Fixes gcc '-Wunused-but-set-variable' warning: drivers/net/ethernet/marvell/octeontx2/af/rvu_npa.c: In function 'rvu_npa_init': drivers/net/ethernet/marvell/octeontx2/af/rvu_npa.c:446:20: warning: variable 'block' set but not used [-Wunused-but-set-variable] It never used since introduction in commit 7a37245ef23f ("octeontx2-af: NPA block admin queue init") Signed-off-by: YueHaibing <yuehaibing@huawei.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-10-17octeontx2-af: Support for disabling NPA Aura/Pool contextsGeetha sowjanya
This patch adds support for a RVU PF/VF to disable all Aura/Pool contexts of a NPA LF via mbox. This will be used by PF/VF drivers upon teardown or while freeing up HW resources. A HW context which is not INIT'ed cannot be modified and a RVU PF/VF driver may or may not INIT all the Aura/Pool contexts. So a bitmap is introduced to keep track of enabled NPA Aura/Pool contexts, so that only enabled hw contexts are disabled upon LF teardown. Signed-off-by: Geetha sowjanya <gakula@marvell.com> Signed-off-by: Stanislaw Kardach <skardach@marvell.com> Signed-off-by: Sunil Goutham <sgoutham@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-10-17octeontx2-af: NPA AQ instruction enqueue supportSunil Goutham
Add support for a RVU PF/VF to submit instructions to NPA AQ via mbox. Instructions can be to init/write/read Aura/Pool/Qint contexts. In case of read, context will be returned as part of response to the mbox msg received. Signed-off-by: Sunil Goutham <sgoutham@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-10-17octeontx2-af: NPA block LF initializationSunil Goutham
Upon receiving NPA_LF_ALLOC mbox message allocate memory for NPALF's aura, pool and qint contexts and configure the same to HW. Enable caching of contexts into NPA NDC. Return pool related info like stack size, num pointers per stack page e.t.c to the mbox msg sender. Signed-off-by: Sunil Goutham <sgoutham@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net>
2018-10-17octeontx2-af: NPA block admin queue initSunil Goutham
Initialize NPA admin queue (AQ) i.e alloc memory for AQ instructions and for the results. All NPA LFs will submit instructions to AQ to init/write/read Aura/Pool contexts and in case of read, get context from result memory. Added some common APIs for allocating memory for a queue and get IOVA in return, these APIs will be used by NIX AQ and for other purposes. Signed-off-by: Sunil Goutham <sgoutham@marvell.com> Signed-off-by: David S. Miller <davem@davemloft.net>