CEETM weighted bandwidth

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

CEETM weighted bandwidth

1,030件の閲覧回数
wenceslas_godar
Contributor III

Dea rall,

I work with a LS2088 evaluation board and try to make a sharing of bandwidth thanks to the weighted allocation as described on LSDK 19.09 User Guide section "8.3.2.3.4.15.4 Example".*

Note that I first set up a Linux bridge (brctl) to have the layer 2 switching capabilities

However, it seems this weigthed allocation of bandwidth is not working in my environment.

My question is how to make theis CEETM feature work? should I implement a DPSW instead of a Linux bridge (if yes, where to find more explantion on how to set it up along with "tc qdisc" ceetm please) ?

is the UG section * up to date ? 

3 返答(返信)

957件の閲覧回数
yipingwang
NXP TechSupport
NXP TechSupport

 I will try to give an answer in correlation  with  the relative image of the depicted use case:

 

If the customer wants to forward traffic  and use shaping accelerated in HW then the interfaces must not be put in a bridge because the forwarding will be done in the stack and no offload would be performed on the egress of one interface towards the other.

To perform shaping using the CEETM, traffic will have to be transmitted into a DCP (direct connected portal) or recycle path port.

(DCP is used in case of a linux interface connected to a DPMAC while reccycle path is used when two interfaces are connected back to back or a Linux interface is connected to a switch internal port)

 

In the customer case a l2sw object should be used.

I will give an example of a l2sw object with one external port (front panel port) connected to dpmac.1 and two internal ports connected to two linux network interfaces.

On each interface the customer can apply qdiscs using the tc (in fact using the example from LSDK chapter)

 

To create the switch the following commands can be used:

ls-addni -n -t=8

ls-addni -n -t=8

 

Output:

Created interface: eth2 (object:dpni.1, endpoint: ) Created interface: eth3 (object:dpni.2, endpoint: ) The above commands create two net devices associated with dpni.1 and dpni,.2 and not connected to an endpoint.

 

Create the switch:

ls-addsw -o=DPSW_OPT_CTRL_IF_DIS  -i=3  dpmac.1 dpni.1 dpni.2

 

Output:

Created ETHSW object dpsw.0 with the following 3 ports: eth4,eth5,eth6

 

Now the linux interfaces are connected to the switch ports represented by eth5 and eth6.

 

The next step is to  add the interfaces in a bridge:

 

for i in `seq 2 6`; do ip link set "eth$i" down; ip link set "eth$i" address "00:00:00:00:00:0$i" ;ip link set "eth$i" up; done

 

ip link add name br0 type bridge

ip link set br0 up

 

for i in `seq 2 6`; do ip link set "eth$i" master br0; done

 

 

To display info about the switch, one will execute:

 

restool dpsw info dpsw.0

dpsw version: 8.4

dpsw id: 0

plugged state: plugged

endpoints:

interface 0:

        connection: dpmac.1

        link state: up

interface 1:

        connection: dpni.1

        link state: up

interface 2:

        connection: dpni.2

        link state: up

dpsw_attr.options value is: 0x10

        DPSW_OPT_CTRL_IF_DIS

max VLANs: 16

max FDBs: 1

frame storage memory size: 32768

number of interfaces: 3

current number of VLANs: 1

current number of FDBs: 1

 

 

The next step is to create the qdisc for shaping together with the queues based on the example in the LSDK for the linux interfaces connected to the switch internal ports. The linux interfaces are: eth2 and eth3.

957件の閲覧回数
wenceslas_godar
Contributor III

I followed your example, and I tried to add the CEETM on the linux interface (following the example with the simplest filter ever "tc filter protocol all u32 match u32 0 0 …") but I can not see any packets goingin in the class or qdisc (usgin the "tc -s class show" and "tc -s qdisc show").

This surprised me because, when I used the pure linux bridge I could see the tc counter increment, even if I could not see the traffic shaping working wlll, -> now I can not see Nothing going on at all !!!!!!

So first a question: did I got it right to use "dpsw" and "tc ceetm" together, because you mentionned some DCP in your first answer and I first thought I shall not use Nothing like bridge (even if after you propose "tc link add br0 type bridge")? 

Next, i when I type restool: I got DPSW is version 8.3 and not 8.4 and also: 

"FRAME STORAGE MEMORY SIZE: 0"     instead of "32768" in your example  

---> could it be a Reason ? how to fix this  ?

0 件の賞賛
返信

957件の閲覧回数
yipingwang
NXP TechSupport
NXP TechSupport

Can you enable logging in the DPC and set it to LOG_LEVEL_WARN?

 

and then do a cat on dev/fsl_mc_console?

      mc_general {

                log {

                        mode = "LOG_MODE_ON";

                        level = "LOG_LEVEL_WARN";

                };

                console {

                        mode = "CONSOLE_MODE_OFF";

                        uart_id = <3>;

                };

 

Also, what MC version are you using?

Do you use LSDK 1909?

0 件の賞賛
返信