[dpdk-dev] net/e1000: fix checksum valid flags error
Checks
Commit Message
This problem is caused by a missing set of E1000_RXCSUM_CRCOFL
in eth_igb_rx_init(), it should be set to enable SCTP packet
L4 checksum.If it is not set, the printf message in cksum fwd
about L4 SCTP cksum flag is error.
Fixes: d15fcf76c8b7 ("net/e1000: move to drivers/net/")
Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
---
drivers/net/e1000/igb_rxtx.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
Comments
Hi Wei,
> -----Original Message-----
> From: Zhao1, Wei
> Sent: Tuesday, May 2, 2017 10:46 AM
> To: dev@dpdk.org
> Cc: Lu, Wenzhuo; Zhao1, Wei
> Subject: [PATCH] net/e1000: fix checksum valid flags error
>
> This problem is caused by a missing set of E1000_RXCSUM_CRCOFL in
> eth_igb_rx_init(), it should be set to enable SCTP packet
> L4 checksum.If it is not set, the printf message in cksum fwd about L4 SCTP
> cksum flag is error.
It's not quite clear what's the issue. Would you like to add more details? Thanks.
>
> Fixes: d15fcf76c8b7 ("net/e1000: move to drivers/net/")
Seems it's not the right patch. Suppose this patch only moves the files.
>
> Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
> ---
> drivers/net/e1000/igb_rxtx.c | 7 ++++---
> 1 file changed, 4 insertions(+), 3 deletions(-)
>
> diff --git a/drivers/net/e1000/igb_rxtx.c b/drivers/net/e1000/igb_rxtx.c index
> b3b601b..6c2749b 100644
> --- a/drivers/net/e1000/igb_rxtx.c
> +++ b/drivers/net/e1000/igb_rxtx.c
> @@ -2402,10 +2402,11 @@ eth_igb_rx_init(struct rte_eth_dev *dev)
>
> /* Enable both L3/L4 rx checksum offload */
> if (dev->data->dev_conf.rxmode.hw_ip_checksum)
> - rxcsum |= (E1000_RXCSUM_IPOFL | E1000_RXCSUM_TUOFL);
> + rxcsum |= (E1000_RXCSUM_IPOFL | E1000_RXCSUM_TUOFL |
> + E1000_RXCSUM_CRCOFL);
> else
> - rxcsum &= ~(E1000_RXCSUM_IPOFL | E1000_RXCSUM_TUOFL);
> - E1000_WRITE_REG(hw, E1000_RXCSUM, rxcsum);
> + rxcsum &= ~(E1000_RXCSUM_IPOFL | E1000_RXCSUM_TUOFL
> |
> + E1000_RXCSUM_CRCOFL);
>
> /* Setup the Receive Control Register. */
> if (dev->data->dev_conf.rxmode.hw_strip_crc) {
> --
> 2.9.3
Hi, wenzhuo
> -----Original Message-----
> From: Lu, Wenzhuo
> Sent: Tuesday, May 2, 2017 4:14 PM
> To: Zhao1, Wei <wei.zhao1@intel.com>; dev@dpdk.org
> Subject: RE: [PATCH] net/e1000: fix checksum valid flags error
>
> Hi Wei,
>
> > -----Original Message-----
> > From: Zhao1, Wei
> > Sent: Tuesday, May 2, 2017 10:46 AM
> > To: dev@dpdk.org
> > Cc: Lu, Wenzhuo; Zhao1, Wei
> > Subject: [PATCH] net/e1000: fix checksum valid flags error
> >
> > This problem is caused by a missing set of E1000_RXCSUM_CRCOFL in
> > eth_igb_rx_init(), it should be set to enable SCTP packet
> > L4 checksum.If it is not set, the printf message in cksum fwd about L4
> > SCTP cksum flag is error.
> It's not quite clear what's the issue. Would you like to add more details?
> Thanks.
>
> >
> > Fixes: d15fcf76c8b7 ("net/e1000: move to drivers/net/")
> Seems it's not the right patch. Suppose this patch only moves the files.
I will fix it in v2.
>
> >
> > Signed-off-by: Wei Zhao <wei.zhao1@intel.com>
> > ---
> > drivers/net/e1000/igb_rxtx.c | 7 ++++---
> > 1 file changed, 4 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/net/e1000/igb_rxtx.c
> > b/drivers/net/e1000/igb_rxtx.c index b3b601b..6c2749b 100644
> > --- a/drivers/net/e1000/igb_rxtx.c
> > +++ b/drivers/net/e1000/igb_rxtx.c
> > @@ -2402,10 +2402,11 @@ eth_igb_rx_init(struct rte_eth_dev *dev)
> >
> > /* Enable both L3/L4 rx checksum offload */
> > if (dev->data->dev_conf.rxmode.hw_ip_checksum)
> > - rxcsum |= (E1000_RXCSUM_IPOFL |
> E1000_RXCSUM_TUOFL);
> > + rxcsum |= (E1000_RXCSUM_IPOFL | E1000_RXCSUM_TUOFL
> |
> > + E1000_RXCSUM_CRCOFL);
> > else
> > - rxcsum &= ~(E1000_RXCSUM_IPOFL |
> E1000_RXCSUM_TUOFL);
> > - E1000_WRITE_REG(hw, E1000_RXCSUM, rxcsum);
> > + rxcsum &= ~(E1000_RXCSUM_IPOFL |
> E1000_RXCSUM_TUOFL
> > |
> > + E1000_RXCSUM_CRCOFL);
> >
> > /* Setup the Receive Control Register. */
> > if (dev->data->dev_conf.rxmode.hw_strip_crc) {
> > --
> > 2.9.3
@@ -2402,10 +2402,11 @@ eth_igb_rx_init(struct rte_eth_dev *dev)
/* Enable both L3/L4 rx checksum offload */
if (dev->data->dev_conf.rxmode.hw_ip_checksum)
- rxcsum |= (E1000_RXCSUM_IPOFL | E1000_RXCSUM_TUOFL);
+ rxcsum |= (E1000_RXCSUM_IPOFL | E1000_RXCSUM_TUOFL |
+ E1000_RXCSUM_CRCOFL);
else
- rxcsum &= ~(E1000_RXCSUM_IPOFL | E1000_RXCSUM_TUOFL);
- E1000_WRITE_REG(hw, E1000_RXCSUM, rxcsum);
+ rxcsum &= ~(E1000_RXCSUM_IPOFL | E1000_RXCSUM_TUOFL |
+ E1000_RXCSUM_CRCOFL);
/* Setup the Receive Control Register. */
if (dev->data->dev_conf.rxmode.hw_strip_crc) {