DPDK usage discussions
 help / color / Atom feed
* [dpdk-users] IPV4 and VLAN RX packets from NIC donot have the mbuf offload flag set with DPDK 18.08 version
@ 2019-06-25 14:13 Suchetha p
  2019-06-27 16:43 ` Van Haaren, Harry
  0 siblings, 1 reply; 2+ messages in thread
From: Suchetha p @ 2019-06-25 14:13 UTC (permalink / raw)
  To: users

Hi,


After upgrading the DPDK to 18.08 version and RHEL 7.6 OS I observe that
offload flags were not set in the packets received from NIC for eth type
VLAN and IPV4.

Hence application had to explicitly set the offload flags for VLAN and IPV4
packet.

if (ETHER_TYPE_VLAN == eth_type) {
          m->ol_flags |= PKT_RX_VLAN_PKT;

    }
    if (ETHER_TYPE_IPv4 == eth_type) {
          m->ol_flags |= PKT_RX_IPV4_HDR;
         }

If these offload flags were not set in the mbuf the packet would get
dropped and will not be forwarded to the Tap device.

But the offload flag setting per NIC received packet is causing some
performance issue and delay in data transfer.

TCP segment loss and retransmissions are observed and TX Tap drops are
observed.

These changes with respect to offload flag setting for RX VLAN and IPV4
packet was not required with old DPDK and RHEL6 and packets were getting
forwarded from NIC to Tap device and vice versa without any issue.

So is anything changed with respect to DPDK and RHEL 7 for ingress packets ?

    Also let me know if  CKSUM/ offload flags for TCP packets needs to be
set with latest DPDK 18.08 to avoid TCP segment loss /DUP ACK and
retransmissions .


 Thanks,

Suchetha

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

* Re: [dpdk-users] IPV4 and VLAN RX packets from NIC donot have the mbuf offload flag set with DPDK 18.08 version
  2019-06-25 14:13 [dpdk-users] IPV4 and VLAN RX packets from NIC donot have the mbuf offload flag set with DPDK 18.08 version Suchetha p
@ 2019-06-27 16:43 ` Van Haaren, Harry
  0 siblings, 0 replies; 2+ messages in thread
From: Van Haaren, Harry @ 2019-06-27 16:43 UTC (permalink / raw)
  To: Suchetha p, users

Hi,

> -----Original Message-----
> From: users [mailto:users-bounces@dpdk.org] On Behalf Of Suchetha p
> Sent: Tuesday, June 25, 2019 3:14 PM
> To: users@dpdk.org
> Subject: [dpdk-users] IPV4 and VLAN RX packets from NIC donot have the mbuf
> offload flag set with DPDK 18.08 version
> 
> Hi,
> 
> 
> After upgrading the DPDK to 18.08 version and RHEL 7.6 OS I observe that
> offload flags were not set in the packets received from NIC for eth type
> VLAN and IPV4.
> 
> Hence application had to explicitly set the offload flags for VLAN and IPV4
> packet.
> 
> if (ETHER_TYPE_VLAN == eth_type) {
>           m->ol_flags |= PKT_RX_VLAN_PKT;
> 
>     }
>     if (ETHER_TYPE_IPv4 == eth_type) {
>           m->ol_flags |= PKT_RX_IPV4_HDR;
>          }

Do you expect the issue described below is a performance issue from the above code?

It seems quite "branchy", meaning branch-misses might have a high
performance impact if your incoming traffic is not predictable.

From a code point of view, the following achieves the same effect, but without
any branching on the datapath;

m->ol_flags |= (ETHER_TYPE_VLAN == eth_type) << PKT_RX_VLAN_PKT_SHIFT;

Notice that the comparison (ETHER_TYPE_VLAN == eth_type) will result in a 1 or 0,
and using |= with a 0 value won't change the m->ol_flags bit contents.


If the performance impact of branch-mispredicts is the root cause for your
issue, try the above code and see does it help/solve.


> If these offload flags were not set in the mbuf the packet would get
> dropped and will not be forwarded to the Tap device.
> 
> But the offload flag setting per NIC received packet is causing some
> performance issue and delay in data transfer.
> 
> TCP segment loss and retransmissions are observed and TX Tap drops are
> observed.
> 
> These changes with respect to offload flag setting for RX VLAN and IPV4
> packet was not required with old DPDK and RHEL6 and packets were getting
> forwarded from NIC to Tap device and vice versa without any issue.
> 
> So is anything changed with respect to DPDK and RHEL 7 for ingress packets ?

I'll let others reply here - I don't know, sorry.

<snip>

Hope that helps, -Harry

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

end of thread, back to index

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-25 14:13 [dpdk-users] IPV4 and VLAN RX packets from NIC donot have the mbuf offload flag set with DPDK 18.08 version Suchetha p
2019-06-27 16:43 ` Van Haaren, Harry

DPDK usage discussions

Archives are clonable:
	git clone --mirror http://inbox.dpdk.org/users/0 users/git/0.git

	# If you have public-inbox 1.1+ installed, you may
	# initialize and index your mirror using the following commands:
	public-inbox-init -V2 users users/ http://inbox.dpdk.org/users \
		users@dpdk.org
	public-inbox-index users


Newsgroup available over NNTP:
	nntp://inbox.dpdk.org/inbox.dpdk.users


AGPL code for this site: git clone https://public-inbox.org/ public-inbox