OpenWrt Forum Archive

Topic: MAC Control Frames (Type: 0x8808) from WRT54G with WhiteRussian

The content of this topic has been archived on 7 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hey Guys,

I am very new to OpenWrt, but am already amazed at how easy it is to set up and how well it works!.. Good job guys!!!
I've even created my own package and successfully downloaded it to the wrt54g, and it works like a charm!.. :-)

Now then, my question is as follows:

My package uses raw ethernet frames. In particular, I need to use IEEE 802.3 PAUSE Flow control frames, which are a type of MAC Control Frames whose TYPE field is 0x8808.

This is the format of a PAUSE Frame:

[Dst MAC  ] --  6-bytes
[Src MAC  ] --  6-bytes
[Type       ] --  2-bytes => Control Frame: 0x8808
[OpCode  ] --  2-bytes => PAUSE Frame: 0x0001
[Params   ] --  2-bytes => PAUSE Quanta (time to pause 0x0000 to 0xFFFF)
[Reserved] -- 46-bytes => Padding (all zeros)

I have notice that every time I try to send MAC Control Frames (type: 0x8808) nothing happens, that is, they do not get sent out of the router. In fact, I have narrowed down the problem to be the MAC Control Type field, since any other number in the type field works, but not 0x8808. I can see my raw frames coming out of the router as long as the type field is not 0x8808.

Routers are really not supposed to forward PAUSE frames. So, I'm thinking that somewhere in the WhiteRussian code/implementation there's gotta be a file that is checking for this "type" field and might dropping the packet if the frame has type 0x8808.

However, I don't know where to look to find out if my assumption is correct.
Does anybody know where I should look "specifically"? Or, Does someone else know if my problem is being caused by something else I'm not taking into account???

Any help with this, no matter how little it may be, will be greatly appreciated!

Thanks,

-Franco0007

Hello all,

I haven't had a single reply in a few days to my post (above), and I don't know if NOBODY knows :-(, or if I should post the question in a different forum..

Anybody????

Thanks,

-Franco0007

Most likely the PAUSE frame is eaten by the internal switch in the router; configuring the switch to forward such frames does not seem to be possible. Or maybe the network card attached to the port is eating received PAUSE frames internally, so you don't see them.

You may get better results if you use a router model which has some ports directly connected to the controller (without a switch), e.g., Linksys WRTSL54GS or ASUS WL-500W - on these models the WAN port is connected directly to the eth1 interface.

But what are you trying to do with PAUSE frames? Even if you manage to get such frames out of the router, almost any device will eat them anyway...

Hey vsu,

Thanks for your response!

Let me comment on a few things you mentioned:

How do I make sure the PAUSE frames are not being eaten up by the receiving end??
I have a NIC on my PC which which can be configured to accept flow control frames, a.k.a. PAUSE frames.
Not only does the NIC react to PAUSE frames, but it also lets the Wireshark driver (libpcap) see the PAUSE frames.
This I have already tested. And this is the PC connected to the router in which I'm hoping to see the PAUSE frames come out.
As I said before, anything with a type field different from 0x8808 works (that is, I can see/trace). However, the type field of a PAUSE frame is 0x8808.

The PAUSE frames are indeed being "eaten up" in the router.
However, this is not a hardware issue, but a software issue.
As I mentioned before, routers are really not supposed to generate (let alone route/forward) PAUSE frames, mainly because they are MAC CONTROL frames. They're only intended to travel 1 hop at a time.
The MAC chip in the WRT53G (Broadcom's) does indeed generate and react to PAUSE frames (IEEE 802.3x), but something in the "Routing" software of OpenWRT must be dropping these frames before they leave the router.

Why am I using PAUSE frames?
To make a long story short, this is part of a project I'm working on, and because Flow control is now part of the standard for Gigabit Ethernet, this is the right way to go. Whether people enable or disable Flow control is a completely different issue (besides the scope of this forum) and we could debate back and forth about that for years, but that's what I'm using..

Once again, thanks for at least posting something here!..

-Franco0007

Just a question: Does your 54G have a dedicated WAN port?  Or does it use VLANs (eth0.1, eth0.2)?

What happens if you disable vlans completely (maybe from /proc/switch) and have it send it directly through eth0?

Hello I'm new to this Forum,

Firstly excuse me because my english is not very good, I'm also working in a Project with Pause Frame and I have a similar problem but  my really problem is that  I send PAUSE frames to the PC and I´m sure the PC receive  sent PAUSE frames  because the Ethereal and Wireshark see PAUSE frames but in Ethereal and Wireshark captures I can also see that PC continues sending frames to router even though I have sent a PAUSE frame with PAUSE quante=0xFFFF,  in conclusion the PC don´t stop sending frames although It receives PAUSE frames (and flow control are activated in my 3com card and also Full Duplex mode).

If somebody could also help me I would be very grateful; and if you, Franco0007, had solved your problem please I would be also very grateful if you could help me.


PD.: Franco0007 I have sent you a PM with my mail and if you still have your problem with pause frames we can "speak" to try to solve our "PAUSE frames" problems.  Thanks.

This is the format of a PAUSE Frame:

[Dst MAC  ] --  6-bytes
[Src MAC  ] --  6-bytes
[Type       ] --  2-bytes => Control Frame: 0x8808
[OpCode  ] --  2-bytes => PAUSE Frame: 0x0001
[Params   ] --  2-bytes => PAUSE Quanta (time to pause 0x0000 to 0xFFFF)
[Reserved] -- 42-bytes => Padding (all zeros)
[CRC] -- 4-bytes => CRC32

Hey guys,

Thanks to phorn and OscarCG for replying!..

=============================================================================
phorn:
My WRT54G has two VLANs, (VLAN0 and VLAN1) set up as follows:

VLAN0=>(Ports 1, 2, 3, 4)
VLAN1=>(WAN port)

I did disable the VLAN's completely, but that did not work either.. In fact, that caused more problems than I'd expected..

Thank you for your suggestion, though...

Do you have any more suggestions????????????
=============================================================================


=============================================================================
OscarCG:
Let me make sure I understand your problem:

You're sending PAUSE frames to a PC and you can see them using ethereal/wireshark. That means they're reaching the PC.
Question: Are you sending them out of your WRT54G router (that is, do you have your own process in the firmware that sends them??) yes/no?

If yes, how did you get them to go out of the router?? What configuration did you use??

You also said the PC continues to send PAUSE frames to the router. So, who is sending the PAUSE frames? The PC or the router??..
Or, are you sending the PAUSE frames from one PC to another PC through the router???? In which case, is the router forwarding PAUSE frames?

In any case, you also said that the PC doesn't stop sending PAUSE frames even after it has received a PAUSE frame and your NIC is configured appropriately..
ANSWER:
You have to remember that PAUSE frames are CONTROL frames, and CONTROL frames are the only type of frames that WILL NOT be PAUSEd by another PAUSE frame. That is part of the IEEE 802.3x PAUSE FLOW CONTROL standard (check it out online). In fact, what you're seeing is completely normal. That's the way it should work!!

The main reason for that is to allow the resetting of a PAUSE quanta.
Example, let's say you send a PAUSE frame with a quantum of 0xFFFF in a 100Mbps link. That's about/roughly a pause for 300ms. Imagine that after 100ms you no longer need to wait the extra 200ms. In order to tell the other end of the link to resume sending data, you can send another PAUSE frame with a quantum of 0x0000 (zero pause time) which will reset the other end of the link and make it resume sending data immediately.

In your case, the PC that is receiving the PAUSE frames can still send out "CONTROL" frames, which in your case they're just PAUSE frames also.

I hope my explanation above was clear enough, but if not, feel free to ask/email me..

I'd also really appreciate it if you could answer the questions I asked you above...
=============================================================================


Thanks!

-Franco0007

Tranks Franco. My  configuration is in resume:   Flow of information: ROUTER->FPGA->PC and ROUTER<-FPGA<-PC because is FullDuplex, My FPGA only receives frames from Router and send the frames to PC and the same for the other from PC to Router and when I want  I push a button in my FPGA card to send PAUSE frames to PC; and because of FullDuplex configuration  Router have to continue sending frames to PC, but PC have to stop sending "NO CONTROL" frames to Router.

But my problem is that PC , after have receipt PAUSE frames, continues sending "NO CONTROL" frames to Router, yes PC can send CONTROL frames, but my problem is that PC continues sending both, CONTROL frames and NO CONTROL frames (http, TCP,ARP,...)

And I see at ethereal Pause frames are correctly receipt by PC, but PC don´t obey my PAUSE frames.

I hope you understand my explanation and if somebody have some idea about why PC don´t obey PAUSE frames
I will be very grateful because I've been long time trying to find the solution for this problem.

Thanks a lot

The discussion might have continued from here.