]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
octeontx2-af: SDP: fix receive link config
authorHariprasad Kelam <hkelam@marvell.com>
Thu, 17 Aug 2023 06:30:06 +0000 (12:00 +0530)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 30 Aug 2023 12:52:29 +0000 (14:52 +0200)
[ Upstream commit 05f3d5bc23524bed6f043dfe6b44da687584f9fb ]

On SDP interfaces, frame oversize and undersize errors are
observed as driver is not considering packet sizes of all
subscribers of the link before updating the link config.

This patch fixes the same.

Fixes: 9b7dd87ac071 ("octeontx2-af: Support to modify min/max allowed packet lengths")
Signed-off-by: Hariprasad Kelam <hkelam@marvell.com>
Signed-off-by: Sunil Goutham <sgoutham@marvell.com>
Reviewed-by: Leon Romanovsky <leonro@nvidia.com>
Link: https://lore.kernel.org/r/20230817063006.10366-1-hkelam@marvell.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/net/ethernet/marvell/octeontx2/af/rvu_nix.c

index 8cdf91a5bf44f3cdf5270e8eb11b5d06886a7fd4..49c1dbe5ec788cfec44ffaaaea2ac4b11748b4e9 100644 (file)
@@ -4016,9 +4016,10 @@ rx_frscfg:
        if (link < 0)
                return NIX_AF_ERR_RX_LINK_INVALID;
 
-       nix_find_link_frs(rvu, req, pcifunc);
 
 linkcfg:
+       nix_find_link_frs(rvu, req, pcifunc);
+
        cfg = rvu_read64(rvu, blkaddr, NIX_AF_RX_LINKX_CFG(link));
        cfg = (cfg & ~(0xFFFFULL << 16)) | ((u64)req->maxlen << 16);
        if (req->update_minlen)