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

Mellanox ConnectX-4 Driver (WIP) #918

Merged
merged 6 commits into from
Jun 8, 2016
Merged

Conversation

capr
Copy link
Contributor

@capr capr commented May 13, 2016

Currently the code covers the init procedure of the card up to QUERY_HCA_CAP which fails with "bad block number".

The init procedure so far allocates the command queue and initializes it, and there's some handy methods to send commands with input and output data. The commands are sent synchronously, one at a time (so only the first position of the queue is ever populated) and polled for completion. Later in the init procedure (this is not done!) we'll initialize an event queue and we'll be able to send commands asynchronously and use events to check for completion.

The selftest function does some testing on the bit utilities and tries to initialize the card(s) based on SNABB_PCI_CONNECTX4[0|1] env var(s).

The development was done entirely on lugano-4 on 100G cards.

Below is a handy script that will pull the code, reset the cards and run the selftest function. Use it to achieve a fast dev-run cycle if you prefer to edit the code on your home machine (you'll have to make your editor do a commit+push on save).

cd ~/snabbswitch || exit 1
git pull
cd src
make
export SNABB_PCI0=0000:02:00.0
export SNABB_PCI1=0000:03:00.0
echo 1 | sudo tee "/sys/bus/pci/devices/$SNABB_PCI0/reset"
echo 1 | sudo tee "/sys/bus/pci/devices/$SNABB_PCI1/reset"
sudo -E lock ./snabb snsh -t apps.mellanox.connectx4

@lukego
Copy link
Member

lukego commented May 13, 2016

Great!

Could you please write a paragraph summary of the current state of the code i.e. what you expect to happen when executing the selftest method? This can be the text of the pull request.

Currently the information is much too minimal to understand what this code represents i.e. no pull request text and only a few words in the commit messages. Spending some time and effort on writing these things is a big help to the rest of us!

@lukego lukego merged commit fe8065f into snabbco:mellanox Jun 8, 2016
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.

2 participants