Skip to content

Set rshim_mac and compute rshim_lla for the DPU

Commit-1: Convert the DPU tmfifo_net0 mac into a variable - rshim_mac

rshim_mac can be specified as the complete 6-byte string ("AA:BB:CC:DD:EE:FF")
or as "random". If rshim_mac is specified as "random", a random mac is
generated.

If rshim_mac is not defined it is computed based on the rshim_num -
Tilera OUI-"01:1a:ca:" + "ff:ff"" + (3+(rshim_num*2)).

Note: The default matches the multi-bfb-install script.

Signed-off-by: Anuradha Karuppiah <anuradhak@nvidia.com>

Commit-2: Use DPU rshim-mac to compute DPU's rshim LLA

PS: These changes are needed for setups where the DPU OOB-net is not deterministic i.e. re-assigned on every install. In which case we need to use the rshim network to pull the DPU-OOB-address and reset the ansible-host. I do something like this in my install playbook for that (please let me know if that is too hacky!) -

- hosts: x86_hosts
  become: yes
  gather_facts: no
  tasks:
    - name: Get oob_net0 dump
      shell: "sshpass -p {{ hostvars['dpu']['ansible_password']}} ssh rshim{{ rshim_num }} ip addr show oob_net0"
      register: addr_output
    - name: Get DPU OOB IP
      command: /usr/bin/env python3
      args:
        stdin: |
           import re
           addr_pat = re.compile(r"inet (?P<addr>\S+)")
           addrs = addr_pat.findall("{{ addr_output }}")
           print(addrs[0].split("/")[0])
      register: dpu_oob_addr_output
    - name: Set DPU addr on the DPU
      set_fact:
        ansible_host: "{{ dpu_oob_addr_output.stdout.strip() }}"
      delegate_to: "{{ item }}"
      delegate_facts: true
      with_items: "{{ groups['dpus'] }}"
Edited by Anuradha Karuppiah

Merge request reports

Loading