net: revert "net: get rid of an signed integer overflow in ip_idents_reserve()"

Bug #1882335 reported by Fred Kimmy
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
kunpeng920
Fix Released
Undecided
Unassigned
Ubuntu-18.04-hwe
Fix Released
Undecided
Unassigned
Ubuntu-20.04
Fix Released
Undecided
Unassigned
Upstream-kernel
Fix Released
Undecided
Unassigned

Bug Description

[Bug Description]
There is an significant performance regression with the following
commit-id <adb03115f459>
("net: get rid of an signed integer overflow in ip_idents_reserve()").

Both on x86 server(Skylake) and ARM64 server, when cpu core number
increase, the function ip_idents_reserve() of cpu usage is very high,
and the performance will become bad. After revert the patch, we can
avoid this problem when cpu core number increases.

With the patch on x86, ip_idents_reserve() cpu usage is 63.05% when
iperf3 is run with 32 cpu cores.
Samples: 18K of event 'cycles:ppp', Event count (approx.)
  Children Self Command Shared Object Symbol
    63.18% 63.05% iperf3 [kernel.vmlinux] [k] ip_idents_reserve

And the IOPS is 4483830pps.
10:46:13 AM IFACE rxpck/s txpck/s rxkB/s txkB/s
10:46:14 AM lo 4483830.00 4483830.00 192664.57 192664.57

Resert the patch, ip_idents_reserve() cpu usage is 17.05%.
Samples: 37K of event 'cycles:ppp', 4000 Hz, Event count (approx.)
  Children Self Shared Object Symbol
    17.07% 17.05% [kernel] [k] ip_idents_reserve

And the IOPS is 1160021pps.
05:03:15 PM IFACE rxpck/s txpck/s rxkB/s txkB/s
05:03:16 PM lo 11600213.00 11600213.00 498446.65 498446.65

[Steps to Reproduce]
  1)
  2)
  3)

[Actual Results]

[Expected Results]

[Reproducibility]

[Additional information]
  (Firmware version, kernel version, affected hardware, etc. if required):

[Resolution]
[Bug Description]
 hns3 patchset have merged into mainline 5.7rc6 kernel.

[Steps to Reproduce]
  1)
  2)
  3)

[Actual Results]

[Expected Results]

[Reproducibility]

[Additional information]
  (Firmware version, kernel version, affected hardware, etc. if required):

[Resolution]
net: revert "net: get rid of an signed integer overflow in ip_idents_reserve()"

Revision history for this message
Ike Panhc (ikepanhc) wrote :

a6211caa634d net: revert "net: get rid of an signed integer overflow in ip_idents_reserve()"

This patch has been merged into mainline kernel since 5.7-rc7

Revision history for this message
Ike Panhc (ikepanhc) wrote :

We have the original patch applied into ubuntu-focal.

ubuntu-focal$ gitoneline | grep 'ip_idents_reserve'
adb03115f459 <email address hidden> 2016-09-22 02:41:17 -0400 net: get rid of an signed integer overflow in ip_idents_reserve()

and we need to find out if there is an revised patch to fix the overflow.

Revision history for this message
dann frazier (dannf) wrote :
Changed in kunpeng920:
status: New → Fix Committed
Revision history for this message
Ike Panhc (ikepanhc) wrote :

In bionic hwe kernel as 5.3.0-63.57~18.04.1 too. Expect to hit -update 20th July

Ike Panhc (ikepanhc)
Changed in kunpeng920:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.