DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] RX checksum offloading
@ 2013-11-07  0:00 Benson, Bryan
  2013-11-07  3:09 ` Benson, Bryan
  0 siblings, 1 reply; 8+ messages in thread
From: Benson, Bryan @ 2013-11-07  0:00 UTC (permalink / raw)
  To: dev

All,
Has anyone had any experience with hardware checksum offloads not working?  It appears that the combination of settings we are using in our application may be the crux of the issue, as offloading test-pmd application in csum mode correctly identifies bad packets via the ol_flags.  I am a bit stumped in tracking it down, any help is greatly appreciated!

We are using the 82599 NIC & DPDK 1.3 (with RSC disabled).

Settings:


/* Ethernet Configuration */
static struct rte_eth_conf port_conf = {
    .rxmode = {
        .split_hdr_size = 0,
        .header_split   = 0, /**< Header Split disabled */
        .hw_ip_checksum = 1, /**< IP/UDP/TCP checksum offload enabled. */
        .hw_vlan_filter = 0, /**< VLAN filtering disabled */
        .jumbo_frame    = 0, /**< Jumbo Frame Support disabled */
        .hw_strip_crc   = 1, /**< CRC stripped by hardware */
    },
    .rx_adv_conf = {
        .rss_conf = {
            .rss_key = NULL,
            .rss_hf  = 0x00,
        },
    },
    .txmode = {
    },
};

Thank you,
Bryan Benson
Amazon Web Services

^ permalink raw reply	[flat|nested] 8+ messages in thread
* Re: [dpdk-dev] RX checksum offloading
@ 2013-11-07 21:50 Benson, Bryan
  2013-11-08 10:27 ` Thomas Monjalon
  0 siblings, 1 reply; 8+ messages in thread
From: Benson, Bryan @ 2013-11-07 21:50 UTC (permalink / raw)
  To: dev

All,
I have prepared a patch for the issue.  If it is not in the correct format, please advise.  I also changed the array to be uint32_t to be consistent with the other functions that pull the status flags.

== PATCH BEGIN ==
>From 2ab73e88d92044c1d840f896d87e9a8cbcf29ce4 Mon Sep 17 00:00:00 2001
From: Bryan Benson <bmbenson@amazon.com>
Date: Thu, 7 Nov 2013 21:38:57 +0000
Subject: [PATCH] Do not unset the status bits in the scan_hw_ring function
 when counting the number of done descriptors.

---
 inteldpdk/DPDK/lib/librte_pmd_ixgbe/ixgbe_rxtx.c |   13 +++++++------
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/inteldpdk/DPDK/lib/librte_pmd_ixgbe/ixgbe_rxtx.c b/inteldpdk/DPDK/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
index 2be9979..c4abf9a 100755
--- a/inteldpdk/DPDK/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
+++ b/inteldpdk/DPDK/lib/librte_pmd_ixgbe/ixgbe_rxtx.c
@@ -1037,7 +1037,8 @@ ixgbe_rx_scan_hw_ring(struct igb_rx_queue *rxq)
        struct igb_rx_entry *rxep;
        struct rte_mbuf *mb;
        uint16_t pkt_len;
-       int s[LOOK_AHEAD], nb_dd;
+       uint32_t s[LOOK_AHEAD];
+       int nb_dd;
        int i, j, nb_rx = 0;
 
 
@@ -1060,12 +1061,12 @@ ixgbe_rx_scan_hw_ring(struct igb_rx_queue *rxq)
                for (j = LOOK_AHEAD-1; j >= 0; --j)
                        s[j] = rxdp[j].wb.upper.status_error;
 
-               /* Clear everything but the status bits (LSB) */
-               for (j = 0; j < LOOK_AHEAD; ++j)
-                       s[j] &= IXGBE_RXDADV_STAT_DD;
+               nb_dd = 0;
+               /* add to nd_dd when the status bit is set (LSB) */
+               for (j = 0; j < LOOK_AHEAD; ++j) {
+                       nb_dd += s[j] & IXGBE_RXDADV_STAT_DD;
+               }
 
-               /* Compute how many status bits were set */
-               nb_dd = s[0]+s[1]+s[2]+s[3]+s[4]+s[5]+s[6]+s[7];
                nb_rx += nb_dd;
 
                /* Translate descriptor info to mbuf format */
-- 
1.7.9.5

== PATCH END ==

A validation text email will follow.

Thank you,
Bryan Benson
Amazon Web Services
________________________________________
From: Thomas Monjalon [thomas.monjalon@6wind.com]
Sent: Thursday, November 07, 2013 3:44 AM
To: Benson, Bryan
Cc: dev@dpdk.org; LiuFeng
Subject: Re: [dpdk-dev] RX checksum offloading

07/11/2013 10:06, Thomas Monjalon :
> 07/11/2013 04:44, Benson, Bryan :
> >   RX queues=1 - RX desc=1024 - RX free threshold=16
> >
> > ---------------------- Forward statistics for port 0
> >
> >  RX-total: 543761 Bad-ipcsum: 543558         Bad-l4csum: 0
> >
> > ---------------------- Forward statistics for port 1
> >
> >  RX-total: 542226 Bad-ipcsum: 0              Bad-l4csum: 542005
> >
> >   RX queues=1 - RX desc=1024 - RX free threshold=32
> >
> > ---------------------- Forward statistics for port 0
> >
> >  RX-total: 378894 Bad-ipcsum: 0              Bad-l4csum: 0
> >
> > ---------------------- Forward statistics for port 1
> >
> >  RX-total: 381197 Bad-ipcsum: 0              Bad-l4csum: 0
>
> Excellent report, thank you !
>
> We need to fix it now :)

LiuFeng had seen this issue with additonal comments:
        http://www.dpdk.org/ml/archives/dev/2013-September/000529.html

--
Thomas



^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2013-11-08 10:27 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-11-07  0:00 [dpdk-dev] RX checksum offloading Benson, Bryan
2013-11-07  3:09 ` Benson, Bryan
2013-11-07  3:44   ` Benson, Bryan
2013-11-07  9:06     ` Thomas Monjalon
2013-11-07 11:44       ` Thomas Monjalon
2013-11-07 21:53         ` Benson, Bryan
2013-11-07 21:50 Benson, Bryan
2013-11-08 10:27 ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).