Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Complie error in libsaimetadata #602

Closed
berniechien-wnc opened this issue May 15, 2017 · 9 comments
Closed

Complie error in libsaimetadata #602

berniechien-wnc opened this issue May 15, 2017 · 9 comments
Assignees

Comments

@berniechien-wnc
Copy link

I want to update SAI of SONiC to v1.0.0 which is used in ASIC's SDK.
But I got the compile error as below in libsaimetadata when building /sonic/src/sonic-sairedis.
Is sonic-sairedis supporting SAI v1.0.0?
Or how can I do for updating SAI?
Thanks.

sai_meta.h:108:9: error: 'sai_hostif_trap_id_t' does not name a type
sai_hostif_trap_id_t trap_id;
^
sai_meta.h:111:9: error: 'sai_unicast_route_entry_t' does not name a type
sai_unicast_route_entry_t route_entry;
^
.....

cc1plus: all warnings being treated as errors
Makefile:837: recipe for target 'libsaimetadata_la-sai_extra_acl.lo' failed
make[4]: *** [libsaimetadata_la-sai_extra_acl.lo] Error 1
make[4]: Leaving directory '/sonic/src/sonic-sairedis/meta'
Makefile:393: recipe for target 'all-recursive' failed
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory '/sonic/src/sonic-sairedis'
Makefile:324: recipe for target 'all' failed
make[2]: *** [all] Error 2
make[2]: Leaving directory '/sonic/src/sonic-sairedis'
dh_auto_build: make -j1 returned exit code 2
debian/rules:28: recipe for target 'binary-syncd' failed
make[1]: *** [binary-syncd] Error 2
make[1]: Leaving directory '/sonic/src/sonic-sairedis'

@stcheng
Copy link
Contributor

stcheng commented May 15, 2017

@kcudnik could you take a look

@kcudnik
Copy link
Contributor

kcudnik commented May 15, 2017

