From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id 1533343E94 for ; Wed, 17 Apr 2024 19:06:44 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id C891140DDD; Wed, 17 Apr 2024 19:06:43 +0200 (CEST) Received: from mail-lj1-f182.google.com (mail-lj1-f182.google.com [209.85.208.182]) by mails.dpdk.org (Postfix) with ESMTP id 9BB5F40DDA for ; Wed, 17 Apr 2024 19:06:41 +0200 (CEST) Received: by mail-lj1-f182.google.com with SMTP id 38308e7fff4ca-2d6ff0422a2so72638821fa.2 for ; Wed, 17 Apr 2024 10:06:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bisdn-de.20230601.gappssmtp.com; s=20230601; t=1713373601; x=1713978401; darn=dpdk.org; h=content-language:in-reply-to:from:to:references:subject:user-agent :mime-version:date:message-id:from:to:cc:subject:date:message-id :reply-to; bh=nd5la5zjwBb4HYKTi2mj+oAfLrCymEgecy56nF3cT+Y=; b=Of9p3vDzgF0Rj74zB5y53G/1O9LclUJiam5K0HfswSO7+RqzTcaBaMI5zBP12C2dMw xSjhEokgQB16V9FbsXjiqjCUufOKM9n/MbJ6CTT3Su/cwE22K26u/HNoDATUsVNSx9JI 0Lf9HyFTsq1mMe2Nytm/CHEJH8XLjgRZb7RqXzdDBAH5EKVUnw+J+1bttOQP+QqUrsRX pLPX/Q8kouqsxQrgdwLYbgwmr+0qi02GeYdsAUltb9xKbHG1It8v4nWIZdfqxz/Ir5qh ZcKG/B6BHxubKLj6SoP5HpwHRbzUyTbijai1EdFRdzF9vfiCqEPw4L9VVZ5ZFg5Hl70z xhtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1713373601; x=1713978401; h=content-language:in-reply-to:from:to:references:subject:user-agent :mime-version:date:message-id:x-gm-message-state:from:to:cc:subject :date:message-id:reply-to; bh=nd5la5zjwBb4HYKTi2mj+oAfLrCymEgecy56nF3cT+Y=; b=No1RzVswtp+LpiJZjMC5BE7J99CHQRTrGiHF+ZZ9K7Xhft+1NABLKvelGYlMJ0AZ0z wt4Bu96M0lSXR4P8bm2h3Jj0c25TS2n56xr9CNeAjUpLS+N4w34SSHlZGQIFJsZ1oRE9 sQVAFIIQ7xR6K06kZdykr1b2g4mOBOxBQSzn3RKN542dAMt4bAr6o+NDSS7XMD5kwTMu LRf+3HsLkcr0eZc6yr7H0F19q6DeLRCHSxKDpRyZlUk9LIqIFuuRT1ObrVkYP74pCnDA C1LKozq+NJQbhyN7eFDveR67rXcnVKZBmjMTnyQCg6oBsxen967zTOtmO162ILUntFFY k3cQ== X-Gm-Message-State: AOJu0YxoOTgHPufzhm8135jtFU2jrnREmHKGfwq46wryHx6DCgIJxCcR Sgbb6cVUD3InL8axjCp6kgei9f0yVrqBG5e5A2n3OlhZoH0jcXq0OONb4dQ3oSC0vbtPGXUG00s dfWgbWYHEQyTSPHXPqVV8hvZCT00ZQD7MIUp8ja1xwKXSVozN9Zgr X-Google-Smtp-Source: AGHT+IHuuZ73mpcQQwSgjVuZRYx4ZUeiwKd+9Pp2VfsW4erF8NoVvrQUtYI7O4mRV8GDQmfNbk4XXQ== X-Received: by 2002:a2e:9ed7:0:b0:2d8:9c43:e7ce with SMTP id h23-20020a2e9ed7000000b002d89c43e7cemr11113336ljk.10.1713373600848; Wed, 17 Apr 2024 10:06:40 -0700 (PDT) Received: from ?IPV6:2001:2044:1409:5a00:5489:312b:61d5:9a75? ([2001:2044:1409:5a00:5489:312b:61d5:9a75]) by smtp.gmail.com with ESMTPSA id k8-20020a05651c0a0800b002d85452f55csm1927977ljq.47.2024.04.17.10.06.40 for (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Wed, 17 Apr 2024 10:06:40 -0700 (PDT) Message-ID: <0afcef7d-08a5-5696-ef13-a1ba4ad9ace2@bisdn.de> Date: Wed, 17 Apr 2024 19:06:39 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.13.0 Subject: Trex with mlx5 driver - Multiple streams with different VLAN priority causes high CPU utilization References: <7efda351-e554-4120-5a61-3b0a534189e2@bisdn.de> To: users@dpdk.org From: Rubens Figueiredo In-Reply-To: <7efda351-e554-4120-5a61-3b0a534189e2@bisdn.de> X-Forwarded-Message-Id: <7efda351-e554-4120-5a61-3b0a534189e2@bisdn.de> Content-Type: multipart/alternative; boundary="------------M4yKmZMi8R0ZSlgtLuW4NgM1" Content-Language: en-US X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: users-bounces@dpdk.org This is a multi-part message in MIME format. --------------M4yKmZMi8R0ZSlgtLuW4NgM1 Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: quoted-printable Hello community, I am facing a strange issue in the Trex stateless code, version v3.02=20 and v3.04. I am using the Mellanox Cx-5, and have created two VFs on top=20 of the PF 0. The mlx5_core version I am using is the 5.7-1.0.2, and the=20 ofed version is MLNX_OFED_LINUX-5.7-1.0.2.0 (OFED-5.7-1.0.2). I have created the following issue in the trex-core repository=20 [here](https://github.com/cisco-system-traffic-generator/trex-core/issues/1= 124),=20 and was recommended to post the issue in here. In the github issue you=20 see screenshots of the issue I am facing. I am trying to create two parallel streams with different VLAN=20 priorities, but the load generated is not what I expect it to be, and=20 CPU util. seems incredibly high (~99%). I have reproduced this issue with the --software and non software version. The script I used is below. |import stl_path from trex.stl.api import * import time import pprint=20 from ipaddress import ip_address, ip_network import argparse import=20 configparser import os import json def get_packet(tos, mac_dst, ip_src,=20 size): # pkt =3D Ether(src=3D"02:00:00:00:00:01",dst=3D"00:00:00:01:00:01")= /=20 IP(src=3D"10.0.0.2", tos=3Dtos) / UDP(sport=3D4444, dport=3D4444) pkt =3D (= =20 Ether(src=3D"00:01:00:00:00:02", dst=3Dmac_dst) #=20 Ether(dst=3D"11:11:11:11:11:11") # / Dot1AD(vlan=3D0) / Dot1Q(vlan=3D0,=20 prio=3Dtos) / IP(src=3Dip_src) / UDP(sport=3D4444, dport=3D4444) ) pad =3D = max(0,=20 size - len(pkt)) * "x" return pkt / pad def main(): """ """ tx_port =3D 0= =20 rx_port =3D 1 c =3D STLClient() # connect to server c.connect() # prepare= =20 our ports c.reset(ports=3D[tx_port, rx_port]) streams =3D [] s =3D STLStrea= m(=20 packet=3DSTLPktBuilder( pkt=3Dget_packet(4,"00:11:22:33:44:55",=20 "10.1.0.2",512), # vm =3D vm, ), isg=3D0 * 1000000,=20 mode=3DSTLTXCont(pps=3D1.2*10**6), # flow_stats =3D STLFlowLatencyStats(pg_= id=20 =3D 0) flow_stats =3D STLFlowStats(pg_id=3D0), ) streams.append(s) s2 =3D= =20 STLStream( packet=3DSTLPktBuilder( pkt=3Dget_packet(2,"00:11:22:33:44:55",= =20 "10.1.0.2",512), # vm =3D vm, ), isg=3D0 * 1000000,=20 mode=3DSTLTXCont(pps=3D1.2*10**6), # flow_stats =3D STLFlowLatencyStats(pg_= id=20 =3D 0) flow_stats =3D STLFlowStats(pg_id=3D1), ) streams.append(s2)=20 c.add_streams(streams, ports=3D[tx_port]) c.clear_stats()=20 c.start(ports=3D[tx_port], duration=3D60, mult=3D"25gbpsl1")=20 c.wait_on_traffic(ports=3D[tx_port, rx_port]) stats =3D c.get_stats()=20 print(stats) if __name__ =3D=3D "__main__": main() And the configuration is= | |- port_limit: 2 version: 2 port_bandwidth_gb: 100 interfaces:=20 ["3b:00.2", "3b:00.3"] port_info: - dest_mac: 00:00:00:00:00:01 src_mac:=20 00:01:00:00:00:01 - dest_mac: 00:00:00:00:00:02 src_mac:=20 00:01:00:00:00:02 c: 14 platform: master_thread_id: 8 latency_thread_id:=20 27 dual_if: - socket: 0 threads:=20 [9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]| --=20 BISDN GmbH K=C3=B6rnerstra=C3=9Fe 7-10 10785 Berlin Germany Phone:=20 +49-30-6108-1-6100 Managing Directors:=C2=A0 Dr.-Ing. Hagen Woesner, Andreas=20 K=C3=B6psel Commercial register:=C2=A0 Amtsgericht Berlin-Charlottenburg HRB 141569=20 B VAT ID No:=C2=A0DE283257294 --------------M4yKmZMi8R0ZSlgtLuW4NgM1 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hello community,

I am facing a strange issue in the Trex stateless code, version v3.02 and v3.04. I am using the Mellanox Cx-5, and have created two VFs on top of the PF 0. The mlx5_core version I am using is the 5.7-1.0.2, and the ofed version is MLNX_OFED_LINUX-5.7-1.0.2.0 (OFED-5.7-1.0.2).

I have created the following issue in the trex-core repository [here](= https://github.com/cisco-system-traffic-generator/trex-core/issues/1124= ), and was recommended to post the issue in here. In the github issue you see screenshots of the issue I am facing.

I am trying to create two parallel streams with different VLAN priorities, but the load generated is not what I expect it to be, and CPU util. seems incredibly high (~99%).

I have reproduced this issue with the --software and non software version.

The script I used is below.

import=
 stl_path
from trex.stl.api import *

import time
import pprint
from ipaddress import ip_address, ip_network

import argparse
import configparser
import os
import json


def get_packet(tos, mac_dst, ip_src, size):
    # pkt =3D Ether(src=3D"02:00:00:00:00:01",dst=3D"00:00:00:01:00:01") / =
IP(src=3D"10.0.0.2", tos=3Dtos) / UDP(sport=3D4444, dport=3D4444)

    pkt =3D (
        Ether(src=3D"00:01:00:00:00:02", dst=3Dmac_dst)
        # Ether(dst=3D"11:11:11:11:11:11")
        # / Dot1AD(vlan=3D0)
        / Dot1Q(vlan=3D0, prio=3Dtos)
        / IP(src=3Dip_src)
        / UDP(sport=3D4444, dport=3D4444)
    )
    pad =3D max(0, size - len(pkt)) * "x"

    return pkt / pad

def main():
    """ """
    tx_port =3D 0
    rx_port =3D 1

    c =3D STLClient()

    # connect to server
    c.connect()

    # prepare our ports
    c.reset(ports=3D[tx_port, rx_port])

    streams =3D []
    s =3D STLStream(
        packet=3DSTLPktBuilder(
            pkt=3Dget_packet(4,"00:11:22:33:44:55", "10.1.0.2",512),
            # vm =3D vm,
        ),
        isg=3D0 * 1000000,
        mode=3DSTLTXCont(pps=3D1.2*10**6),
        # flow_stats =3D STLFlowLatencyStats(pg_id =3D 0)
        flow_stats =3D STLFlowStats(pg_id=3D0),
    )

    streams.append(s)

    s2 =3D STLStream(
        packet=3DSTLPktBuilder(
            pkt=3Dget_packet(2,"00:11:22:33:44:55", "10.1.0.2",512),
            # vm =3D vm,
        ),
        isg=3D0 * 1000000,
        mode=3DSTLTXCont(pps=3D1.2*10**6),
        # flow_stats =3D STLFlowLatencyStats(pg_id =3D 0)
        flow_stats =3D STLFlowStats(pg_id=3D1),
    )

    streams.append(s2)

    c.add_streams(streams, ports=3D[tx_port])

    c.clear_stats()

    c.start(ports=3D[tx_port], duration=3D60, mult=3D"25gbpsl1")

    c.wait_on_traffic(ports=3D[tx_port, rx_port])

    stats =3D c.get_stats()
    print(stats)

if __name__ =3D=3D "__main__":
    main()


And the configuration is=20
- port=
_limit: 2
  version: 2
  port_bandwidth_gb: 100
  interfaces: ["3b:00.2", "3b:00.3"]
  port_info:
    - dest_mac: 00:00:00:00:00:01
      src_mac: 00:01:00:00:00:01
    - dest_mac: 00:00:00:00:00:02
      src_mac: 00:01:00:00:00:02
  c: 14
  platform:
    master_thread_id: 8
    latency_thread_id: 27
    dual_if:
      - socket: 0
        threads: [9,10,11,12,13,14,15,16,17,18,19,20,21,22,23,24,25,26]


BISDN GmbH
K=C3=B6rnerstra=C3=9Fe 7-10
10785 Berlin
Germany<= /div>

Phone: +49-30-6108-1-6100

Managing Directors:=C2=A0<= /font>
Dr= .-Ing. Hagen Woesner, Andreas K=C3=B6psel

Commercial registe= r:=C2=A0
Amtsgericht Berlin-Charlottenburg HRB 141569 B<= /div>
VAT ID No= :=C2=A0D= E283257294

--------------M4yKmZMi8R0ZSlgtLuW4NgM1--