Skip to content

Commit

Permalink
[SAI-PTF] Enable saiserverv2 with syncd-rpc and fix saithriftv2 build (
Browse files Browse the repository at this point in the history
…#1552) (#1533) (#1514) (#1492) (#1558) (#1557)

* Added missing dependencies required to run gensairpc.pl (#1492)

Fixes #1490

Co-authored-by: Chris Sommers <chrispsommers@gmail.com>

* Add GEN_SAIRPC_OPTS to pass flags to gensairpc.pl from top-level Make… (#1514)

* [doc] Add SAI metadata introduction presentation (#1487)

Small presentation about SAI metadata features added in last time.

Signed-off-by: Chris Sommers <chrispsommers@gmail.com>

* Add GEN_SAIRPC_OPTS to pass flags to gensairpc.pl from top-level Makefile or meta/Makefile

Signed-off-by: Chris Sommers <chrispsommers@gmail.com>

Co-authored-by: Kamil Cudnik <kcudnik@gmail.com>
Co-authored-by: Chris Sommers <chrispsommers@gmail.com>

* Saithriftv2 fixes for extensions (#1533)

* [doc] Add SAI metadata introduction presentation (#1487)

Small presentation about SAI metadata features added in last time.

Signed-off-by: Chris Sommers <chrispsommers@gmail.com>

* Add GEN_SAIRPC_OPTS to pass flags to gensairpc.pl from top-level Makefile or meta/Makefile

Signed-off-by: Chris Sommers <chrispsommers@gmail.com>

* Add static_cast<> to sairpcgen templates to avoid type mismatches for SAI extensions.

Signed-off-by: Chris Sommers <chrispsommers@gmail.com>

* Add new env variable SAIRPC_EXTRA_LIBS which gets passed to final linkage of saiserver, so user can pass in additional libraries.

Signed-off-by: Chris Sommers <chrispsommers@gmail.com>

* Add experimental to include path.

Signed-off-by: Chris Sommers <chrispsommers@gmail.com>

* Add experimental headers to CPPFLAGS passed to ctypesgen.

Signed-off-by: Chris Sommers <chrispsommers@gmail.com>

* Add VLAN and PortChannel test plan (#1480)

* Add VLAN and PortChannel test plan

For vlan, it includes:
1. Vlan functionalities
   - Flooding
   - Forwarding
   - Trunk/Access
   - Tagging/Untagging(802.1Q)
   - VLAN interface (RIF/SVI)
2. SAI APIs operations
   - Vlan Counters
   - Vlan and member list operations

For PortChannel, it includes:
1. Lag functionalities
    - Loadbalance
2. Lag SAI APIs
    - create/check/remove lag and lag member

Signed-off-by: richardyu-ms <richard.yu@microsoft.com>

* Update lag_test_plan.md

Signed-off-by: richardyu-ms <richard.yu@microsoft.com>

* Update lag_test_plan.md

Signed-off-by: richardyu-ms <richard.yu@microsoft.com>

* remove cases not related to T0

Signed-off-by: richardyu-ms <richard.yu@microsoft.com>

* Update lag_test_plan.md

Signed-off-by: richardyu-ms <richard.yu@microsoft.com>

* Add VLAN and Lag test plan and put topo config in seperated files

Signed-off-by: richardyu <richardyu@contoso.com>

* fix typo and more description more clear

Signed-off-by: richardyu-ms <richard.yu@microsoft.com>

* fix lag test typo (#29)

Signed-off-by: zhoudongxu <Dongxu.Zhou@microsoft.com>

* refactor vlan test plan and config

Signed-off-by: richardyu-ms <richard.yu@microsoft.com>

* refactor lag test plan (#33)

Signed-off-by: zhoudongxu <Dongxu.Zhou@microsoft.com>

* refactor pc and vlan test

Signed-off-by: zhoudongxu <Dongxu.Zhou@microsoft.com>

* Improve pc and vlan test Doc (#35)

* fix typo

Signed-off-by: zhoudongxu <Dongxu.Zhou@microsoft.com>

* remove some unnecessary comments

Signed-off-by: zhoudongxu <Dongxu.Zhou@microsoft.com>

* reformat and adjust the description of the tests

Signed-off-by: richardyu-ms <richard.yu@microsoft.com>

* set hash algorithm (#36)

Signed-off-by: zhoudongxu <Dongxu.Zhou@microsoft.com>

* refine lag test (#37)

Signed-off-by: zhoudongxu <Dongxu.Zhou@microsoft.com>

* correct vlan interface test (#38)

Signed-off-by: zhoudongxu <Dongxu.Zhou@microsoft.com>

* workaround for the sequence number issue in github and correct typo
standardise the ip and mac naming in config

add lag test for ingress port indifferenate in lag hash
redesign the mac and ip namin convention and reformat
Signed-off-by: richardyu-ms <richard.yu@microsoft.com>

* adjust the case numbers and vlan id

Signed-off-by: richardyu-ms <richard.yu@microsoft.com>

Co-authored-by: zhoudongxu <1315364814@qq.com>
Co-authored-by: richardyu <richardyu@contoso.com>
Co-authored-by: zhoudongxu <Dongxu.Zhou@microsoft.com>
Signed-off-by: Chris Sommers <chrispsommers@gmail.com>

* [SAI-PTF] SAI PTF test structure for T0 test and VLAN,FDB sample cases (#1499)

* [SAI-PTF] Add SAI ptf test structure for T0 test

Create SAI PTF test structure for T0
1. Create configuration structure for different components configu
2. Add FDB, PORT, switch, vlan configurations
3. Create Test structure base on PTF
4. Add T0 test case samples for FDB

Test Done:
Checked the ports functionality with port flooding
Checked port forwarding base on FDB configurations

Signed-off-by: richardyu-ms <richard.yu@microsoft.com>

* add vlan config and vlan test sample case

Signed-off-by: richardyu-ms <richard.yu@microsoft.com>

* add dx010 config

Signed-off-by: richardyu-ms <richard.yu@microsoft.com>
Signed-off-by: Chris Sommers <chrispsommers@gmail.com>

* [meta] Add sai_status_t to ancestry check (#1501)

Signed-off-by: Chris Sommers <chrispsommers@gmail.com>

* reset sleep time during turning up ports (#1502)

Signed-off-by: Yang Wang <yangwang1@microsoft.com>
Signed-off-by: Chris Sommers <chrispsommers@gmail.com>

* [saineighbor] Bulk API support for Neighbor entries (#1504)

* Bulk support for Neighbor entries

Signed-off-by: Chris Sommers <chrispsommers@gmail.com>

* add vlan testcases from Group6 to Group10 (#1506)

Signed-off-by: Yang Wang <yangwang1@microsoft.com>
Signed-off-by: Chris Sommers <chrispsommers@gmail.com>

* Support counters on IP MC route entries. This is similar to the support added earlier for Route counters. (#1497)

Support counters on IP MC route entries. This is similar to the support added earlier for Route counters.

API sequence:

sai_attribute_t counter_attr;
attr.id = SAI_COUNTER_ATTR_TYPE;
attr.value.s32 = SAI_COUNTER_TYPE_REGULAR;
sai_object_id_t counter_id;
sai_status_t rc = sai_counter_api->create_counter(&counter_id, g_switch_id, 1, &attr);
sai_attribute_t ipmc_attr;
attr.id = SAI_IPMC_ENTRY_ATTR_COUNTER_ID;
attr.value.oid = counter_id;
rc = sai_ipmc_api->set_ipmc_entry_attribute(route_entry, ipmc_attr);
sai_stat_id_t stat_ids[] = { SAI_COUNTER_STAT_PACKETS, SAI_COUNTER_STAT_BYTES };
uint64_t stats[2];
rc = sai_counter_api->sai_get_counter_stats_ext(counter_id, 2, stat_ids, stats);

Signed-off-by: rck-innovium <rck@innovium.com>
Signed-off-by: Chris Sommers <chrispsommers@gmail.com>

* Add thr missing API into saithriftv2 missing for syncd (#1484)

saithriftv1 offers start_sai_thrift_rpc_server API to start the saithrift server and syncd is currently using that API https://github.com/Azure/sonic-sairedis/blob/master/syncd/syncd_main.cpp#L60

But this API is missing from the for saithriftv2.

Made the relevant changes to provide a similar API for saithriftv2 library

The start_sai_thrift_rpc_server API currently resides in saiserver.cpp which is not included in librpcserver.a and is not available for the users of the static library. Thus moved the function definition into sai_rpc_frontend.cpp for including it in the static library.

Signed-off-by: Vivek Reddy Karri <vkarri@nvidia.com>
Signed-off-by: Chris Sommers <chrispsommers@gmail.com>

* add vlan test case (#1510)

Signed-off-by: ms-junyi <t-junyixiao@microsoft.com>

add vlan test case

edit FilteringTest

Signed-off-by: ms-junyi <t-junyixiao@microsoft.com>

edit vlan test case

Signed-off-by: ms-junyi <t-junyixiao@microsoft.com>
Signed-off-by: Chris Sommers <chrispsommers@gmail.com>

* add more waiting time for test (#1511)

* add more waiting time for test

Signed-off-by: richardyu-ms <richard.yu@microsoft.com>

* Update fdb_configer.py

increase the waiting time for fdb entries update

Signed-off-by: richardyu-ms <richard.yu@microsoft.com>

* remove useless change

Signed-off-by: richardyu-ms <richard.yu@microsoft.com>
Signed-off-by: Chris Sommers <chrispsommers@gmail.com>

* add read config_db.json (#1519)

Signed-off-by: ms-junyi <t-junyixiao@microsoft.com>

format

Signed-off-by: ms-junyi <t-junyixiao@microsoft.com>

addomment for each function

Signed-off-by: ms-junyi <t-junyixiao@microsoft.com>

add comment for each function

Signed-off-by: ms-junyi <t-junyixiao@microsoft.com>
Signed-off-by: Chris Sommers <chrispsommers@gmail.com>

* [Fix]Add necessary test data file for sai test (#1520)

In order to set up the port on different platforms, need to read the data for port configuration when turning on the admin state

This PR is a bug fix for adding the config_db into test resources folder.

Test Done:
Test within SONiC mgmt container

Signed-off-by: richardyu-ms <richard.yu@microsoft.com>
Signed-off-by: Chris Sommers <chrispsommers@gmail.com>

* Zitingguo/add lag test (#1522)

* add lag config

Signed-off-by: Ziting Guo <zitingguo@microsoft.com>
Signed-off-by: zitingguo <736034564@qq.com>

* enable lag config in test base

Signed-off-by: Ziting Guo <zitingguo@microsoft.com>
Signed-off-by: zitingguo <736034564@qq.com>

* fix lag config

Signed-off-by: Ziting Guo <zitingguo@microsoft.com>
Signed-off-by: zitingguo <736034564@qq.com>

* add remove_lag_member in lag_configer

Signed-off-by: Ziting Guo <zitingguo@microsoft.com>
Signed-off-by: zitingguo <736034564@qq.com>

* add sai_ipprefix() in utils

Signed-off-by: Ziting Guo <zitingguo@microsoft.com>
Signed-off-by: zitingguo <736034564@qq.com>

* fix typo

Signed-off-by: zitingguo <736034564@qq.com>

* import LagConfiger in sai_test_base

Signed-off-by: Ziting Guo <zitingguo@microsoft.com>
Signed-off-by: zitingguo <736034564@qq.com>

* add a simple lag test

Signed-off-by: Ziting Guo <zitingguo@microsoft.com>
Signed-off-by: zitingguo <736034564@qq.com>

* fix typo

Signed-off-by: zitingguo <736034564@qq.com>

* fix a config error in lag

Signed-off-by: Ziting Guo <zitingguo@microsoft.com>
Signed-off-by: zitingguo <736034564@qq.com>

* add lag lb test based on scr port

Signed-off-by: Ziting Guo <zitingguo@microsoft.com>
Signed-off-by: zitingguo <736034564@qq.com>

* fix

Signed-off-by: zitingguo <736034564@qq.com>

* set lag v4 hash

Signed-off-by: Ziting Guo <zitingguo@microsoft.com>
Signed-off-by: zitingguo <736034564@qq.com>

* add lag disable egress test case

Signed-off-by: Ziting Guo <zitingguo@microsoft.com>
Signed-off-by: zitingguo <736034564@qq.com>

* add IndifferenceIngressPortTest

Signed-off-by: Ziting Guo <zitingguo@microsoft.com>
Signed-off-by: zitingguo <736034564@qq.com>

* fix set hash function

Signed-off-by: Ziting Guo <zitingguo@microsoft.com>
Signed-off-by: zitingguo <736034564@qq.com>

* separate route configuration from lag

Signed-off-by: Ziting Guo <zitingguo@microsoft.com>
Signed-off-by: zitingguo <736034564@qq.com>

* disable setting lag hash

Signed-off-by: Ziting Guo <zitingguo@microsoft.com>
Signed-off-by: zitingguo <736034564@qq.com>

* add virtual interface

Signed-off-by: Ziting Guo <zitingguo@microsoft.com>
Signed-off-by: zitingguo <736034564@qq.com>

* Config default v4&v6 route

Signed-off-by: zitingguo <736034564@qq.com>
Signed-off-by: Chris Sommers <chrispsommers@gmail.com>

* add teardown for testing multiple cases at a time (#1521)

* add read config_db.json

Signed-off-by: ms-junyi <t-junyixiao@microsoft.com>

format

Signed-off-by: ms-junyi <t-junyixiao@microsoft.com>

addomment for each function

Signed-off-by: ms-junyi <t-junyixiao@microsoft.com>

add comment for each function

Signed-off-by: ms-junyi <t-junyixiao@microsoft.com>

* tear down

Signed-off-by: ms-junyi <t-junyixiao@microsoft.com>
Signed-off-by: Chris Sommers <chrispsommers@gmail.com>

* Added missing dependencies required to run gensairpc.pl (#1492)

Fixes #1490

Co-authored-by: Chris Sommers <chrispsommers@gmail.com>
Signed-off-by: Chris Sommers <chrispsommers@gmail.com>

* Update saitam.h (#1496)

Attribute is introduced to configure IPFIX template reporting interval as per the RFC7011.

https://datatracker.ietf.org/doc/html/rfc7011#section-8.4

Signed-off-by: Jai Kumar <jai.kumar@broadcom.com>
Signed-off-by: Chris Sommers <chrispsommers@gmail.com>

* Pass SAIRPC_EXTRA_LIBS flag in Makefile

Signed-off-by: Chris Sommers <chrispsommers@gmail.com>

* Removed changes to include paths for SAI extension headers;
as it turns out these changes were not required as originally reported in #1531.

Signed-off-by: Chris Sommers <chrispsommers@gmail.com>

Co-authored-by: Kamil Cudnik <kcudnik@gmail.com>
Co-authored-by: Chris Sommers <chrispsommers@gmail.com>
Co-authored-by: Richard.Yu <richard.yu@microsoft.com>
Co-authored-by: zhoudongxu <1315364814@qq.com>
Co-authored-by: richardyu <richardyu@contoso.com>
Co-authored-by: zhoudongxu <Dongxu.Zhou@microsoft.com>
Co-authored-by: Yang Wang <yangwang1@microsoft.com>
Co-authored-by: Prince Sunny <prince.sunny@microsoft.com>
Co-authored-by: Ravindranath C K <rck@innovium.com>
Co-authored-by: Vivek R <vivekreddykarri98@gmail.com>
Co-authored-by: ms-junyi <106718431+ms-junyi@users.noreply.github.com>
Co-authored-by: zitingguo-ms <736034564@qq.com>
Co-authored-by: Jai Kumar <jai.kumar@broadcom.com>

* [SAI-PTF]Align the sai rpc front name with swss and syncd (#1552)

In Syncd starting process, it will try to start the switch and assign the gSwtichId to the sai implementation.
In the syncd rpc container, in order to get the swtich id after syncd initalization, we need to get and check the switch id.

Signed-off-by: richardyu-ms <richard.yu@microsoft.com>

* Check for NULL APIs returned by sai_api_query() before calling. (#1558)

Signed-off-by: Chris Sommers <chrispsommers@gmail.com>

Co-authored-by: Chris Sommers <chrispsommers@gmail.com>

Signed-off-by: richardyu-ms <richard.yu@microsoft.com>
Co-authored-by: Chris Sommers <31145757+chrispsommers@users.noreply.github.com>
Co-authored-by: Chris Sommers <chrispsommers@gmail.com>
Co-authored-by: Kamil Cudnik <kcudnik@gmail.com>
Co-authored-by: zhoudongxu <1315364814@qq.com>
Co-authored-by: richardyu <richardyu@contoso.com>
Co-authored-by: zhoudongxu <Dongxu.Zhou@microsoft.com>
Co-authored-by: Yang Wang <yangwang1@microsoft.com>
Co-authored-by: Prince Sunny <prince.sunny@microsoft.com>
Co-authored-by: Ravindranath C K <rck@innovium.com>
Co-authored-by: Vivek R <vivekreddykarri98@gmail.com>
Co-authored-by: ms-junyi <106718431+ms-junyi@users.noreply.github.com>
Co-authored-by: zitingguo-ms <736034564@qq.com>
Co-authored-by: Jai Kumar <jai.kumar@broadcom.com>
  • Loading branch information
14 people authored Aug 11, 2022
1 parent 6a9def5 commit 566d4a8
Show file tree
Hide file tree
Showing 8 changed files with 63 additions and 16 deletions.
8 changes: 7 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,12 @@ else
SAITHRIFT_PATH=test/saithrift
endif

# Passed to genrpc.pl via "make saithrift-build":
GEN_SAIRPC_OPTS?=

# Passed to meta/Makefile via "make saithrift-build, can specify add'l libraries along with libsai
SAIRPC_EXTRA_LIBS?=

.PHONY: test doc clean

doc:
Expand All @@ -37,7 +43,7 @@ test:
make -C test

saithrift-build:
make -C $(SAITHRIFT_PATH)
SAIRPC_EXTRA_LIBS="$(SAIRPC_EXTRA_LIBS)" GEN_SAIRPC_OPTS=$(GEN_SAIRPC_OPTS) make -C $(SAITHRIFT_PATH)

saithrift-install: saithrift-build
make -C $(SAITHRIFT_PATH) install
Expand Down
5 changes: 4 additions & 1 deletion meta/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,9 @@
# @brief This module defines SAI Metadata Makefile
#

# Passed to genrpc.pl:
GEN_SAIRPC_OPTS?=

WARNINGS = \
-ansi \
-Wall \
Expand Down Expand Up @@ -114,7 +117,7 @@ saimetadatatest.c saimetadata.c saimetadata.h: xml $(XMLDEPS) parse.pl $(CONSTHE
perl -I. parse.pl

rpc sai.thrift sai_rpc_server.cpp sai_adapter.py: xml $(XMLDEPS) gensairpc.pl
perl -Irpc gensairpc.pl
perl -Irpc gensairpc.pl $(GEN_SAIRPC_OPTS)

HEADERS = saimetadata.h $(CONSTHEADERS)

Expand Down
6 changes: 5 additions & 1 deletion meta/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,9 @@ Parser also forces headers to be well formated when adding new code.
To test your changes just type:

```sh
make
[GEN_SAIRPC_OPTS=<option flags>] make
```
e.g.
```
GEN_SAIRPC_OPTS="-ve" make
```
18 changes: 11 additions & 7 deletions meta/gensairpc.README
Original file line number Diff line number Diff line change
Expand Up @@ -25,10 +25,14 @@ USAGE

DEPENDENCIES
Ubuntu packages:

libtemplate-perl
libconst-fast-perl
libmoosex-aliases-perl
libnamespace-autoclean-perl
libgetopt-long-descriptive-perl

```
[sudo] apt-get install -y \
libtemplate-perl \
libconst-fast-perl \
libmoosex-aliases-perl \
libnamespace-autoclean-perl \
libgetopt-long-descriptive-perl \
doxygen \
graphviz \
aspell-en
```
2 changes: 1 addition & 1 deletion meta/gensairpc.pl
Original file line number Diff line number Diff line change
Expand Up @@ -281,7 +281,7 @@ sub generate_server_template_from_skeleton {

# Define global variable before "class"
print {$server_template}
"\nextern sai_object_id_t switch_id;\nsai_object_id_t switch_id;\n\n\n";
"\nextern sai_object_id_t switch_id;\nsai_object_id_t switch_id;\nextern sai_object_id_t gSwitchId;\n\n\n";

# Define helper functions
print {$server_template} "[% PROCESS helper_functions %]\n\n\n";
Expand Down
29 changes: 28 additions & 1 deletion meta/templates/sai_rpc_server_functions.tt
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,16 @@
[% END -%]
[%- END -%]

[%- BLOCK check_sai_function -%]
[% name = function.name; UNLESS methods.$name %]
[% END -%]
if ([% api %]_api->[% name = function.name; GET methods.$name %] == (void *)0) {
std::cerr << "NULL ptr: [% api %]_api->[% name = function.name; GET methods.$name %]" << std::endl;
[%- PROCESS throw_null_api_exception %]
}

[%- END -%]

[%- ######################################################################## -%]

[%- ######################################################################## -%]
Expand All @@ -54,6 +64,12 @@
if (switch_id != NULL) {
return switch_id;
}

//check if the switch created in syncd
if (gSwitchId != NULL) {
switch_id = gSwitchId;
return switch_id;
}

[%- END -%]

Expand Down Expand Up @@ -110,7 +126,7 @@
[%- ######################################################################## -%]

[%- BLOCK sai_api_query -%]
status = sai_api_query(SAI_API_[% api.upper %], (void **)&[% api %]_api);
status = sai_api_query(static_cast<sai_api_t>(SAI_API_[% api.upper %]), (void **)&[% api %]_api);
if (status != SAI_STATUS_SUCCESS) {
[%- PROCESS return_error indentation = 3 status_variable = 'status' %]
}
Expand All @@ -127,6 +143,14 @@
[% indent %]throw e;
[%- END -%]

[%- BLOCK throw_null_api_exception -%]
[%- indentation = indentation || 2; tab = 2; indent = ' '; indent = indent.repeat(tab*indentation) %]

[% indent %]sai_thrift_exception e;
[% indent %]e.status = SAI_STATUS_NOT_IMPLEMENTED;
[% indent %]throw e;
[%- END -%]

[%- ######################################################################## -%]

[%- ######################################################################## -%]
Expand Down Expand Up @@ -345,6 +369,9 @@

[%- PROCESS preprocess_arguments %]

[%- # Ensure function ptr not NULL -%]
[% name = function.name; UNLESS methods.$name %]//[% END %][% PROCESS check_sai_function -%]

[%- # Now just call the function -%]
[% name = function.name; UNLESS methods.$name %]//[% END %]status = [% PROCESS call_sai_function -%]

Expand Down
4 changes: 2 additions & 2 deletions meta/templates/sai_rpc_server_helper_functions.tt
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ void sai_thrift_parse_[% object %]_attributes(const std::vector<sai_thrift_attri
for (uint32_t i = 0; i < thrift_attr_list.size(); i++, it++) {
attribute = (sai_thrift_attribute_t)*it;
attr_list[i].id = attribute.id;
convert_attr_thrift_to_sai(SAI_OBJECT_TYPE_[% object.upper %], attribute, &attr_list[i]);
convert_attr_thrift_to_sai(static_cast<sai_object_type_t>(SAI_OBJECT_TYPE_[% object.upper %]), attribute, &attr_list[i]);
}
[% END -%]

Expand All @@ -85,7 +85,7 @@ void sai_thrift_deparse_[% object %]_attributes(sai_attribute_t *attr_list,

for (uint32_t i = 0; i < attr_count; i++, it++) {
sai_thrift_attribute_t attribute;
convert_attr_sai_to_thrift(SAI_OBJECT_TYPE_[% object.upper %], attr_list[i], attribute);
convert_attr_sai_to_thrift(static_cast<sai_object_type_t>(SAI_OBJECT_TYPE_[% object.upper %]), attr_list[i], attribute);
thrift_attr_list.push_back(attribute);
}
[% END -%]
Expand Down
7 changes: 5 additions & 2 deletions test/saithriftv2/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ CPPFLAGS = -I$(SAI_HEADER_DIR) -I. -std=c++11
CPPFLAGS += -O0 -ggdb


# specify add'l libraries along with libsai
SAIRPC_EXTRA_LIBS?=

ifeq ($(platform),MLNX)
CDEFS = -DMLNXSAI
else
Expand Down Expand Up @@ -88,7 +91,7 @@ $(ODIR)/sai_rpc_server.o: ../../meta/sai_rpc_frontend.cpp
$(CXX) $(CPPFLAGS) -c $^ -o $@ $(CPPFLAGS) -I./gen-cpp -I../../meta -I../../inc -I../../experimental

$(ODIR)/saiserver.o: src/saiserver.cpp $(CPP_SOURCES) directories
$(CXX) $(CPPFLAGS) -c src/saiserver.cpp -o $@ $(CPPFLAGS) $(CDEFS) -I./gen-cpp -I../../inc
$(CXX) $(CPPFLAGS) -c src/saiserver.cpp -o $@ $(CPPFLAGS) $(CDEFS) -I./gen-cpp -I../../inc -I../../experimental

$(ODIR)/librpcserver.a: $(ODIR)/sai_rpc.o $(ODIR)/sai_types.o $(ODIR)/sai_rpc_server.o
ar rcs $(ODIR)/librpcserver.a $^
Expand All @@ -98,7 +101,7 @@ clientlib: $(PY_SOURCES) $(SAI_PY_HEADERS)

saiserver: $(ODIR)/saiserver.o $(ODIR)/librpcserver.a
$(CXX) $(LDFLAGS) $(ODIR)/sai_rpc_server.o $(ODIR)/saiserver.o -o $@ \
$(ODIR)/librpcserver.a $(LIBS)
$(ODIR)/librpcserver.a $(LIBS) $(SAIRPC_EXTRA_LIBS)

install-lib: $(ODIR)/librpcserver.a
$(INSTALL) -D $(ODIR)/librpcserver.a $(DESTDIR)/usr/lib/librpcserver.a
Expand Down

0 comments on commit 566d4a8

Please sign in to comment.