The FDP team is no longer accepting new bugs in Bugzilla. Please report your issues under FDP project in Jira. Thanks.
Bug 1949850 - [RFE] Stop configuring '--socket-mem'/'--socket-limit' by default for DPDK if not requested.
Summary: [RFE] Stop configuring '--socket-mem'/'--socket-limit' by default for DPDK if...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux Fast Datapath
Classification: Red Hat
Component: openvswitch2.17
Version: FDP 21.E
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
: ---
Assignee: Rosemarie O'Riorden
QA Contact: Jean-Tsung Hsiao
URL:
Whiteboard:
: 1944568 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2021-04-15 09:05 UTC by Eelco Chaudron
Modified: 2022-05-30 12:42 UTC (History)
6 users (show)

Fixed In Version: openvswitch2.17-2.17.0-4.el9fdp
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-05-27 18:05:34 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Red Hat Issue Tracker FD-1233 0 None None None 2021-08-14 04:49:02 UTC
Red Hat Product Errata RHEA-2022:4792 0 None None None 2022-05-27 18:05:40 UTC

Internal Links: 1985506

Description Eelco Chaudron 2021-04-15 09:05:00 UTC
No need to artificially limit the amount of available memory. 

Suggestion from Ilya, so please contact him if you need more details.

Comment 1 Ilya Maximets 2021-06-24 13:24:06 UTC
Here is a short description on what should be done in this task in
my opinion:

The task could be finished in 2 steps (2 patches):

1. Stop providing default socket-mem if not configured, because it's
   not required by DPDK.  Rationale for this is the fact that OVS does
   that historically, because it was not possible to use DPDK without
   configuring socket-mem and OVS wanted to provide some sensible
   default value, so users will not be obligated to specify anything
   for a simple setup.
   Current DPDK uses dynamic memory allocation by default and doesn't
   require socket-mem option, which also changed its meaning from the
   "total amount of allocated memory" to "amount of pre-allocated memory".

2. Stop matching socket-mem with socket-limit if socket-limit is not set.
   If user configures socket-mem and doesn't configure socket-limit, this
   should mean that user doesn't want the memory to be limited.  If user
   wants memory to be limited, they should configure socket-limit.

In general EAL arguments should look like this:

- dpdk-socket-mem=<not set>, dpdk-socket-limit=<not set>
  current: "--scket-mem=1024,1024 --socket-limit=1024,1024"
  step 1 : ""
  step 2 : ""

- dpdk-socket-mem=<MEM>, dpdk-socket-limit=<not set>
  current: "--scket-mem=MEM --socket-limit=MEM"
  step 1 : "--scket-mem=MEM --socket-limit=MEM"
  step 2 : "--scket-mem=MEM"

- dpdk-socket-mem=<not set>, dpdk-socket-limit=<LIMIT>
  current: "--scket-mem=1024,1024 --socket-limit=LIMIT"
  step 1 : "--socket-limit=LIMIT"
  step 2 : "--socket-limit=LIMIT"

- dpdk-socket-mem=<MEM>, dpdk-socket-limit=<LIMIT>
  current: "--scket-mem=MEM --socket-limit=LIMIT"
  step 1 : "--scket-mem=MEM --socket-limit=LIMIT"
  step 2 : "--scket-mem=MEM --socket-limit=LIMIT"

Above cases could be extrapolated to cases where values passed
via dpdk-extra.  Also we should assume that if someone uses
'--legacy-mem'. they should have socket-mem configured one way or
another and OVS should not care about this scenario or try to add
some default values.

Comment 6 Michael Santana 2022-03-07 15:14:34 UTC
*** Bug 1949849 has been marked as a duplicate of this bug. ***

Comment 7 Michael Santana 2022-03-07 15:15:52 UTC
*** Bug 1944568 has been marked as a duplicate of this bug. ***

Comment 13 Jean-Tsung Hsiao 2022-05-18 15:56:14 UTC
Hi Eeclo,

Can you provide steps to verify this RFE feature ? Or, can you share your test script ?

For regression, I can run two testpmd tests --- one with socket-mem=4096,4096 statement, the other without. How about that ?

Thanks!
Jean

Comment 14 Eelco Chaudron 2022-05-19 08:23:15 UTC
 Rosemarie, can you help Jean on #13?

Comment 15 Jean-Tsung Hsiao 2022-05-19 13:32:38 UTC
I have run two P2P/OVS-dpdk test --- one with dpdk-socket-mem="4096,4096", the other without. Both delivered 12.1 Mpps throughput.

Observation on /proc/meminfo: Only two 1GB hugepages allocated when starting openvswitch. It stayed that way during the P2P test run for either case.
Also, there were no rte_map hugepage entries in /dev/hugepages.

*** Test Info ***

[root@wsfd-advnetlab151 dev]# rpm -q openvswitch2.17
openvswitch2.17-2.17.0-15.el9fdp.x86_64
[root@wsfd-advnetlab151 dev]# uname -r
5.14.0-70.13.1.el9_0.x86_64
[root@wsfd-advnetlab151 dev]# 

[root@wsfd-advnetlab151 jhsiao]# !cat
cat ovs_dpdk_p2p.sh
ovs-vsctl set Open_vSwitch . other_config={}
ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-lcore-mask=0x0200000000000002000000000000
ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-socket-mem="4096,4096"
ovs-vsctl --no-wait set Open_vSwitch . other_config:pmd-cpu-mask=0xa0000000000000a0000000000000
ovs-vsctl --no-wait set Open_vSwitch . other_config:dpdk-init=true

ovs-vsctl --if-exists del-br ovsbr0
ovs-vsctl add-br ovsbr0 -- set bridge ovsbr0 datapath_type=netdev
ovs-vsctl add-port ovsbr0 dpdk-10 \
    -- set interface dpdk-10 type=dpdk ofport_request=10 options:dpdk-devargs=0000:b1:00.0 \
    options:n_rxq=1
ovs-vsctl add-port ovsbr0 dpdk-11 \
    -- set interface dpdk-11 type=dpdk ofport_request=11 options:dpdk-devargs=0000:b1:00.1 \
    options:n_rxq=1

ovs-ofctl del-flows ovsbr0
ovs-ofctl add-flow ovsbr0 in_port=10,actions=output:11
ovs-ofctl add-flow ovsbr0 in_port=11,actions=output:10
ovs-ofctl dump-flows ovsbr0
[root@wsfd-advnetlab151 jhsiao]#

Comment 16 Jean-Tsung Hsiao 2022-05-19 13:46:44 UTC
Hi Eelco,
I would like to set the bug status to VERIFIED by EOB today.
Is that OK?
Thanks!
Jean

Comment 20 errata-xmlrpc 2022-05-27 18:05:34 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (openvswitch2.17), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHEA-2022:4792


Note You need to log in before you can comment on or make changes to this bug.