From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from rout1.hes.trendmicro.com (rout1.hes.trendmicro.com [54.67.23.0]) by dpdk.org (Postfix) with ESMTP id 4141B1B7BB for ; Thu, 8 Feb 2018 15:11:07 +0100 (CET) Received: from 0.0.0.0_hes.trendmicro.com (unknown [10.64.10.15]) by rout1.hes.trendmicro.com (Postfix) with SMTP id 36BECEFC045; Thu, 8 Feb 2018 14:11:06 +0000 (UTC) Received: from mail9.mithiskyconnect.com (unknown [52.77.115.137]) by relay2.hes.trendmicro.com (Postfix) with ESMTP id 16D3D9F619B; Thu, 8 Feb 2018 14:11:05 +0000 (UTC) Received: from mail9.mithiskyconnect.com (localhost.localdomain [127.0.0.1]) by mail9.mithiskyconnect.com (SMF) with ESMTP id 613972C008E; Thu, 8 Feb 2018 19:41:04 +0530 (IST) Received: from mail9.mithi.com (localhost.localdomain [127.0.0.1]) by mail9.mithiskyconnect.com (bulkSplit) with ESMTP id 563F32C008B; Thu, 8 Feb 2018 19:41:04 +0530 (IST) Received: from 127.0.0.1 by awsMail9 (envelope-from , uid 0) with qmail-scanner-1.25 (clamscan: 0.60. Clear:RC:1(127.0.0.1):. Processed in 0.021001 secs); 08 Feb 2018 14:11:04 -0000 Received: from unknown (HELO awsMail9) ([127.0.0.1]) (envelope-sender ) by 0 (qmail-ldap-1.03) with SMTP for ; 8 Feb 2018 14:11:04 -0000 Date: Thu, 8 Feb 2018 19:41:04 +0530 (IST) From: Heena Sirwani To: users@dpdk.org, sharanya k Message-ID: <243287365.13423.1518099064235.JavaMail.root@127.0.0.1> In-Reply-To: MIME-Version: 1.0 X-Mithi-ILSubject: Re: [dpdk-users] Enabling stats in pipeline applications X-MithiMail: MithiMail X-Mithi-SubHasIL: 0 X-Mithi-MsgHasIL: 0 X-Mithi-NoOfAttachments: 0 X-Mithi-SMS-SendSubject: false X-Mithi-SMS-SendBody: false X-Mithi-SMS-SendName: false X-Mithi-SMS-SendMailId: false X-Mithi-SMS-SendMobile: false X-Priority: 3 X-Mailer: Mithi-Web-Mail X-TMASE-Version: StarCloud-1.3-8.2.1013-23648.007 X-TMASE-Result: 10--7.527900-7.000000 X-TMASE-MatchedRID: k6djswU9vfJwk2nGrSils+5i6weAmSDKBdebOqawiLuoZSh54Tlk9uXl Qty7bkNP+C56g4Ua7enXpTDLG+Z2xJ5XX7G/H2mElVHM/F6YkvR+S5m2/8VLmjdnd59Af7CPXVj EDc2RXfoL7mhBBPhLfpcKp0LD4YexnPecQ/hKOMBoOA9kFf9sy66IBbSnfz+3S4KPPiCB23CcJW hhjs/Xdz+ZqQbT6/3uDzueAsqJuivSV+Xuk4c29iI9MxSOQ6CSPNtw/6FaNPwPGMG6AkHPPNLQx tZ8WmAAULfbxDrYz8tAnsaTSHT+C6W0yic3/a5lL4+sB3yBsckcDDLReGt4PfmUDxpFogQXo8WM kQWv6iXgT2zXYa9/nT2Xsf5MVCB1p6W6K3+lwWmXGE8JXoztzdmwXGGabp3xRkVTGzyObnnjFJD dfgffOFm/sw0ucKLZcRrtGnA7ChIfPahj8OpOLvOMrxPmzJdf/NaGdCBG1msifthlSe+XZ37cGd 19dSFd X-TM-Deliver-Signature: 4DEC62F875FEDDBF5BBB6576DAC465AD Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: base64 X-Content-Filtered-By: Mailman/MimeDel 2.1.15 Subject: Re: [dpdk-users] Enabling stats in pipeline applications X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Feb 2018 14:11:07 -0000 ICAgIAogICAgIEkgaGFkIGEgc2ltaWxhciBpc3N1ZS4gVGhlIHByb2JsZW0gdHVybmVkIG91dCB0 byBiZSBpbiBjb25maWdzLgpNYWtlIHN1cmUgdGhlIGNvbmZpZ3VyYXRpb24gY2hhbmdlcyBhcmUg bWFkZSBpbiB0aGUgdGFyZ2V0IGluICRSVEVf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kIGJ5IG90aGVyOiAwCnBpcGVsaW5lPiBwIDIgc3RhdHMg cG9ydCBvdXQgMApQaXBlbGluZSAyIC0gc3RhdHMgZm9yIG91dHB1dCBwb3J0IDA6ClBrdHMgaW46 IDAKUGt0cyBkcm9wcGVkIGJ5IEFIOiAwClBrdHMgZHJvcHBlZCBieSBvdGhlcjogMApJIGV2ZW4g ZW5hYmxlZCB0aGUgZm9sbG93aW5nIGZsYWdzIGluIGRwZGsvY29uZmlnL2NvbW1vbl9iYXNlIGFu ZCByZWNvbXBpbGVkLgpDT05GSUdfUlRFXypfU1RBVFNfQ09MTEVDVD15ClN0aWxsIGl0cyBub3Qg d29ya2luZy4KQ2FuIHlvdSBwbGVhc2UgaGVscCBtZSB0byByZWN0aWZ5IHRoaXM/ClJlZ2FyZHMs ClNoYXJhbnlh >From matthew.coppola4@gmail.com Thu Feb 8 17:52:57 2018 Return-Path: Received: from mail-ot0-f171.google.com (mail-ot0-f171.google.com [74.125.82.171]) by dpdk.org (Postfix) with ESMTP id 8EADC1B816 for ; Thu, 8 Feb 2018 17:52:57 +0100 (CET) Received: by mail-ot0-f171.google.com with SMTP id a7so4931295otk.9 for ; Thu, 08 Feb 2018 08:52:57 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=YbwhxmIhH9XnkcKyRWAl4Fn4aZ3RKNioaiYMYLkjW4E=; b=piJUJkE28KK023pyzrnTCLllPahrKQfvbpX33FW78P7djytV4E7pHdrXfg10724u87 msdZqr+REiyLDLAHUhRANmHXCrtmp0rCK5kBzR9096nFpWoPRMUnF5yZKJUrXo5YJGlj NjfFq948IsJ4vtchQ31A76Wxjh5raW/GUTU3pQyqImsoaOBvbKfD+tzDK8CuWU/BBSp/ SRp8NHKSoVeM4hhrf1k1kgyo+JI25iDVjzWP0znXgcknT8yDkK0q+Y8Rlw45vIkLaDXg JgN9Z6JdKr9EET193KaFKdzTXr0ufKvhvoyPOYD4eB2B4nW5Kez+FZctoiU1pO3xuUxj jVXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=YbwhxmIhH9XnkcKyRWAl4Fn4aZ3RKNioaiYMYLkjW4E=; b=bNGvZv+RIKRXVkn9sxcp0QptxoMyw0Ik9/DUPF05QZJmUksCBSTMQatM2OVhB/PPvj WBCkaqAcUjcHFRWLs9/Y68REpZ+Yc3+o5TbdnQFdezA2cA5Ffi9byc/Wpfk6M9QzD0Py M5IkM0CDWNDWwM9kRxw6+f7dgo/AwXy+U4JDefty5i8RUj0S+BDyHb/1aC3LvKkA3ANr BfYD3DwW7hHwp3d6KC8pdouoSFg/12bYpBan8q/oO3SkCHFY4RIwqLwvAud67kgVFQS9 AEvnJlgExbr7gKXws7luhwMJ6iy8cVEOY0meAkpztRnjKwg7OjBvzWAkDW5eqvE4rGg0 CA3w== X-Gm-Message-State: APf1xPBAsHOtJSsOd8XUFaZ9kwZ1GDjiHpsPJXFyHDgtaVBypO1gOTI1 k3eOT+NqcSm+xC3DaTHEvAMTLPnX1lXipUn8lGVLlg== X-Google-Smtp-Source: AH8x2248fogBNDOlxJxnKlquxsqBW0a/CcRCV7pFKwpUMtJeS55KUsQTEiT87Sww0OLYJD9lW2p/HFjRPrM7SUqjzcs= X-Received: by 10.157.49.90 with SMTP id v26mr992979otd.389.1518108776467; Thu, 08 Feb 2018 08:52:56 -0800 (PST) MIME-Version: 1.0 Received: by 10.157.72.228 with HTTP; Thu, 8 Feb 2018 08:52:55 -0800 (PST) From: Matthew Coppola Date: Thu, 8 Feb 2018 11:52:55 -0500 Message-ID: To: users@dpdk.org Content-Type: text/plain; charset="UTF-8" Subject: [dpdk-users] i40e VF Rx/Tx CRC Bytes Discrepancy X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Feb 2018 16:52:57 -0000 Hi, I am noticing a discrepancy in the Rx/Tx Byte counters when using the i40e driver as a virtual function. Specifically I am observing that the Rx bytes are 4 bytes per packet larger than the Tx Bytes. My application is transmitting a packet and then receiving the same packet back (in a service function chaining application). I verified that the packets being transmitted and received were the same by capturing on the interfaces using pdump and analyzing the output in Wireshark. I believe the discrepancy comes from correcting for the Ethernet FCS. I see that in i40e_ethdev.c the CRC bytes are corrected for in the i40e_update_vsi_stats() and i40e_read_stats_registers() functions by using the following correction (see below). Note the left-hand side changes slightly depending on the specific function. pf->internal_stats.rx_bytes -= (pf->internal_stats.rx_unicast + pf->internal_stats.rx_multicast + pf->internal_stats.rx_broadcast) * ETHER_CRC_LEN; However I did not see this correction being used in the vf driver (i40e_ethdev_vf.c). By adding a correction to i40evf_update_stats() as follows I can reconcile the counters (and make them consistent with the PF behavior). nes->rx_bytes -= (nes->rx_unicast + nes->rx_multicast + nes->rx_broadcast) * ETHER_CRC_LEN; I would like to know if this is the expected behavior or if this is a bug in the driver? If this is the expected behavior can you please explain why I should expect a discrepancy between the Rx and Tx Byte counters? Some additional information: The application I am observing this behaviour in is using DPDK 17.08. (However I don't see any fixes for this in version 17.11). The NIC is an Intel Corporation XL710/X710 Virtual Function (rev 02) (output from lspci). Thank you for your time, and please let me know if you require further information. Matt m