From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from bilemail1.empirix.com (bilemail1.empirix.com [208.67.76.245]) by dpdk.org (Postfix) with ESMTP id A92888DAF for ; Wed, 20 Jan 2016 18:15:25 +0100 (CET) Received: from BILEMAIL1.empirix.com (10.17.8.30) by bilemail1.empirix.com (10.17.8.30) with Microsoft SMTP Server (TLS) id 15.0.775.38; Wed, 20 Jan 2016 12:15:17 -0500 Received: from BILEMAIL1.empirix.com ([fe80::f9e0:9293:2523:f021]) by bilemail1.empirix.com ([fe80::f9e0:9293:2523:f021%22]) with mapi id 15.00.0775.031; Wed, 20 Jan 2016 12:15:17 -0500 From: "Montorsi, Francesco" To: Ivan Boule , "dev@dpdk.org" Thread-Topic: [dpdk-dev] where to find ethernet CRC when stripping is off Thread-Index: AdFTkyEV8eqdkSLXQ3eFs9jPf9NxQQAMN+QAAAfAU6A= Date: Wed, 20 Jan 2016 17:15:16 +0000 Message-ID: References: <30b91c74ca26434daac041713cffa153@bilemail1.empirix.com> <569FAC72.3090001@6wind.com> In-Reply-To: <569FAC72.3090001@6wind.com> Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.12.50.52] Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Subject: Re: [dpdk-dev] where to find ethernet CRC when stripping is off X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 20 Jan 2016 17:15:26 -0000 Hi Ivan, > -----Original Message----- > You would be right... if the PMDs did not transparently strip the CRC in > software when hardware CRC stripping is disabled at port configuration (a= s > described above). > See for instance how the function ixgbe_recv_pkts_lro() in file > drivers/net/ixgbe/ixgbe_rxtx.c deals with crc_len. Yeah, I see. However, I wonder what's the utility of the hw_strip_crc featu= re if finally it is completely masked to the mbuf user. However, to my understanding, looking at that ixgbe code, I think that what= I wrote before: uint32_t crc =3D *(rte_pktmbuf_mtod_offset (mymbuf, uint32_t*, mymbuf->p= kt_len)) ; should work, since the pkt_len and data_len has the "crc_len" removed, but = the CRC itself should be there. I know it is kind of an hack, but at least for ixgbe that sounds like a pos= sible (temporary) solution for me.... > Considering your need, I think now that PMDs should keep the CRC that are > stored in received packets when hardware CRC stripping is disabled by the > application, so that the application can access it as needed. >=20 Yes, that would be very useful. > Note that this would impose that the input packet processing of such DPDK > applications be aware of the CRC presence (+4 in the packet length , for > instance). Or perhaps, to maintain backward compatibility, just a flag inside the mbuf= could be set that informs the user that at the end of the mbuf packet, you= can find 4 bytes with the CRC. >=20 > Let's see what others, if any, that might care think about such a change = into > the CRC stripping semantics. Thanks! Francesco