Skip to content

Commit

Permalink
gateway ip increment fix
Browse files Browse the repository at this point in the history
  • Loading branch information
mgheorghe committed Jan 11, 2024
1 parent 23dbb06 commit 13ced78
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion dpugen/dash.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def create_eni_config(dpu_conf, dpu_params, eni_id):
dpu_params['LOOPBACK'] = str(ipaddress.ip_address(conf.params_dict['LOOPBACK']) + dpu_id * int(ipaddress.ip_address(conf.params_dict['IP_STEP1'])))
dpu_params['PAL'] = str(ipaddress.ip_address(conf.params_dict['PAL']) + dpu_id * ENI_COUNT * int(ipaddress.ip_address(conf.params_dict['IP_STEP1'])))
dpu_params['PAR'] = str(ipaddress.ip_address(conf.params_dict['PAR']) + dpu_id * ENI_COUNT * int(ipaddress.ip_address(conf.params_dict['IP_STEP1'])))
dpu_params['GATEWAY'] = str(ipaddress.ip_address(conf.params_dict['GATEWAY']) + dpu_id * int(ipaddress.ip_address(conf.params_dict['IP_STEP1'])))
dpu_params['GATEWAY'] = str(ipaddress.ip_address(conf.params_dict['GATEWAY']) + dpu_id * ENI_COUNT * int(ipaddress.ip_address(conf.params_dict['IP_STEP1'])))
dpu_params['IP_L_START'] = str(ipaddress.ip_address(conf.params_dict['IP_L_START']) + dpu_id * ENI_COUNT * int(ipaddress.ip_address(conf.params_dict['IP_STEP_ENI'])))
dpu_params['IP_R_START'] = str(ipaddress.ip_address(conf.params_dict['IP_R_START']) + dpu_id * ENI_COUNT * int(ipaddress.ip_address(conf.params_dict['IP_STEP_ENI'])))
dpu_params['MAC_L_START'] = str(maca(int(maca(conf.params_dict['MAC_L_START'])) + dpu_id * ENI_COUNT * int(maca(conf.params_dict['MAC_STEP_ENI']))))
Expand All @@ -110,6 +110,7 @@ def create_eni_config(dpu_conf, dpu_params, eni_id):
eni_params['LOOPBACK'] = dpu_params['LOOPBACK']
eni_params['PAL'] = str(ipaddress.ip_address(dpu_params['PAL']) + eni_index * int(ipaddress.ip_address(conf.params_dict['IP_STEP1'])))
eni_params['PAR'] = str(ipaddress.ip_address(dpu_params['PAR']) + eni_index * int(ipaddress.ip_address(conf.params_dict['IP_STEP1'])))
eni_params['GATEWAY'] = str(ipaddress.ip_address(dpu_params['GATEWAY']) + eni_index * int(ipaddress.ip_address(conf.params_dict['IP_STEP1'])))
eni_params['IP_L_START'] = str(ipaddress.ip_address(dpu_params['IP_L_START']) + eni_index * int(ipaddress.ip_address(conf.params_dict['IP_STEP_ENI'])))
eni_params['IP_R_START'] = str(ipaddress.ip_address(dpu_params['IP_R_START']) + eni_index * int(ipaddress.ip_address(conf.params_dict['IP_STEP_ENI'])))
eni_params['MAC_L_START'] = str(maca(int(maca(dpu_params['MAC_L_START'])) + eni_index * int(maca(conf.params_dict['MAC_STEP_ENI']))))
Expand Down

0 comments on commit 13ced78

Please sign in to comment.