LS1028ardb - Qbv on switch port

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

LS1028ardb - Qbv on switch port

1,643 Views
bhavya1
Contributor II

Hello All,

I have few query on running Qbv on switch port LS1028ardb layerspace hardware.

1) For endpoints using tc command to assign priority->class->tx-queue mapping.

But i am not aware of configuring tx-queue for switch port.

If ethtool is done ("ethtool -S swp1"), it doesn't show multiple tx queue listed

Command used on end points is as below:

 tc qdisc add dev eno0 root mqprio num_tc 8 map 0 1 6 7 2 3 4 5 queues 1@0 1@1 1@2 1@3 1@4 1@5 1@6 1@7 hw 1

2) Is qbvset commad working properly for switch  ports?

When queried on switch port, configuration values showed is not correct.

[2019-07-10 17:22:29.389] root@localhost:~# cat > qbv.txt << EOF                                                                               
[2019-07-10 17:22:36.277] > t0 11111111b 5600
[2019-07-10 17:22:42.601] > t1 00000000b 1000000
[2019-07-10 17:23:13.398] > EOF


root@localhost:~# tsntool qbvset --device swp0 --entryfile qbv.txt              
[2019-07-10 17:23:23.772] tsntool: invalid option -- '-'
[2019-07-10 17:23:23.775] tsntool: invalid option -- 'd'
[2019-07-10 17:23:23.778] echo reply:test netlink
[2019-07-10 17:23:23.780] echo reply:1
[2019-07-10 17:23:23.798] echo reply:swp0
[2019-07-10 17:23:23.799] echo reply:0
[2019-07-10 17:23:23.814] root@localhost:~#
[2019-07-10 17:23:24.270] root@localhost:~#

Qbvget is showing wrong period time

[2019-07-10 17:27:10.862] root@localhost:~# tsntool qbvget --device swp0
[2019-07-10 17:27:16.133] tsntool: invalid option -- '-'
[2019-07-10 17:27:16.136] tsntool: invalid option -- 'd'
[2019-07-10 17:27:16.139] echo reply:test netlink
[2019-07-10 17:27:16.141] echo reply:1
[2019-07-10 17:27:16.149] echo reply:swp0
[2019-07-10 17:27:16.149] tsn: len: 0088 type: 0005 data:
[2019-07-10 17:27:16.149]   level2: nla->_len: 88 type: 11
[2019-07-10 17:27:16.150]
[2019-07-10 17:27:16.150]    listcount = 2
[2019-07-10 17:27:16.151]    level3: nla->_len: 28 type: 6
[2019-07-10 17:27:16.154]
[2019-07-10 17:27:16.154]      entryid = 0
[2019-07-10 17:27:16.156]      gate = ff
[2019-07-10 17:27:16.157]      timeperiod = 989680
[2019-07-10 17:27:16.160]    level3: nla->_len: 28 type: 6
[2019-07-10 17:27:16.163]
[2019-07-10 17:27:16.163]      entryid = 1
[2019-07-10 17:27:16.164]      gate = 00
[2019-07-10 17:27:16.166]      timeperiod = ffff0000
[2019-07-10 17:27:16.168]    cycletime = 98ac60
[2019-07-10 17:27:16.170]    basetime = 39b19ca7ec6
[2019-07-10 17:27:16.173]    configchangetime = 39b1a632b26
[2019-07-10 17:27:16.176]    currenttime = 4581713e8e6
[2019-07-10 17:27:16.178]    listmax = 40
[2019-07-10 17:27:16.180] json structure:
[2019-07-10 17:27:16.181]  {
[2019-07-10 17:27:16.182]       "oper": {
[2019-07-10 17:27:16.183]               "listcount":    2,
[2019-07-10 17:27:16.184]               "list": {
[2019-07-10 17:27:16.185]                       "entryid":      0,
[2019-07-10 17:27:16.187]                       "gate": 255,
[2019-07-10 17:27:16.188]                       "timeperiod":   10000000
[2019-07-10 17:27:16.191]               },
[2019-07-10 17:27:16.191]               "list": {
[2019-07-10 17:27:16.192]                       "entryid":      1,
[2019-07-10 17:27:16.194]                       "gate": 0,
[2019-07-10 17:27:16.195]                       "timeperiod":   4294901760
[2019-07-10 17:27:16.198]               },
[2019-07-10 17:27:16.198]               "cycletime":    10005600,
[2019-07-10 17:27:16.201]               "basetime":     3964687515334
[2019-07-10 17:27:16.203]       },
[2019-07-10 17:27:16.204]       "configchangetime":     3964697520934,
[2019-07-10 17:27:16.207]       "currenttime":  4776390813926,
[2019-07-10 17:27:16.212]       "listmax":      64
[2019-07-10 17:27:16.212] }

Tags (3)
0 Kudos
6 Replies

1,319 Views
yipingwang
NXP TechSupport
NXP TechSupport
Example:    
# tc qdisc add dev eth0 root mqprio num_tc 2 map 0 0 0 0 1 1 1 1 queues 4@0 4@4 hw 1 

