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

[PATCH CATERPILLAR v1] linux-gen: add cxgbe RX slot mode support #442

Conversation

MykytaI
Copy link
Contributor

@MykytaI MykytaI commented Feb 1, 2018

To use RX slot_mode one needs to redefine CXGB4_RX_BUF_SIZE_INDEX=2 either
in cxgbe4.c locally or via CFLAGS in ./configure

One needs supplementary patch on kernel driver applied as well as load
kernel driver with rx_mode=1 parameter.

Signed-off-by: Mykyta Iziumtsev mykyta.iziumtsev@linaro.org

To use RX slot_mode one needs to redefine CXGB4_RX_BUF_SIZE_INDEX=2 either
in cxgbe4.c locally or via CFLAGS in ./configure

One needs supplementary patch on kernel driver applied as well as load
kernel driver with rx_mode=1 parameter.

Signed-off-by: Mykyta Iziumtsev <mykyta.iziumtsev@linaro.org>
@muvarov muvarov changed the title linux-gen: add cxgbe RX slot mode support [PATCH CATERPILLAR v1] linux-gen: add cxgbe RX slot mode support Feb 1, 2018
#define CXGB4_RX_BUF_SIZE_INDEX_9000 0x3UL

/* Default RX buffer size index to use */
#ifndef CXGB4_RX_BUF_SIZE_INDEX
Copy link
Contributor Author

@MykytaI MykytaI Feb 1, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The question is if we need to reverse CXGB4_RX_BUF_SIZE_INDEX <-> CXGB4_RX_BUF_SIZE dependency and have CXGB4_RX_BUF_SIZE as configuration option (possible values at the moment are 2048 and 4096). Probably then it will be more intuitively understandable and we'll hide HW specific index stuff.

That is:

#ifndef CXGB4_RX_BUF_SIZE
#define CXGB4_RX_BUF_SIZE 4096
#endif

CXGB4_RX_BUF_SIZE == 2048 => define CXGB4_RX_BUF_SIZE_INDEX CXGB4_RX_BUF_SIZE_INDEX_1500
CXGB4_RX_BUF_SIZE == 4096 => define CXGB4_RX_BUF_SIZE_INDEX CXGB4_RX_BUF_SIZE_INDEX_4K

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I personally prefer the code as-is. Keeping a notifier for different hardware functionality will be a better indicator for someone reading the code than buffer size values.

Copy link
Contributor

@apalos apalos left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This enables both "tape" and "slot" mode receive on Chelsio interfaces

@Bill-Fischofer-Linaro
Copy link
Contributor

@muvarov Not clear why the callout for checkpatch reports failure here but the checkpatch run in Travis reports success.

@heyi-arm
Copy link

heyi-arm commented Feb 7, 2018

With Ilias' review approve let's merge this to complete caterpillar mediated device driver works.

@heyi-arm heyi-arm closed this Feb 7, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants