From: Simon Horman <horms@kernel.org>
To: Abhishek Chauhan <quic_abchauha@quicinc.com>
Cc: Alexandre Torgue <alexandre.torgue@foss.st.com>,
Jose Abreu <joabreu@synopsys.com>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org,
Andrew Halaney <ahalaney@redhat.com>,
Ong@qualcomm.com, Boon Leong <boon.leong.ong@intel.com>,
Mohammad Athari Bin Ismail <mohammad.athari.ismail@intel.com>,
Wong Vee Khee <vee.khee.wong@linux.intel.com>,
Tan Tee Min <tee.min.tan@linux.intel.com>,
Jon Hunter <jonathanh@nvidia.com>,
kernel@quicinc.com
Subject: Re: [PATCH net-next v2] net: stmmac: Programming sequence for VLAN packets with split header
Date: Thu, 17 Oct 2024 15:25:33 +0100 [thread overview]
Message-ID: <20241017142533.GS1697@kernel.org> (raw)
In-Reply-To: <20241016234313.3992214-1-quic_abchauha@quicinc.com>
On Wed, Oct 16, 2024 at 04:43:13PM -0700, Abhishek Chauhan wrote:
> Currently reset state configuration of split header works fine for
> non-tagged packets and we see no corruption in payload of any size
>
> We need additional programming sequence with reset configuration to
> handle VLAN tagged packets to avoid corruption in payload for packets
> of size greater than 256 bytes.
>
> Without this change ping application complains about corruption
> in payload when the size of the VLAN packet exceeds 256 bytes.
>
> With this change tagged and non-tagged packets of any size works fine
> and there is no corruption seen.
>
> Current configuration which has the issue for VLAN packet
> ----------------------------------------------------------
>
> Split happens at the position at Layer 3 header
> |MAC-DA|MAC-SA|Vlan Tag|Ether type|IP header|IP data|Rest of the payload|
> 2 bytes ^
> |
>
> With the fix we are making sure that the split happens now at
> Layer 2 which is end of ethernet header and start of IP payload
>
> Ip traffic split
> -----------------
>
> Bits which take care of this are SPLM and SPLOFST
> SPLM = Split mode is set to Layer 2
> SPLOFST = These bits indicate the value of offset from the beginning
> of Length/Type field at which header split should take place when the
> appropriate SPLM is selected. Reset value is 2bytes.
>
> Un-tagged data (without VLAN)
> |MAC-DA|MAC-SA|Ether type|IP header|IP data|Rest of the payload|
> 2bytes ^
> |
>
> Tagged data (with VLAN)
> |MAC-DA|MAC-SA|VLAN Tag|Ether type|IP header|IP data|Rest of the payload|
> 2bytes ^
> |
>
> Non-IP traffic split such AV packet
> ------------------------------------
>
> Bits which take care of this are
> SAVE = Split AV Enable
> SAVO = Split AV Offset, similar to SPLOFST but this is for AVTP
> packets.
>
> |Preamble|MAC-DA|MAC-SA|VLAN tag|Ether type|IEEE 1722 payload|CRC|
> 2bytes ^
> |
>
> Signed-off-by: Abhishek Chauhan <quic_abchauha@quicinc.com>
> ---
> Changes since v1
> - took care of comments from Simon on FIELD_PREP
> - explained the details of l2 and l3 split as requested by Andrew
> - Added folks from intel and Nvidia who disabled split header
> need to check if they faced similar issues and if this fix
> can help them too.
>
> Changes since v0
> - The reason for posting it on net-next is to enable this new feature.
Reviewed-by: Simon Horman <horms@kernel.org>
next prev parent reply other threads:[~2024-10-17 14:25 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-10-16 23:43 [PATCH net-next v2] net: stmmac: Programming sequence for VLAN packets with split header Abhishek Chauhan
2024-10-17 14:25 ` Simon Horman [this message]
2024-10-22 11:00 ` patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20241017142533.GS1697@kernel.org \
--to=horms@kernel.org \
--cc=Ong@qualcomm.com \
--cc=ahalaney@redhat.com \
--cc=alexandre.torgue@foss.st.com \
--cc=boon.leong.ong@intel.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=joabreu@synopsys.com \
--cc=jonathanh@nvidia.com \
--cc=kernel@quicinc.com \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=mohammad.athari.ismail@intel.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=quic_abchauha@quicinc.com \
--cc=tee.min.tan@linux.intel.com \
--cc=vee.khee.wong@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.