Mellanox / scalablefunctions

All about Scalable functions
39 stars 2 forks source link

Path to scripts in the udev rule provided in the example #3

Closed atenart closed 2 years ago

atenart commented 2 years ago

Hello,

I've been playing a bit with sf, and found the udev rule provided[1] could not work as the scripts weren't found. I thing the full path to the binary must be used in an udev rule, here in the example sf-rep-netdev-rename and auxdev-sf-netdev-rename are in /sbin. I believe the rule should be:

SUBSYSTEM=="net", ACTION=="add", ATTR{phys_switch_id}!="", ATTR{phys_port_name}!="", ATTR{phys_port_name}=="*pf*sf*" \
    IMPORT{program}="/sbin/sf-rep-netdev-rename $attr{phys_port_name} $attr{ifindex}" \
    NAME="$env{NAME}"

SUBSYSTEM=="net", SUBSYSTEMS=="auxiliary", ACTION=="add", ATTRS{sfnum}!="", \
    IMPORT{program}="/sbin/auxdev-sf-netdev-rename $attr{sfnum} $attr{ifindex}" \
    NAME="$env{SF_NETDEV_NAME}"

Thanks!

[1] https://github.com/Mellanox/scalablefunctions/wiki/Upstream-step-by-step-guide#311-setup-udev-rule-file

paravmellanox commented 2 years ago

@atenart ,

thanks for the report. would you like to submit the patch to fix this documentation, since you already have the corrections?

atenart commented 2 years ago

@paravmellanox I don't think we can submit PR to wiki pages on Github.

atenart commented 2 years ago

Hi, gentle ping.

@paravmellanox I don't think we can submit PR to wiki pages on Github.

Or do I miss something? How can I submit a change for a wiki page?

paravmellanox commented 2 years ago

@atenart,

sorry for the delay. I updated the doc. Can you please check and if good, close the issue as well?

atenart commented 2 years ago

@atenart,

sorry for the delay. I updated the doc. Can you please check and if good, close the issue as well?

No problem. Looks good to me, thanks!

paravmellanox commented 2 years ago

hi @atenart ,

Were you able to use the SFs after the udev script fix? Which device did you use?

atenart commented 2 years ago

Were you able to use the SFs after the udev script fix?

Yes, this change only makes everything described in the wiki to work (for me).

Which device did you use?

A ConnectX-6 Dx.

paravmellanox commented 2 years ago

@atenart, that is good. How many SFs do you use, if you can share? Do you use for containers or?

atenart commented 2 years ago

I mostly played with the feature, to see how it worked and behave.

paravmellanox commented 2 years ago

@atenart , ok. does it look fine?