[PATCH] net/nfp: add support of UDP fragmentation offload

Morten Brørup mb at smartsharesystems.com
Sat Feb 17 19:02:30 CET 2024


> From: Stephen Hemminger [mailto:stephen at networkplumber.org]
> Sent: Saturday, 17 February 2024 17.47
> 
> On Sat, 17 Feb 2024 09:54:10 +0800
> Chaoyong He <chaoyong.he at corigine.com> wrote:
> 
> > Add the support of UDP fragmentation offload feature.
> >
> > Signed-off-by: Chaoyong He <chaoyong.he at corigine.com>
> > Reviewed-by: Long Wu <long.wu at corigine.com>
> > Reviewed-by: Peng Zhang <peng.zhang at corigine.com>
> > ---
> >  drivers/common/nfp/nfp_common_ctrl.h | 1 +
> >  drivers/net/nfp/nfd3/nfp_nfd3_dp.c   | 7 ++++++-
> >  drivers/net/nfp/nfdk/nfp_nfdk_dp.c   | 8 +++++---
> >  drivers/net/nfp/nfp_net_common.c     | 8 ++++++--
> >  4 files changed, 18 insertions(+), 6 deletions(-)
> 
> Looks like this depends on earlier patch, it does not apply directly to
> main branch.
> 
> > -	if ((ol_flags & RTE_MBUF_F_TX_TCP_SEG) == 0)
> > +	if ((ol_flags & RTE_MBUF_F_TX_TCP_SEG) == 0 &&
> > +			(ol_flags & RTE_MBUF_F_TX_UDP_SEG) == 0)
> >  		goto clean_txd;
> 
> That is odd indentation style.

Not formally... it follows the official DPDK Coding Style [1].

[1]: https://doc.dpdk.org/guides/contributing/coding_style.html#general

> Should be:
> 
> 	if ((ol_flags & RTE_MBUF_F_TX_TCP_SEG) == 0 &&
> 	    (ol_flags & RTE_MBUF_F_TX_UDP_SEG) == 0)
> 		goto clean_txd;

This indentation style is mentioned as an alternative in the guide. But the example in the guide also uses two tabs for a similar long comparison.

Personally, I also prefer the style suggested by Stephen, so we might want to update the Coding Style. ;-)



More information about the dev mailing list