DPDK patches and discussions
 help / color / mirror / Atom feed
From: Didier Pallard <didier.pallard@6wind.com>
To: Yong Wang <yongwang@vmware.com>, "dev@dpdk.org" <dev@dpdk.org>
Subject: Re: [dpdk-dev] [PATCH 2/8] net/vmxnet3: return unknown IPv4 extension len ptype
Date: Tue, 17 Apr 2018 11:09:01 +0200	[thread overview]
Message-ID: <efb8d238-6e39-8eba-f2de-60f8f33dfdfc@6wind.com> (raw)
In-Reply-To: <BY2PR05MB235948FCFC24A7DD02BE8D28AFB00@BY2PR05MB2359.namprd05.prod.outlook.com>

Hi wang,

Indeed, this one is not strictly needed and does not fix anything, anyway:

- If application does not need the information (ethernet bridge, for 
example),
this access is not needed and it will never be done, so application 
performance
will be improved.

- If application needs the information, you're true, the parsing will 
just  be shifted
to the application procedure, but I think that data access locality will 
be increased
since the application will certainly do other stuff around the same 
memory location.
And in this case, final performance figures should be at worst the same 
than before the
patch.

Didier


On 04/16/2018 09:46 PM, Yong Wang wrote:
>> -----Original Message-----
>> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Didier Pallard
>> Sent: Wednesday, March 28, 2018 8:44 AM
>> To: dev@dpdk.org
>> Subject: [dpdk-dev] [PATCH 2/8] net/vmxnet3: return unknown IPv4
>> extension len ptype
>>
>> Rather than parsing IP header to get proper ptype to return, just return
>> RTE_PTYPE_L3_IPV4_EXT_UNKNOWN, that tells application that we have an
>> IP
>> packet with unknown header length.
> Any specific reason of doing this? I can image there are applications that depend on this and the cost of parsing is simply shifted to the app or via rte_eth_add_rx_callback().
>
>> Signed-off-by: Didier Pallard <didier.pallard@6wind.com>
>> ---
>>   drivers/net/vmxnet3/vmxnet3_rxtx.c | 8 +-------
>>   1 file changed, 1 insertion(+), 7 deletions(-)
>>
>> diff --git a/drivers/net/vmxnet3/vmxnet3_rxtx.c
>> b/drivers/net/vmxnet3/vmxnet3_rxtx.c
>> index 3a8c62fc1..156dc8e52 100644
>> --- a/drivers/net/vmxnet3/vmxnet3_rxtx.c
>> +++ b/drivers/net/vmxnet3/vmxnet3_rxtx.c
>> @@ -659,13 +659,7 @@ vmxnet3_rx_offload(const Vmxnet3_RxCompDesc
>> *rcd, struct rte_mbuf *rxm)
>>
>>   	/* Check packet type, checksum errors, etc. Only support IPv4 for
>> now. */
>>   	if (rcd->v4) {
>> -		struct ether_hdr *eth = rte_pktmbuf_mtod(rxm, struct
>> ether_hdr *);
>> -		struct ipv4_hdr *ip = (struct ipv4_hdr *)(eth + 1);
>> -
>> -		if (((ip->version_ihl & 0xf) << 2) > (int)sizeof(struct ipv4_hdr))
>> -			rxm->packet_type = RTE_PTYPE_L3_IPV4_EXT;
>> -		else
>> -			rxm->packet_type = RTE_PTYPE_L3_IPV4;
>> +		rxm->packet_type = RTE_PTYPE_L3_IPV4_EXT_UNKNOWN;
>>
>>   		if (!rcd->cnc) {
>>   			if (!rcd->ipc)
>> --
>> 2.11.0

  reply	other threads:[~2018-04-17  9:09 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-03-28 15:43 [dpdk-dev] [PATCH 0/8] net/vmxnet3: fix offload issues Didier Pallard
2018-03-28 15:43 ` [dpdk-dev] [PATCH 1/8] net: export IPv6 header extensions skip function Didier Pallard
2018-04-17 19:28   ` Ferruh Yigit
2018-04-23  8:35   ` Olivier Matz
2018-03-28 15:43 ` [dpdk-dev] [PATCH 2/8] net/vmxnet3: return unknown IPv4 extension len ptype Didier Pallard
2018-04-16 19:46   ` Yong Wang
2018-04-17  9:09     ` Didier Pallard [this message]
2018-03-28 15:43 ` [dpdk-dev] [PATCH 3/8] net/vmxnet3: gather offload data on first and last segment Didier Pallard
2018-03-28 15:43 ` [dpdk-dev] [PATCH 4/8] net/vmxnet3: fix Rx offload information in multiseg packets Didier Pallard
2018-03-28 15:43 ` [dpdk-dev] [PATCH 5/8] net/vmxnet3: complete Rx offloads support Didier Pallard
2018-03-28 15:43 ` [dpdk-dev] [PATCH 6/8] net/vmxnet3: guess mss if not provided in LRO mode Didier Pallard
2018-03-28 15:43 ` [dpdk-dev] [PATCH 7/8] net/vmxnet3: ignore emtpy segments in reception Didier Pallard
2018-03-28 15:43 ` [dpdk-dev] [PATCH 8/8] net/vmxnet3: skip empty segments in transmission Didier Pallard
2018-04-13  4:44 ` [dpdk-dev] [PATCH 0/8] net/vmxnet3: fix offload issues Yong Wang
2018-04-13 14:33   ` Didier Pallard
2018-04-20 22:02 ` Yong Wang
2018-04-23 14:46   ` Ferruh Yigit

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=efb8d238-6e39-8eba-f2de-60f8f33dfdfc@6wind.com \
    --to=didier.pallard@6wind.com \
    --cc=dev@dpdk.org \
    --cc=yongwang@vmware.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).