diff mbox series

[net] octeontx2-pf: Reduce minimum mtu size to 60

Message ID 20220728123812.21974-1-naveenm@marvell.com (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series [net] octeontx2-pf: Reduce minimum mtu size to 60 | expand

Checks

Context Check Description
netdev/tree_selection success Clearly marked for net
netdev/fixes_present fail Series targets non-next tree, but doesn't contain any Fixes tags
netdev/subject_prefix success Link
netdev/cover_letter success Single patches do not need cover letters
netdev/patch_count success Link
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 0 this patch: 0
netdev/cc_maintainers warning 2 maintainers not CCed: gakula@marvell.com hkelam@marvell.com
netdev/build_clang success Errors and warnings before: 0 this patch: 0
netdev/module_param success Was 0 now: 0
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 14 this patch: 14
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 8 lines checked
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Naveen Mamindlapalli July 28, 2022, 12:38 p.m. UTC
From: Subbaraya Sundeep <sbhatta@marvell.com>

PTP messages like SYNC, FOLLOW_UP, DELAY_REQ are of size 58 bytes.
Using a minimum packet length as 64 makes NIX to pad 6 bytes of
zeroes while transmission. This is causing latest ptp4l application to
emit errors since length in PTP header and received packet are not same.
Padding upto 3 bytes is fine but more than that makes ptp4l to assume
the pad bytes as a TLV. Hence reduce the size to 60 from 64.

Signed-off-by: Subbaraya Sundeep <sbhatta@marvell.com>
Signed-off-by: Sunil Kovvuri Goutham <sgoutham@marvell.com>
---
 drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Andrew Lunn July 28, 2022, 9:57 p.m. UTC | #1
On Thu, Jul 28, 2022 at 06:08:12PM +0530, Naveen Mamindlapalli wrote:
> From: Subbaraya Sundeep <sbhatta@marvell.com>
> 
> PTP messages like SYNC, FOLLOW_UP, DELAY_REQ are of size 58 bytes.
> Using a minimum packet length as 64 makes NIX to pad 6 bytes of
> zeroes while transmission. This is causing latest ptp4l application to
> emit errors since length in PTP header and received packet are not same.
> Padding upto 3 bytes is fine but more than that makes ptp4l to assume
> the pad bytes as a TLV. Hence reduce the size to 60 from 64.

Please Cc: the PTP maintainer for changes like this.

I also don't follow your explanation. At least for the original 802.3,
you had to pad packets shorter than 64 bytes, otherwise CSMA/CD did
not work. So i would expect PTP messages should be padded to 64?

Or is you hardware doing the padding wrong, and this is a workaround
for that bug?

    Andrew
Subbaraya Sundeep July 29, 2022, 9:33 a.m. UTC | #2
Hi Andrew,

Added PTP maintainer also in v2. We fixed this to work with latest ptp4l since after debugging we found
ptp4l complains bad message for Sync packets. 
Lets hear from Richard.

Thanks,
Sundeep
diff mbox series

Patch

diff --git a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.h b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.h
index c88e8a436029..fbe62bbfb789 100644
--- a/drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.h
+++ b/drivers/net/ethernet/marvell/octeontx2/nic/otx2_txrx.h
@@ -21,7 +21,7 @@ 
 #define OTX2_HEAD_ROOM		OTX2_ALIGN
 
 #define	OTX2_ETH_HLEN		(VLAN_ETH_HLEN + VLAN_HLEN)
-#define	OTX2_MIN_MTU		64
+#define	OTX2_MIN_MTU		60
 
 #define OTX2_MAX_GSO_SEGS	255
 #define OTX2_MAX_FRAGS_IN_SQE	9