Skip to content

Commit

Permalink
Merge pull request #423 from kcudnik/kref2
Browse files Browse the repository at this point in the history
[SAI] Refactor SAI and add new features to be compatible with sonic-sairedis
  • Loading branch information
lguohan authored Aug 10, 2023
2 parents 666da4e + 4d0abc2 commit 1756b49
Show file tree
Hide file tree
Showing 9 changed files with 1,208 additions and 592 deletions.
2 changes: 1 addition & 1 deletion dash-pipeline/SAI/sai_api_gen.py
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,7 @@ def write_sai_makefile(sai_api_name_list, sai_api_full_name_list):
def write_sai_fixed_api_files(sai_api_full_name_list):
env = Environment(loader=FileSystemLoader('.'))

for filename in ['utils.cpp', 'utils.h', 'saifixedapis.cpp', 'saiimpl.h', 'logger.h', 'logger.cpp', 'saidash.h', 'config.h', 'config.cpp']:
for filename in ['utils.cpp', 'utils.h', 'saifixedapis.cpp', 'saiimpl.h', 'logger.h', 'logger.cpp', 'saidash.h', 'dashsai.h', 'dashsai.cpp', 'config.h', 'config.cpp']:
env = Environment(loader=FileSystemLoader('.'), trim_blocks=True, lstrip_blocks=True)
sai_impl_tm = env.get_template('/templates/%s.j2' % filename)
sai_impl_str = sai_impl_tm.render(tables = sai_api[TABLES_TAG], app_name = sai_api['app_name'], api_names = sai_api_full_name_list)
Expand Down
3 changes: 2 additions & 1 deletion dash-pipeline/SAI/templates/Makefile.j2
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,8 @@ SAI_OBJS=$(SAI_SRCS:.c=.o)
DASH_FIXED_SAI_SRCS=utils.cpp \
saifixedapis.cpp \
logger.cpp \
config.cpp
config.cpp \
dashsai.cpp
DASH_FIXED_SAI_OBJ=$(DASH_FIXED_SAI_SRCS:.cpp=.o)

# DASH libsai "generated" sources (from P4 code)
Expand Down
Loading

0 comments on commit 1756b49

Please sign in to comment.