On 9/8/2021 9:37 AM, Jiawen Wu wrote: > Support IP/L4 checksum on Rx, and convert it to mbuf flags. > > Signed-off-by: Jiawen Wu <jiawe...@trustnetic.com> > --- > doc/guides/nics/features/ngbe.ini | 2 + > doc/guides/nics/ngbe.rst | 1 + > drivers/net/ngbe/ngbe_rxtx.c | 75 +++++++++++++++++++++++++++++-- > 3 files changed, 75 insertions(+), 3 deletions(-) > > diff --git a/doc/guides/nics/features/ngbe.ini > b/doc/guides/nics/features/ngbe.ini > index f85754eb7a..2777ed5a62 100644 > --- a/doc/guides/nics/features/ngbe.ini > +++ b/doc/guides/nics/features/ngbe.ini > @@ -9,6 +9,8 @@ Link status = Y > Link status event = Y > Queue start/stop = Y > Scattered Rx = Y > +L3 checksum offload = P > +L4 checksum offload = P
Why partially supported? Can you please details in the commit log. <...> > +static inline uint64_t > +rx_desc_error_to_pkt_flags(uint32_t rx_status) > +{ > + uint64_t pkt_flags = 0; > + > + /* checksum offload can't be disabled */ > + if (rx_status & NGBE_RXD_STAT_IPCS) { > + pkt_flags |= (rx_status & NGBE_RXD_ERR_IPCS > + ? PKT_RX_IP_CKSUM_BAD : PKT_RX_IP_CKSUM_GOOD); > + } > + > + if (rx_status & NGBE_RXD_STAT_L4CS) { > + pkt_flags |= (rx_status & NGBE_RXD_ERR_L4CS > + ? PKT_RX_L4_CKSUM_BAD : PKT_RX_L4_CKSUM_GOOD); > + } > + > + if (rx_status & NGBE_RXD_STAT_EIPCS && > + rx_status & NGBE_RXD_ERR_EIPCS) { You can join both lines and can drop the {} for the single line if block.