From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Miller Subject: Re: [PATCH] octeon_mgmt: Fix MIX registers configuration on MTU setup Date: Wed, 18 Jul 2018 13:13:41 +0900 (KST) Message-ID: <20180718.131341.1949854699503730806.davem@davemloft.net> References: <20180713153150.2414-1-alexander.sverdlin@nokia.com> Mime-Version: 1.0 Content-Type: Text/Plain; charset=us-ascii Content-Transfer-Encoding: 7bit Cc: netdev@vger.kernel.org, alexander.sverdlin@nsn.com, steven.hill@cavium.com To: alexander.sverdlin@nokia.com Return-path: Received: from shards.monkeyblade.net ([23.128.96.9]:56896 "EHLO shards.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725975AbeGREtd (ORCPT ); Wed, 18 Jul 2018 00:49:33 -0400 In-Reply-To: <20180713153150.2414-1-alexander.sverdlin@nokia.com> Sender: netdev-owner@vger.kernel.org List-ID: From: Alexander Sverdlin Date: Fri, 13 Jul 2018 17:31:50 +0200 > From: Alexander Sverdlin > > octeon_mgmt driver doesn't drop RX frames that are 1-4 bytes bigger than > MTU set for the corresponding interface. The problem is in the > AGL_GMX_RX0/1_FRM_MAX register setting, which should not account for VLAN > tagging. > > According to Octeon HW manual: > "For tagged frames, MAX increases by four bytes for each VLAN found up to a > maximum of two VLANs, or MAX + 8 bytes." > > OCTEON_FRAME_HEADER_LEN "define" is fine for ring buffer management, but > should not be used for AGL_GMX_RX0/1_FRM_MAX. > > The problem could be easily reproduced using "ping" command. If affected > system has default MTU 1500, other host (having MTU >= 1504) can > successfully "ping" the affected system with payload size 1473-1476, > resulting in IP packets of size 1501-1504 accepted by the mgmt driver. > Fixed system still accepts IP packets of 1500 bytes even with VLAN tagging, > because the limits are lifted in HW as expected, for every VLAN tag. > > Signed-off-by: Alexander Sverdlin Applied, thank you.