since you have errors with unicast route, that means you are using v0.9.x branch
v1.0.1 is currently in development, there are no packages yet available but yo can compile it from sairedis/origin/v1.0.1 branch (just notice that since it's in development, its hardcoded for mlnx2700 platform right now, in next couple days we will be working to build proper sairedis image based on v1.0.1)

PS. current sonic sairedis master is aligned with 0.9.4 SAI

@berniechien-wnc
Copy link
Author

Hi kcudnik,

Updated the information. The SAI of ASIC's SDK should be v0.9.6.
I have done

  1. Replaced the sai.deb from ASIC's SDK into SONiC to update /usr/include/sai to v0.9.6
  2. Replaced the libsai.deb from ASIC's SDK into SONiC to update libsai.so

Then I got this error. Because sairedis / SAI of SONiC master branch are v0.9.4 SAI, right?

How should I do?

  1. Do I need to update SAI's branch from v0.9.4 to v0.9.6 in .gitmodules
    [submodule "src/SAI"]
    path = src/SAI
    url = https://github.com/opencomputeproject/SAI
    branch = v0.9.6
  2. How can I align sairedis with v0.9.6 SAI? I don't see a branch for v0.9.6.

@kcudnik
Copy link
Contributor

kcudnik commented May 16, 2017

I'm afraid that v0.9.6 vs v0.9.4 contains too many changes, branch 0.9.6 is very close to v1.0.1
changing sairedis to 0.9.6 would take a lot of effort which probably you dont want to make. I will discuss this tommorow at work what can we do with this.

@berniechien-wnc
Copy link
Author

Hi Kcudnik,

I checked the ASIC's SDK roodmap. It might support SAI v1.0.0 next version.
Do you think to upgrade SONiC's SAI to v1.0.0 easier?

Otherwise, how can I check those versions of SAI, sairedis and ASIC's SAI are aligned?
SAI has branch v1.0, v1.1
sairedis has branch v1.0, v1.0.1,v2.0
...

@berniechien-wnc
Copy link
Author

Hi Kcudnik,

I tried to sync SAI / sairedis / sai of ASIC to v1.0.1
I got new error. I think I need to update libsaithrift- dev and python-saithrift.
But I can't find the entry point. Can you tell me how to replace those two packages?
Thanks.

Finished target/debs/libhiredis0.13_0.13.3-2_amd64.deb-install
Executing rules for target/debs/libsaithrift-dev_0.9.4_amd64.deb
/sonic/src/SAI /sonic
tail: cannot open 'debian/changelog' for reading: No such file or directory
dpkg-buildpackage: error: tail of debian/changelog gave error exit status 1
make: *** [target/debs/libsaithrift-dev_1.0.1_amd64.deb] Error 1
make: *** Waiting for unfinished jobs....
slave.mk:171: recipe for target 'target/debs/libsaithrift-dev_0.9.4_amd64.deb' failed
Finished target/debs/linux-headers-3.16.0-4-common_3.16.36-1+deb8u2_amd64.deb
make: Leaving directory '/sonic'
Makefile:33: recipe for target 'all' failed
make: *** [all] Error 2

@kcudnik
Copy link
Contributor

kcudnik commented Jul 7, 2017

Sorry for the delay, do you still have issue with compiling ?

@berniechien-wnc
Copy link
Author

I am using branch v1.0.1. It should work for SAI v1.0.1, right?

@lguohan
Copy link
Collaborator

lguohan commented Oct 19, 2018

1.0.1 was already in master a few months ago, we do not see any issue on that.

@lguohan lguohan closed this as completed Oct 19, 2018
lguohan added a commit to lguohan/sonic-buildimage that referenced this issue Nov 12, 2018
sairedis

* 248a095 2018-11-07 | Add best candidate search for acl table (sonic-net#371) [Kamil Cudnik]
* d1e26c3 2018-11-07 | Ignore order when compare QOS MAP list entries (sonic-net#372) [Kamil Cudnik]
* e8df347 2018-11-05 | Add best candidate search for router interface using tunnel term tabl… (sonic-net#370) [Kamil Cudnik]
* 8ae173b 2018-11-01 | Refactor saidump graph generator (sonic-net#367) [Kamil Cudnik]

common

* 2a37c5c 2018-11-07 | Add system warm-reboot check in WarmRestart class (sonic-net#246) (HEAD, origin/master, origin/HEAD) [zhenggen-xu]
* fb082b5 2018-11-06 | Fix ProducerStateTable::clear() to clear StateHash properly (sonic-net#244) [Taoyu Li]
* 0ee636b 2018-11-05 | Remove local googletest submodule and link with system gtest (sonic-net#245) [Qi Luo]
* b56ffba 2018-10-31 | Add NEIGH_RESTORE_TABLE in stateDB (sonic-net#243) [zhenggen-xu]
* b58c69d 2018-10-28 | swss-common: add op 'create' case to avoid flush immediately (sonic-net#219) [Dong Zhang]

swss
* afdcf34 2018-11-12 | Support neighsyncd system warmreboot. (sonic-net#661) (HEAD, origin/master, origin/HEAD) [zhenggen-xu]
* f380685 2018-11-09 | Routing-stack warm-reboot feature. (sonic-net#602) [Rodny Molina]
* 9fbcb60 2018-11-09 | Add warm-reboot mode for teammgrd (sonic-net#678) [pavel-shirshov]
* 8c60787 2018-11-09 | Don't add loopback ip2me route again if already configured (sonic-net#656) [Jipan Yang]
* 6eb1613 2018-11-08 | [test]: Add interface IPv6 add/remove test case (sonic-net#677) [Shuotian Cheng]
* 5de5054 2018-11-07 | [vrfmgrd]: Support VNET setting (sonic-net#657) [Marian Pritsak]
* f666011 2018-11-06 | [teammgrd]: Add retry logic when enslaving member port into team (sonic-net#669) [Shuotian Cheng]
* 36e304d 2018-11-05 | [vstest]: print output when runcmd returns error (sonic-net#672) [lguohan]
* aede5d4 2018-11-05 | [test]: Fix clean up wrong interface IP (sonic-net#673) [Shuotian Cheng]
* aeceaca 2018-11-02 | [portmgrd]: portmgrd shall be responsible for all ports update (sonic-net#668) [Shuotian Cheng]
* 5796e54 2018-11-02 | Orchagent warm restart data restore requires three iterations (sonic-net#670) [Jipan Yang]
* 15a2299 2018-11-01 | [vlanmgrd]: Do not bring up VLAN members by default (sonic-net#667) [Shuotian Cheng]
* 44a4460 2018-11-01 | [test]: Clean up LAGs after finishing the test (sonic-net#666) [Shuotian Cheng]

Signed-off-by: Guohan Lu <gulv@microsoft.com>
lguohan added a commit that referenced this issue Nov 12, 2018
sairedis

* 248a095 2018-11-07 | Add best candidate search for acl table (#371) [Kamil Cudnik]
* d1e26c3 2018-11-07 | Ignore order when compare QOS MAP list entries (#372) [Kamil Cudnik]
* e8df347 2018-11-05 | Add best candidate search for router interface using tunnel term tabl… (#370) [Kamil Cudnik]
* 8ae173b 2018-11-01 | Refactor saidump graph generator (#367) [Kamil Cudnik]

common

* 2a37c5c 2018-11-07 | Add system warm-reboot check in WarmRestart class (#246) (HEAD, origin/master, origin/HEAD) [zhenggen-xu]
* fb082b5 2018-11-06 | Fix ProducerStateTable::clear() to clear StateHash properly (#244) [Taoyu Li]
* 0ee636b 2018-11-05 | Remove local googletest submodule and link with system gtest (#245) [Qi Luo]
* b56ffba 2018-10-31 | Add NEIGH_RESTORE_TABLE in stateDB (#243) [zhenggen-xu]
* b58c69d 2018-10-28 | swss-common: add op 'create' case to avoid flush immediately (#219) [Dong Zhang]

swss
* afdcf34 2018-11-12 | Support neighsyncd system warmreboot. (#661) (HEAD, origin/master, origin/HEAD) [zhenggen-xu]
* f380685 2018-11-09 | Routing-stack warm-reboot feature. (#602) [Rodny Molina]
* 9fbcb60 2018-11-09 | Add warm-reboot mode for teammgrd (#678) [pavel-shirshov]
* 8c60787 2018-11-09 | Don't add loopback ip2me route again if already configured (#656) [Jipan Yang]
* 6eb1613 2018-11-08 | [test]: Add interface IPv6 add/remove test case (#677) [Shuotian Cheng]
* 5de5054 2018-11-07 | [vrfmgrd]: Support VNET setting (#657) [Marian Pritsak]
* f666011 2018-11-06 | [teammgrd]: Add retry logic when enslaving member port into team (#669) [Shuotian Cheng]
* 36e304d 2018-11-05 | [vstest]: print output when runcmd returns error (#672) [lguohan]
* aede5d4 2018-11-05 | [test]: Fix clean up wrong interface IP (#673) [Shuotian Cheng]
* aeceaca 2018-11-02 | [portmgrd]: portmgrd shall be responsible for all ports update (#668) [Shuotian Cheng]
* 5796e54 2018-11-02 | Orchagent warm restart data restore requires three iterations (#670) [Jipan Yang]
* 15a2299 2018-11-01 | [vlanmgrd]: Do not bring up VLAN members by default (#667) [Shuotian Cheng]
* 44a4460 2018-11-01 | [test]: Clean up LAGs after finishing the test (#666) [Shuotian Cheng]

Signed-off-by: Guohan Lu <gulv@microsoft.com>
madhanmellanox pushed a commit to madhanmellanox/sonic-buildimage that referenced this issue Mar 23, 2020
* Routing-stack warm-reboot feature.

Please refer to the corresponding design document for more details: sonic-net/SONiC#239

The following manual UT plan has been successfully executed. UT automation pending.

Physical topology formed by various BGP peers connecting to the DUT. Both non-ecmp and ecmp prefixes are learned/tested.

Testcase Suite 1: Making use of “pkill -9 bgpd && pkill -9 zebra” as trigger.
=============

IPv4 prefixes
==========

    * Restart zebra/bgpd:
            - Verify that all prefixes are properly stale-marked and that no
    change is pushed to AppDB during reconciliation.
            - Result: PASSED

    * Restart zebra/bgpd and add one new non-ecmp IPv4 prefix.
            - To produce a route-state-inconsistency, add prefix in adjacent
    node before bgp sessions are re-established.
            - Verify that new-prefix msg is NOT pushed down to AppDB till
    reconciliation takes place.
            - Result: PASSED

    * Restart zebra/bgpd and withdraw one non-ecmp IPv4 prefix.
            - To produce a route-state-inconsistency, remove prefix in adjacent
    node before bgp sessions are re-established.
            - Verify that deleted-prefix msg is NOT pushed down to AppDB till
    reconciliation takes place.
            - Result: PASSED

    * Restart zebra/bgpd and add one new path to an IPv4 ecmp-prefix.
            - To produce a route-state-inconsistency, add prefix-path in
    adjacent node before bgp sessions are re-established.
            - Verify that new prefix-path msg is NOT pushed down to AppDB till
    reconciliation takes place.
            - Result: PASSED

    * Restart zebra/bgpd and withdraw one ecmp-path from an existing ecmp IPv4
      prefix.
              - To produce a route-state-inconsistency, remove prefix-path in
      adjacent node before bgp sessions are re-established.
              - Verify that deleted-prefix-path msg is NOT pushed down to AppDB
      till reconciliation takes place.
              - Eventually, during reconciliation, this path will be eliminated
      as it’s not being refreshed by remote-peer.
              - Result: PASSED

IPv6 prefixes
==========

    * Restart zebra/bgpd:
            - Verify that all prefixes are properly stale-marked and that no
    change is pushed to AppDB during reconciliation.
            - Result: PASSED

    * Restart zebra/bgpd and add one new non-ecmp IPv6 prefix.
            - To produce a route-state-inconsistency, add prefix in adjacent
    node before bgp sessions are re-established.
            - Verify that new-prefix msg is NOT pushed down to AppDB till
    reconciliation takes place.
            - Result: PASSED

    * Restart zebra/bgpd and withdraw one non-ecmp IPv6 prefix.
            - To produce a route-state-inconsistency, remove prefix in adjacent
    node before bgp sessions are re-established.
            - Verify that deleted-prefix msg is NOT pushed down to AppDB till
    reconciliation takes place.
            - Result: PASSED

    * Restart zebra/bgpd and add one new path to an IPv6 ecmp-prefix.
            - To produce a route-state-inconsistency, add prefix-path in
    adjacent node before bgp sessions are re-established.
            - Verify that new prefix-path msg is NOT pushed down to AppDB till
    reconciliation takes place.
            - Result: PASSED

    * Restart zebra/bgpd and withdraw one ecmp-path from an existing ecmp IPv6
      prefix.
              - To produce a route-state-inconsistency, remove prefix-path in
      adjacent node before bgp sessions are re-established.
              - Verify that deleted-prefix-path msg is NOT pushed down to AppDB
      till reconciliation takes place.
              - Eventually, during reconciliation, this path will be eliminated
      as it’s not being refreshed by remote-peer.
              - Result: PASSED

Testcase Suite 2: Making use of sudo service bgp restart” as trigger.
=============

IPv4 prefixes
==========

    * Restart bgp service/docker:
            - Verify that all prefixes are properly stale-marked and that no
    change is pushed to AppDB during reconciliation.
            - Result: PASSED

    * Restart bgp service/docker and add one new non-ecmp IPv4 prefix.
            - To produce a route-state-inconsistency, add prefix in adjacent
    node before bgp sessions are re-established.
            - Verify that new-prefix msg is NOT pushed down to AppDB till
    reconciliation takes place.
            - Result: PASSED

    * Restart bgp service/docker and withdraw one non-ecmp IPv4 prefix.
            - To produce a route-state-inconsistency, remove prefix in adjacent
    node before bgp sessions are re-established.
            - Verify that deleted-prefix msg is NOT pushed down to AppDB till
    reconciliation takes place.
            - Result: PASSED

    * Restart bgp service/docker and add one new path to an IPv4 ecmp-prefix.
            - To produce a route-state-inconsistency, add prefix-path in
    adjacent node before bgp sessions are re-established.
            - Verify that new prefix-path msg is NOT pushed down to AppDB till
    reconciliation takes place.
            - Result: PASSED

    * Restart bgp service/docker and withdraw one ecmp-path from an existing
      ecmp IPv4 prefix.
              - To produce a route-state-inconsistency, remove prefix-path in
      adjacent node before bgp sessions are re-established.
              - Verify that deleted-prefix-path msg is NOT pushed down to AppDB
      till reconciliation takes place.
              - Eventually, during reconciliation, this path will be eliminated
      as it’s not being refreshed by remote-peer.
              - Result: PASSED

IPv6 prefixes
==========

    * Restart bgp service/docker:
            - Verify that all prefixes are properly stale-marked and that no
    change is pushed to AppDB during reconciliation.
            - Result: PASSED

    * Restart bgp service/docker and add one new non-ecmp IPv6 prefix.
            - To produce a route-state-inconsistency, add prefix in adjacent
    node before bgp sessions are re-established.
            - Verify that new-prefix msg is NOT pushed down to AppDB till
    reconciliation takes place.
            - Result: PASSED

    * Restart bgp service/docker and withdraw one non-ecmp IPv6 prefix.
            - To produce a route-state-inconsistency, remove prefix in adjacent
    node before bgp sessions are re-established.
            - Verify that deleted-prefix msg is NOT pushed down to AppDB till
    reconciliation takes place.
            - Result: PASSED

    * Restart bgp service/docker and add one new path to an IPv6 ecmp-prefix.
            - To produce a route-state-inconsistency, add prefix-path in
    adjacent node before bgp sessions are re-established.
            - Verify that new prefix-path msg is NOT pushed down to AppDB till
    reconciliation takes place.
            - Result: PASSED

    * Restart bgp service/docker and withdraw one ecmp-path from an existing
      ecmp IPv6 prefix.
              - To produce a route-state-inconsistency, remove prefix-path in
      adjacent node before bgp sessions are re-established.
              - Verify that deleted-prefix-path msg is NOT pushed down to AppDB
      till reconciliation takes place.
              - Eventually, during reconciliation, this path will be eliminated
      as it’s not being refreshed by remote-peer.
              - Result: PASSED

RB=
G=lnos-reviewers
R=pchaudhary,pmao,rmolina,samaity,sfardeen,zxu
A=

Signed-off-by: Rodny Molina <rmolina@linkedin.com>

* Renaming 'restoration' code and making minor adjustments to fpmsyncd

Signed-off-by: Rodny Molina <rmolina@linkedin.com>

* Eliminating 'state' associated to field-value-tuples

Code has been refactored to reduce the complexity associated to carrying 'state' for every received FV-tuple. Obviously, there's no free-lunch here, this is only possible at the expense of more memory utilization: we are now using two different buffers to store 'old' and 'new' state. Yet, this is a relatively-small price to pay for a much simpler implementation.

Signed-off-by: Rodny Molina <rmolina@linkedin.com>

* Adding UTs to cover routing-warm-reboot logic.

Signed-off-by: Rodny Molina <rmolina@linkedin.com>

* Fixing an issue with warm-reboot UTs that prevented an existing test-case from passing

As part of these changes i'm also modifying the ip-addresses of my UT setup to
avoid clashes with existing/previous testcases.

Signed-off-by: Rodny Molina <rmolina@linkedin.com>

* Making some small adjustments

* Addressing review comments for my UT code

* Addressing more review comments.

* Refactoring UTs to rely on pubsub notifications instead of logs
lguohan pushed a commit that referenced this issue Apr 29, 2020
* src/sonic-utilities 798ce2f...7ce5b62 (19):
  > [utility] Filter FDB entries (#890)
  > [fast reboot] set a fast-reboot DB flag (#887)
  > [show] Add 'ip/ipv6 bgp network' commands (#888)
  > [Vxlan] : adding show vnet/vxlan cmds (#880)
  > [show][bgp] Use only 'show ip bgp' as the base and use bgp_frr_v4 file for FRR routing stack (#884)
  > Revert "[config] Implement a process level lock (#857)" (#882)
  > [generate_dump] Dump systemd specific information (#602)
  > [config] Implement a process level lock (#857)
  > [fwutil]: Update Command-Reference.md. (#876)
  > Add platform options to 'show techsupport' command (#865)
  > [doc]: add ltgm and jenkins badge (#875)
  > Fix even more Python warnings (#873)
  > [showtech]: dump docker stats (#864)
  > Fix more Python warnings (#869)
  > Fix Python warnings (#867)
  > Fixes bug for PFCWD feature parameters (#838)
  > Explicitly specify command names with underscores (continued) (#852)
  > [watermarkstat] Fix issue of fields overwritten before display (#862)
  > [pfc] Add command line to enable/disable/show PFC (#796)
dmytroxshevchuk pushed a commit to dmytroxshevchuk/sonic-buildimage that referenced this issue Aug 31, 2020
* [sairedis] [meta] Support connect to existing switch

* Remove comment
stepanblyschak pushed a commit to stepanblyschak/sonic-buildimage that referenced this issue May 10, 2021
- dump: dumps the entire state of all the units
 - blame: provides startup time for each service
 - plot: generate a svg of the boot order

Co-authored-by: lguohan <lguohan@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants