Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Traffic capture of raw primitives #54

Open
bluecmd opened this issue Sep 10, 2020 · 2 comments
Open

Traffic capture of raw primitives #54

bluecmd opened this issue Sep 10, 2020 · 2 comments
Labels
enhancement New feature or request fc Affects the Fibre Channel part

Comments

@bluecmd
Copy link
Owner

bluecmd commented Sep 10, 2020

From playing around with fejkon with some actual FC traffic it has become clear that there will be a need to capture behavior on the primitives.

For example when debugging why Brocade loopbacks wouldn't come up in #26 it seems the Brocade switch sends a bunch of primitives that fejkon 1) does not know about and 2) implementing would be infeasible.

Switching to xcvr <-> xcvr based mode is in progress which means that supporting this kind of traffic will be done, but in order to analyze this kind of low-level traffic there needs to be a way to capture essentially a waveform of the primitives.

I have been thinking about something like this:

                        csr
                         +
                         |
                    +----v---------+           +------------+
                    |              |           |            |
    +---------+     |              +---------->+   Memory   <-------+
+-->+  Port 0 +---->+              |           |            |       |
    +---------+     |      RLE     |           +------------+       |
    +---------+     |    Encoder   |           +------------+       |
+-->+  Port 1 +---->+              |           |            |       |
    +---------+     |              +---------->+   Memory   <-------+
                    |              |           |            |       |
                    +-----^--------+           +------------+       |
                          |                                         |
                          +                                         |
                      106.25 MHz                                    |
                                                                    |
                                                                    |
                                                                    +
                                                                  Data

Writing to a fixed-sized memory should allow one to trigger a ~synchronized capture of Port 0 and 1 being written to two memories encoded using RLE. A simple data format such as 64-bit formatted as 24-bit count | 4-bit metadata | 4-bit K-value | 32-bit value should be fine. 24-bit counter means that a fully idle stream will write out 7x idle frames every second as the counter wrap around is reached. This should be ample for our needs.

@bluecmd bluecmd added the enhancement New feature or request label Sep 10, 2020
@bluecmd bluecmd changed the title Implement traffic capture of raw primitives Traffic capture of raw primitives Sep 10, 2020
@bluecmd bluecmd added the fc Affects the Fibre Channel part label Sep 10, 2020
@bluecmd bluecmd added this to the Analyzer Alpha milestone Sep 10, 2020
@bluecmd
Copy link
Owner Author

bluecmd commented Sep 10, 2020

Framer state will likely not be part of the metadata, as this will be driven by observed traffic only. It would be a huge pain to try to align the state transitions to be cycle accurate as well.

@bluecmd
Copy link
Owner Author

bluecmd commented Sep 10, 2020

Making the encoder have 4 inputs and 4 memories is probably the easiest to scale up when the other ports are activated.
The chip has up to 6.25 MiB block memory, so reserving something like 256 KiB per port seems fine (configurable?).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request fc Affects the Fibre Channel part
Projects
None yet
Development

No branches or pull requests

1 participant