Re: [dpdk-dev] [PATCH] doc: show internal functions in doxygen

2018-10-19 Thread Ferruh Yigit
On 10/18/2018 6:04 PM, Thomas Monjalon wrote: > 18/10/2018 18:22, Ferruh Yigit: >> On 10/18/2018 5:08 PM, Thomas Monjalon wrote: >>> Not sure we want to show the internal functions to users. >>> It may be useful only for PMD developers. >>> Do we vote? +1 / -1 welcome! >> >> What is affected from t

[dpdk-dev] is per patch checkpatch reports working?

2018-10-19 Thread Ferruh Yigit
I am not getting them for a while but not sure if it is only me. Thanks, ferruh

Re: [dpdk-dev] [PATCH] bus/pci: set intr_handle type for secondary processes

2018-10-19 Thread Burakov, Anatoly
On 18-Oct-18 5:41 PM, Alejandro Lucero wrote: On Thu, Oct 18, 2018 at 5:26 PM Burakov, Anatoly mailto:anatoly.bura...@intel.com>> wrote: On 27-Sep-18 1:30 PM, Alejandro Lucero wrote: > Invoking rte_pci_read/write_config functions requires device with > a intr_handle type for us

[dpdk-dev] [PATCH v3] net/mlx5: allow multiple probing for representor

2018-10-19 Thread Ophir Munk
Implement probing of a rte device multiple times, see [1]. Set PCI driver RTE_PCI_DRV_PROBE_AGAIN flag to enable multiple probing of the PCI device by the PCI common driver. Consecutive probing requests with a devargs string may contain repetitive master and representors devices for which eth devic

Re: [dpdk-dev] [PATCH v1] igb_uio: fix unexpected removal for hot-unplug

2018-10-19 Thread Jeff Guo
On 10/19/2018 12:06 AM, Ferruh Yigit wrote: On 10/18/2018 7:27 AM, Jeff Guo wrote: When a device is hot-unplugged, pci_remove will be invoked unexpectedly before pci_release, it will caused kernel hung issue which will throw the error info of "Trying to free already-free IRQ XXX". And on the o

Re: [dpdk-dev] [PATCH v2 02/14] crypto/caam_jr: add HW tuning options

2018-10-19 Thread Thomas Monjalon
12/10/2018 16:40, Gagandeep Singh: > --- /dev/null > +++ b/drivers/crypto/caam_jr/caam_jr_config.h > +typedef uint64_t dma_addr_t; In some environments, there is a redefinition error because of drivers/bus/dpaa/include/compat.h

Re: [dpdk-dev] is per patch checkpatch reports working?

2018-10-19 Thread Thomas Monjalon
19/10/2018 09:42, Ferruh Yigit: > I am not getting them for a while but not sure if it is only me. Thanks, I did not notice it stopped working. I have just restarted it. For info, I had to install gawk because mawk was failing with the new check in checkpatches.sh.

[dpdk-dev] [PATCH] net/i40e: keep promisc on if allmulticast is enabled

2018-10-19 Thread Huaibin Wang
From: huaibin Wang Promisc should not be disabled if the all multicast mode is enabled. Patch keeps the promiscuous on if all multicast mode is on, this behavior is also consistent with the implementation done on ixgbe pmd. Signed-off-by: huaibin Wang Signed-off-by: Laurent Hardy --- Cc: Beile

[dpdk-dev] [PATCH] net/i40e: keep promisc on if allmulticast is enabled

2018-10-19 Thread Huaibin Wang
From: huaibin Wang Promisc should not be disabled if the all multicast mode is enabled. Patch keeps the promiscuous on if all multicast mode is on, this behavior is also consistent with the implementation done on ixgbe pmd. Signed-off-by: huaibin Wang Signed-off-by: Laurent Hardy --- Cc: Beile

Re: [dpdk-dev] [PATCH v6 6/6] ethdev: complete closing of port

2018-10-19 Thread Andrew Rybchenko
On 10/19/18 5:07 AM, Thomas Monjalon wrote: After closing a port, it cannot be restarted. So there is no reason to not free all associated resources. The last step was done with rte_eth_dev_detach() which is deprecated. Instead of blindly removing the associated rte_device, the driver should che

Re: [dpdk-dev] [PATCH v5 00/13] introduce telemetry library