pastedImage_1.png
echo “t0 00000000b 20000” > qbv0.txt
 #Explain:
 # 'NUMBER' : t0
 # 'GATE_VLAUE' : 00000000b
 # 'TIME_LONG' : 20000 ns
 cp libtsn.so /lib
 ./tsntool
 tsntool> verbose
 tsntool> qbvset --device eth5 --entryfile ./qbv0.txt
 #send one broadcast frame to eth4 from TestCenter.
 ethtool -S eth5
 #Should not get any frame from eth5 on TestCenter.
 echo “t0 11111111b 20000” > qbv0.txt
 tsntool> qbvset --device eth5 --entryfile ./qbv0.txt
 #send one broadcast frame to eth4 on TestCenter.
 ethtool -S eth5
 #Should get one frame from eth5 on TestCenter.
0 Kudos

1,318 Views
bhavya1
Contributor II

Hello Yiping Wang,

Thanks for the response.

My doubt is when i use multiple slot, like 

“t0 11111111b 20000”

“t1 00000000b 120000”

And check through qbvget command, timeperiod showed is not proper it is mapping wrong values

like :  timeperiod for 0 set to 120000 and slot t1 set to 4294901760. (Ideally t0 should be set to 20000 and t1 to 120000)

Another query i have :

I am using libtsn.so library from my application to configure qbv. Now "tsn_qos_port_qbv_set" itself takes some  ~300micro seconds to return.

I need to synchronize application with the TAS scheduler. Is there a mechanism through which application can come to know exactly when gate is opened or closed?

Thanks.

0 Kudos

1,318 Views
yipingwang
NXP TechSupport
NXP TechSupport

root@localhost:~# cat qbv1.txt
t0 11111111b 10000
t1 00000000b 99990000

tsntool> qbvset --device eno0 --entryfile qbv1.txt

echo reply:eno0
echo reply:0
tsntool> qbvget --device eno0

echo reply:eno0
tsn: len: 0088 type: 0005 data:
  level2: nla->_len: 88 type: 11

   listcount = 2
   level3: nla->_len: 28 type: 6

     entryid = 0
     gate = ff
     timeperiod = 2710
   level3: nla->_len: 28 type: 6

     entryid = 1
     gate = 00
     timeperiod = 5f5b9f0
   cycletime = 5f5e100
   basetime = 279c7a5f4b
   configchangetime = 27a866214b
   currenttime = 2c09411ffc
   listmax = 40
json structure:
 {
        "oper": {
                "listcount":    2,
                "list": {
                        "entryid":      0,
                        "gate": 255,
                        "timeperiod":   10000
                },
                "list": {
                        "entryid":      1,
                        "gate": 0,
                        "timeperiod":   99990000
                },
                "cycletime":    100000000,
                "basetime":     170128990027
        },
        "configchangetime":     170328990027,
        "currenttime":  189133823996,
        "listmax":      64
}

0 Kudos

1,318 Views
bhavya1
Contributor II

Hello Yiping Wang,

Thanks for the response.

On endpoint it is working fine.. Problem i am facing is with  configuring Qbv on switch port.

1) Qbv Configuration set is

qbv entry: number: 0     state: 10000000b       time: 12000---(conf + 0) = 0x3ed1ada0, ->gce.gate_state = 80, ->gce.time_interval = 12000
qbv entry: number: 1     state: 01111111b       time: 2873563---(conf + 1) = 0x3ed1ada8, ->gce.gate_state = 7f, ->gce.time_interval = 2873563
2) root@localhost:~# tsntool qbvget --device swp0
tsntool: invalid option -- '-'
tsntool: invalid option -- 'd'
echo reply:test netlink
echo reply:1
echo reply:swp0
tsn: len: 0090 type: 0005 data:
  level2: nla->_len: 96 type: 11

   listcount = 2
   level3: nla->_len: 28 type: 6

     entryid = 0
     gate = 80
     timeperiod = 2bd8db
   level3: nla->_len: 28 type: 6

     entryid = 1
     gate = 7f
     timeperiod = ffff0000
   gatestate = 7f
   cycletime = 2c07bb
   basetime = 17533bc4486
   configchangetime = 17533e84c41
   currenttime = 1772f617106
   listmax = 40
json structure:
 {
        "oper": {
                "listcount":    2,
                "list": {
                        "entryid":      0,
                        "gate": 128,
                        "timeperiod":   2873563
                },
                "list": {
                        "entryid":      1,
                        "gate": 127,
                        "timeperiod":   4294901760
                },
                "gatestate":    127,
                "cycletime":    2885563,
                "basetime":     1602890777734
        },
        "configchangetime":     1602893663297,
        "currenttime":  1611407651078,
        "listmax":      64
}
0 Kudos

1,318 Views
chuck_payette
Contributor I

Hi,

I see the same behavior.  Did you find out anything more?

Thanks!

0 Kudos

1,318 Views
bhavya1
Contributor II

Hello,

No. We have raised ticket, still awaiting for response.

Regards,

Bhavya R

0 Kudos