OSDN Git Service

octeontx2-pf: Refactor schedular queue alloc/free calls
authorHariprasad Kelam <hkelam@marvell.com>
Sat, 13 May 2023 08:51:39 +0000 (14:21 +0530)
committerDavid S. Miller <davem@davemloft.net>
Mon, 15 May 2023 08:31:07 +0000 (09:31 +0100)
commit6b4b2ded9c4282deea421eef144ab0ced954721c
treeae4d08c1d69ecd311aeff17c1fe9d42138d2c248
parentab6dddd2a669a0ecc2ce07485c7a15fadbb5a0aa
octeontx2-pf: Refactor schedular queue alloc/free calls

1. Upon txschq free request, the transmit schedular config in hardware
is not getting reset. This patch adds necessary changes to do the same.

2. Current implementation calls txschq alloc during interface
initialization and in response handler updates the default txschq array.
This creates a problem for htb offload where txsch alloc will be called
for every tc class. This patch addresses the issue by reading txschq
response in mbox caller function instead in the response handler.

3. Current otx2_txschq_stop routine tries to free all txschq nodes
allocated to the interface. This creates a problem for htb offload.
This patch introduces the otx2_txschq_free_one to free txschq in a
given level.

Signed-off-by: Hariprasad Kelam <hkelam@marvell.com>
Signed-off-by: Naveen Mamindlapalli <naveenm@marvell.com>
Signed-off-by: Sunil Kovvuri Goutham <sgoutham@marvell.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.c
drivers/net/ethernet/marvell/octeontx2/nic/otx2_common.h
drivers/net/ethernet/marvell/octeontx2/nic/otx2_pf.c
drivers/net/ethernet/marvell/octeontx2/nic/otx2_vf.c