2018-10-19 Thread Laatz, Kevin
Hi Mattias, On 18/10/2018 09:07, Mattias Rönnblom wrote: Most of the issues I pointed out in v2 of this patchset is still here. Will recheck feedback for the next version. With regards to comments on v2, 3/10, could you please help provide clarification on the below? On 03/10/2018 20:06,

[dpdk-dev] [PATCH v11 1/5] lib/librte_power: traffic pattern aware power control

2018-10-19 Thread Liang Ma
1. Abstract For packet processing workloads such as DPDK polling is continuous. This means CPU cores always show 100% busy independent of how much work those cores are doing. It is critical to accurately determine how busy a core is hugely important for the following reasons: * No indication o

[dpdk-dev] [PATCH v11 5/5] doc: update release notes for empty poll library

2018-10-19 Thread Liang Ma
Signed-off-by: Liang Ma --- doc/guides/rel_notes/release_18_11.rst | 21 - 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/doc/guides/rel_notes/release_18_11.rst b/doc/guides/rel_notes/release_18_11.rst index a8327ea..bbfa8d6 100644 --- a/doc/guides/rel_notes/re

[dpdk-dev] [PATCH v11 3/5] doc/guides/pro_guide/power-man: update the power API

2018-10-19 Thread Liang Ma
Update the document for empty poll API. Change Logs: v9: minor changes for syntax. Update document. Signed-off-by: Liang Ma Acked-by: David Hunt --- doc/guides/prog_guide/power_man.rst | 86 + 1 file changed, 86 insertions(+) diff --git a/doc/guides/prog_g

[dpdk-dev] [PATCH v11 2/5] examples/l3fwd-power: simple app update for new API

2018-10-19 Thread Liang Ma
Add the support for new traffic pattern aware power control power management API. Example: ./l3fwd-power -l xxx -n 4 -w :xx:00.0 -w :xx:00.1 -- -p 0x3 -P --config="(0,0,xx),(1,0,xx)" --empty-poll="0,0,0" -l 14 -m 9 -h 1 Please Reference l3fwd-power document for full parameter usage T

Re: [dpdk-dev] is per patch checkpatch reports working?

2018-10-19 Thread Liang, Ma
Hi Thomas, I still see the issue with the awk script inside check-symbol-changes.sh. that script still put '+' as the Section name. any suggestion ? I use fedora 24 and gawk Regards Liang On 19 Oct 11:27, Thomas Monjalon wrote: > 19/10/2018 09:42, Ferruh Yigit: > > I am not getting the

Re: [dpdk-dev] is per patch checkpatch reports working?

2018-10-19 Thread Thomas Monjalon
You should open a dedicated thread on the mailing with Cc the author of this script. 19/10/2018 12:38, Liang, Ma: > Hi Thomas, >I still see the issue with the awk script inside check-symbol-changes.sh. >that script still put '+' as the Section name. >any suggestion ? >I use fedora

Re: [dpdk-dev] is per patch checkpatch reports working?

2018-10-19 Thread Liang, Ma
I did send out a patch to the author for a while. but no response. FYI http://patches.dpdk.org/patch/46101/ Liang On 19 Oct 12:43, Thomas Monjalon wrote: > You should open a dedicated thread on the mailing with Cc the author of this > script. > > 19/10/2018 12:38, Liang, Ma: > > Hi Thomas,

Re: [dpdk-dev] [PATCH] devtools/check-symbol-changes.sh: awk script issue

2018-10-19 Thread Thomas Monjalon
Hi Neil, Are you OK with this patch? 04/10/2018 17:18, Liang Ma: > There is a issue inside check-symbol-changes.sh awk script. > When the script try to parse the section name from patch, > The script put char "+" into the section name. > > Signed-off-by: Liang Ma > --- > devtools/check-symbo

[dpdk-dev] [PATCH 1/2] test/pmd_ring_perf: release ring resources after test

2018-10-19 Thread Phil Yang
Need to release the port and the ring resources after test. Otherwise, it will cause failure to allocate memory when reentry the test. Fixes: ea764af ("app/test: add performance test for ring driver") Signed-off-by: Phil Yang Reviewed-by: Gavin Hu --- test/test/test_pmd_ring_perf.c | 8 +++

[dpdk-dev] [PATCH 2/2] test/pmd_ring: release ring resources after test

