OSDN Git Service

nfp: remove pessimistic NFP_QCP_MAX_ADD limits
authorChristo du Toit <christo.du.toit@netronome.com>
Fri, 11 Mar 2022 10:42:57 +0000 (11:42 +0100)
committerJakub Kicinski <kuba@kernel.org>
Sat, 12 Mar 2022 07:10:21 +0000 (23:10 -0800)
commitf6df1aa628f577ef03a917b3682bd20bcb939f05
tree0282d1dc62d8f3b76e6b43db3196b813a6c6a17c
parent940ea0eae31b67d8da19e3e944f4f99cb3fb514c
nfp: remove pessimistic NFP_QCP_MAX_ADD limits

Multiple writes cause intermediate pointer values that do not
end on complete TX descriptors.

The QCP peripheral on the NFP provides a number of access
modes.  In some access modes, the maximum amount to add must
be restricted to a 6bit value.  The particular access mode
used by _nfp_qcp_ptr_add() has no such restrictions, so the
"< NFP_QCP_MAX_ADD" test is unnecessary.

Note that trying to add more that the configured ring size
in a single add will cause a QCP overflow, caught and handled
by the QCP peripheral.

Signed-off-by: Christo du Toit <christo.du.toit@netronome.com>
Signed-off-by: Jakub Kicinski <jakub.kicinski@netronome.com>
Signed-off-by: Fei Qin <fei.qin@corigine.com>
Signed-off-by: Simon Horman <simon.horman@corigine.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/netronome/nfp/nfp_net.h