2018-10-19 Thread Phil Yang
Need to release the port and the ring resources after test. Otherwise, it will cause failure to allocate memory when reentry the test. Fixes: 4ea3801 ("app/test: fix ring unit test") Signed-off-by: Phil Yang Reviewed-by: Gavin Hu --- test/test/test_pmd_ring.c | 100

[dpdk-dev] [PATCH v12 3/5] doc/guides/pro_guide/power-man: update the power API

2018-10-19 Thread Liang Ma
Update the document for empty poll API. Change Logs: v9: minor changes for syntax. Update document. Signed-off-by: Liang Ma Acked-by: David Hunt --- doc/guides/prog_guide/power_man.rst | 86 + 1 file changed, 86 insertions(+) diff --git a/doc/guides/prog_g

[dpdk-dev] [PATCH v12 5/5] doc: update release notes for empty poll library

2018-10-19 Thread Liang Ma
Update the release nots for Traffic Pattern Aware Control Library(empty poll). Signed-off-by: Liang Ma --- doc/guides/rel_notes/release_18_11.rst | 21 - 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/doc/guides/rel_notes/release_18_11.rst b/doc/guides/rel_not

[dpdk-dev] [PATCH v12 1/5] lib/librte_power: traffic pattern aware power control

2018-10-19 Thread Liang Ma
1. Abstract For packet processing workloads such as DPDK polling is continuous. This means CPU cores always show 100% busy independent of how much work those cores are doing. It is critical to accurately determine how busy a core is hugely important for the following reasons: * No indication o

[dpdk-dev] [PATCH v12 2/5] examples/l3fwd-power: simple app update for new API

2018-10-19 Thread Liang Ma
Add the support for new traffic pattern aware power control power management API. Example: ./l3fwd-power -l xxx -n 4 -w :xx:00.0 -w :xx:00.1 -- -p 0x3 -P --config="(0,0,xx),(1,0,xx)" --empty-poll="0,0,0" -l 14 -m 9 -h 1 Please Reference l3fwd-power document for full parameter usage T

[dpdk-dev] [PATCH v12 4/5] doc/guides/sample_app_ug/l3_forward_power_man.rst: update

2018-10-19 Thread Liang Ma
Add empty poll mode command line example ChangeLogs: v9: update the document Signed-off-by: Liang Ma Acked-by: David Hunt --- doc/guides/sample_app_ug/l3_forward_power_man.rst | 69 +++ 1 file changed, 69 insertions(+) diff --git a/doc/guides/sample_app_ug/l3_forward_powe

[dpdk-dev] [PATCH v2] test/pmd_ring: release ring resources after test

2018-10-19 Thread Phil Yang
Need to release the port and the ring resources after test. Otherwise, it will cause failure to allocate memory when reentry the test. Fixes: 4ea3801 ("app/test: fix ring unit test") Signed-off-by: Phil Yang Reviewed-by: Gavin Hu --- test/test/test_pmd_ring.c | 100

Re: [dpdk-dev] [PATCH] devtools/check-symbol-changes.sh: awk script issue

2018-10-19 Thread Neil Horman
On Fri, Oct 19, 2018 at 12:48:57PM +0200, Thomas Monjalon wrote: > Hi Neil, > > Are you OK with this patch? > > > 04/10/2018 17:18, Liang Ma: > > There is a issue inside check-symbol-changes.sh awk script. > > When the script try to parse the section name from patch, > > The script put char "+"

Re: [dpdk-dev] [PATCH] test/bpf: use hton instead of __builtin_bswap

2018-10-19 Thread Ananyev, Konstantin
Hi Malvika, > > Hi Konstantin, > > I installed the clang version 4.0.1 to check for the issue you were facing > with -O2 compilation. I was able to compile with -O2 and -O0 > optimization without any errors. Please see the exact command I used and the > following output for your reference: >

Re: [dpdk-dev] [PATCH] devtools/check-symbol-changes.sh: awk script issue

2018-10-19 Thread Liang, Ma
Hi Neil, there are two things here. 1. This issue give me negative report when I run checkpatch. So, I hope we can disable symbol check before we fix it. 2. How to fix that I still don't understand why we need match section name start with '+'. The section name should

[dpdk-dev] [PATCH] vhost: avoid memory barriers when no descriptors dequeued

2018-10-19 Thread Maxime Coquelin
In both split and packed dequeue paths, flush_shadow_used_ring and vhost_ring_call variants gets called even if not packets have been dequeued, and so no descriptors updates happened. It has an impact on CPU pipeline, as memory barriers are used in these functions. This patch don't call these fun

Re: [dpdk-dev] [PATCH v6 2/6] app/testpmd: allow detaching a port not closed

2018-10-19 Thread Iremonger, Bernard
> -Original Message- > From: Thomas Monjalon [mailto:tho...@monjalon.net] > Sent: Friday, October 19, 2018 3:08 AM > To: Yigit, Ferruh ; arybche...@solarflare.com > Cc: dev@dpdk.org; ophi...@mellanox.com; Iremonger, Bernard > ; rahul.lakkire...@chelsio.com > Subject: [PATCH v6 2/6] app/test

Re: [dpdk-dev] [PATCH v6 1/6] app/testpmd: update port list for multiple removals

2018-10-19 Thread Iremonger, Bernard
> -Original Message- > From: Thomas Monjalon [mailto:tho...@monjalon.net] > Sent: Friday, October 19, 2018 3:08 AM > To: Yigit, Ferruh ; arybche...@solarflare.com > Cc: dev@dpdk.org; ophi...@mellanox.com; Iremonger, Bernard > ; rahul.lakkire...@chelsio.com; Wisam > Jaddo > Subject: [PATCH

Re: [dpdk-dev] [PATCH] bus/pci: set intr_handle type for secondary processes

2018-10-19 Thread Alejandro Lucero
On Fri, Oct 19, 2018 at 9:02 AM Burakov, Anatoly wrote: > On 18-Oct-18 5:41 PM, Alejandro Lucero wrote: > > > > > > On Thu, Oct 18, 2018 at 5:26 PM Burakov, Anatoly > > mailto:anatoly.bura...@intel.com>> wrote: > > > > On 27-Sep-18 1:30 PM, Alejandro Lucero wrote: > > > Invoking rte_pci_

[dpdk-dev] [PATCH v3 0/6] net/mlx5: flow counters support for Linux-rdma v19

2018-10-19 Thread Viacheslav Ovsiienko
Mellanox mlx5 PMD supports Flow counters via Verbs library. The current implementation is based on the Mellanox proprietary Verbs library included in MLNX OFED packages. The Flow counter support is recently added into linux-rdma release (v19), so the mlx5 PMD update is needed to provide Counter fea

[dpdk-dev] [PATCH v3 1/6] net/mlx5: flow counters object create function bugfix

2018-10-19 Thread Viacheslav Ovsiienko
The first part of patchset provides the separate commit for bugfix. Flow counter object was not freed in case of memory allocation error. The call of counter Verbs object deallocating function is added. The initial value of reference counter is set to one in order to provide the correct counter obj

[dpdk-dev] [PATCH v3 2/6] net/mlx5: flow counters new configuration flags

2018-10-19 Thread Viacheslav Ovsiienko
In this part of patchset some modifications in compile configuration flags are done. The HAVE_IBV_DEVICE_COUNTERS_SET_SUPPORT is replaced with HAVE_IBV_DEVICE_COUNTERS_SET_V42. At this stage it is just flag renaming. The new HAVE_IBV_DEVICE_COUNTERS_SET_V45 flag is introduced. Both makefile and mes

[dpdk-dev] [PATCH v3 3/6] net/mlx5: flow counters simplifying runtime support check

2018-10-19 Thread Viacheslav Ovsiienko
This part of patchset removes the redundant check of counters support in runtime. The flag flow_counter_en is eliminated from the code. The Verbs create counter function just returns an error if no counter support presented in kernel. Some log messages regarding the counter support type and presen

[dpdk-dev] [PATCH v3 4/6] net/mlx5: flow counters mlx5 glue library update

2018-10-19 Thread Viacheslav Ovsiienko
This part of patchset updates the mlx5 glue library, new counter support function pointers are added to the glue linking structure mlx5_glue. This structure now contains the pointers to the both versions of counter supporting functions due to compatibility issues. Depending on configuration flags t

[dpdk-dev] [PATCH v3 5/6] net/mlx5: flow counters query function move and rename

2018-10-19 Thread Viacheslav Ovsiienko
The flow_verbs_query_count() is moved into the the group of counter managing functions and renamed to flow_verbs_counter_query() in order to be in unified fashion with others. Also minor function modification is made to avoid unreachable code warnings if there is no counter support at compile time

[dpdk-dev] [PATCH v3 6/6] net/mlx5: flow counters Verbs interface functions update

2018-10-19 Thread Viacheslav Ovsiienko
This part of patchset updates the functions performing the Verbs library calls in order to support different versions of library. The functions: - flow_verbs_counter_new() - flow_verbs_counter_release() - flow_verbs_counter_query() now have the several compilations branches, depending on the

[dpdk-dev] Build DPDK for different target machine.

2018-10-19 Thread Shubhachint, Chaitanya
Hello, I am trying to build DPDK library set (shared) so that there are somewhat portable. I want to build them once on a designated build machine and run them on other machines of similar architecture. I can build DPDK and use it locally successfully but running them on a different target mach

Re: [dpdk-dev] [PATCH] doc: update i40e guide for PPPoE package release

2018-10-19 Thread Zhang, Qi Z
> -Original Message- > From: Kovacevic, Marko > Sent: Thursday, October 18, 2018 3:19 AM > To: Xing, Beilei ; Zhang, Qi Z > Cc: dev@dpdk.org > Subject: RE: [dpdk-dev] [PATCH] doc: update i40e guide for PPPoE package > release > > Acked-by: Marko Kovacevic Applied to dpdk-next-net-int

[dpdk-dev] [PATCH] bus/pci: use device driver name instead of handler type

2018-10-19 Thread Alejandro Lucero
Invoking the right pci read/write functions is based on interrupt handler type. However, this is not configured for secondary processes precluding to use those functions. This patch fixes the issue using the driver name the device is bound to instead. Fixes: 632b2d1deeed ("eal: provide functions

Re: [dpdk-dev] [PATCH] net/ixgbe: put 5tuple check in front to jump over ntuple filter case

2018-10-19 Thread Zhang, Qi Z
> -Original Message- > From: Zhao1, Wei > Sent: Tuesday, October 16, 2018 10:57 PM > To: Zhang, Qi Z ; mocan > Cc: dev@dpdk.org; Lu, Wenzhuo > Subject: RE: Re:RE: [dpdk-dev] [PATCH] net/ixgbe: put 5tuple check in front > to jump over ntuple filter case > > > > > -Original Messag

Re: [dpdk-dev] [PATCH] examples/vdpa: fix spelling error in message

2018-10-19 Thread Stephen Hemminger
On Thu, 18 Oct 2018 23:19:18 + "Van Haaren, Harry" wrote: > > -Original Message- > > From: dev [mailto:dev-boun...@dpdk.org] On Behalf Of Stephen Hemminger > > Sent: Thursday, October 18, 2018 3:35 PM > > To: dev@dpdk.org > > Cc: Stephen Hemminger > > Subject: [dpdk-dev] [PATCH] exam

[dpdk-dev] [RFC] ethdev: make offload name API non-experimental

2018-10-19 Thread Stephen Hemminger
The offload name functions are useful, but since they are marked experimental they can not be used by upstream projects. For example, VPP duplicates the same table in its code. Signed-off-by: Stephen Hemminger --- lib/librte_ethdev/rte_ethdev.c | 4 ++-- lib/librte_ethdev/rte_ethdev.h

Re: [dpdk-dev] [PATCH] doc: add known PHY link up issue for i40e

2018-10-19 Thread Zhang, Qi Z
Hi Jeff: > -Original Message- > From: Guo, Jia > Sent: Thursday, October 11, 2018 4:09 AM > To: Zhang, Qi Z ; Xing, Beilei ; > Mcnamara, John ; Kovacevic, Marko > > Cc: Wu, Jingjing ; dev@dpdk.org; Guo, Jia > ; Zhang, Helin > Subject: [PATCH] doc: add known PHY link up issue for

Re: [dpdk-dev] [PATCH] net/i40e: keep promisc on if allmulticast is enabled

2018-10-19 Thread Zhang, Qi Z
> -Original Message- > From: Huaibin Wang [mailto:huaibin.w...@6wind.com] > Sent: Friday, October 19, 2018 2:45 AM > To: dev@dpdk.org > Cc: Xing, Beilei ; Zhang, Qi Z ; > huaibin Wang ; Laurent Hardy > > Subject: [PATCH] net/i40e: keep promisc on if allmulticast is enabled > > From: hu

Re: [dpdk-dev] [PATCH] devtools/check-symbol-changes.sh: awk script issue

2018-10-19 Thread Neil Horman
On Fri, Oct 19, 2018 at 02:09:51PM +0100, Liang, Ma wrote: > Hi Neil, >there are two things here. >1. This issue give me negative report when I run checkpatch. > So, I hope we can disable symbol check before we fix it. > You're welcome to disable the check locally I suppose, but I'

Re: [dpdk-dev] [PATCH] devargs: fix freeing during device removal

2018-10-19 Thread Thomas Monjalon
18/10/2018 02:19, Thomas Monjalon: > After calling unplug function of a bus, the device is expected > to be freed. It is too late for getting devargs to remove. > Anyway, the buses which implement unplug are already freeing > the devargs, except the PCI bus. > So the call to rte_devargs_remove() is

Re: [dpdk-dev] [PATCH v2 09/33] crypto/octeontx: adds symmetric capabilities

2018-10-19 Thread Trahe, Fiona
Hi Anoob, Sorry for the delay, I've been travelling a lot lately. We don't have an alternative solution - will have to explore options when we get to that stage of the asym PMD development. I think the macro works well for this specific case, however we'll look for an alternative. At the moment w

[dpdk-dev] IPV4/IPV6 TCP/UDP Pseudo Header Checksum APIs

2018-10-19 Thread lidejun
Has anybody used the following two APIs calculating ipv4&ipv6 tcp/udp pseudo header checksum? 1.rte_ipv4_phdr_cksum 2.rte_ipv6_phdr_cksum The ipv4 version does not exclude ip options and ipv6 version does not exclude extersion headers.

Re: [dpdk-dev] Build DPDK for different target machine.

2018-10-19 Thread Shyam Shrivastav
I am doing same but including dpdk libraries with application, you can do same. Other thing to try, copy the shared libraries from the build machine into targets instead of building them on targets. On Fri, Oct 19, 2018 at 9:55 PM Shubhachint, Chaitanya < chaitanya.shubhach...@netscout.com> wrote:

Re: [dpdk-dev] IPV4/IPV6 TCP/UDP Pseudo Header Checksum APIs

2018-10-19 Thread Shyam Shrivastav
that is correct , pseudo header doesn't include ipv4 options or ipv6 extension headers .. On Sat, Oct 20, 2018 at 9:02 AM lidejun wrote: > Has anybody used the following two APIs calculating ipv4&ipv6 tcp/udp > pseudo header checksum? > > 1.rte_ipv4_phdr_cksum > > 2.rte_ipv6_phdr_cksum >

Re: [dpdk-dev] IPV4/IPV6 TCP/UDP Pseudo Header Checksum APIs

2018-10-19 Thread Shyam Shrivastav
Realized my answer is confusing, I meant to say that code is correct as pseudo ipv4/ipv6 headers for the purpose of checksum calculations doesn't include options or extension headers, see udp wiki or corresponding rfcs https://en.wikipedia.org/wiki/User_Datagram_Protocol On Sat, Oct 20, 2018 at 1

[dpdk-dev] 答复: IPV4/IPV6 TCP/UDP Pseudo Header Checksum APIs

2018-10-19 Thread lidejun
I mean DPDK APIs do not exclude ipv4 options or ipv6 extension headers, it is bug? 发件人: Shyam Shrivastav [mailto:shrivastav.sh...@gmail.com] 发送时间: 2018年10月20日 13:23 收件人: lidejun 抄送: users ; dev@dpdk.org; Lichunhe (Cloud Networking) ; Wangliefeng 主题: Re: [dpdk-dev] IPV4/IPV6 TCP/UDP Pseudo Head

Re: [dpdk-dev] IPV4/IPV6 TCP/UDP Pseudo Header Checksum APIs

2018-10-19 Thread Shyam Shrivastav
Yes you are right, I misread, following code (ipv4 case) assumes no ip options while calculating pseudo hdr length field psd_hdr.len = rte_cpu_to_be_16( (uint16_t)(rte_be_to_cpu_16(ipv4_hdr->total_length) - sizeof(struct ipv4_hdr))); should be psd