Skip to content
This repository was archived by the owner on Jan 3, 2023. It is now read-only.

Upgrade bfn swss common to azure swss common master#2

Merged
mkbalani merged 29 commits intobf-masterfrom
sonicSaiv1.3
Jun 1, 2018
Merged

Upgrade bfn swss common to azure swss common master#2
mkbalani merged 29 commits intobf-masterfrom
sonicSaiv1.3

Conversation

@mkbalani
Copy link

No description provided.

qiluo-msft and others added 29 commits December 22, 2017 17:27
…net#171)

* Update MacAddress tests

* Optimize MacAddress::to_string() and MacAddress::parseMacString()
Signed-off-by: Andriy Moroz <c_andriym@mellanox.com>
Signed-off-by: Sihui Han <sihan@microsoft.com>
Signed-off-by: Volodymyr Samotiy <volodymyrs@mellanox.com>
Signed-off-by: Qi Luo <qiluo-msft@users.noreply.github.com>
Signed-off-by: Sihui Han <sihan@microsoft.com>
… prefix (sonic-net#184)

* Extending IpPrefix class to return the subnet associated to any given prefix.

This method is being currently utilized by the new interface's overlapping-detection logic (to be submitted under a different sonic-swss PR). Method's goal is to simply return the subnet associated to any given prefix (see example below). A new pytest testcase will be appended shortly.

Examples:

subnet("10.1.1.1/24") = 10.1.1.0/24
subnet("fc00:0003:0002:0002::2/64") = fc00:0003:0002:0002:0000:0000:0000:0000/64

* Adding UTs for previous IpPrefix class extension.
…n ip-address (sonic-net#187)

* Extending IpAddress class with method to return the scope of any given ip address

This code is required by link-local functionality (sonic-swss PR/437).

UTs execution:

rmolina@6175c07b92ba:/sonic/src/sonic-swss-common$ sudo ./tests/tests
...
[----------] 2 tests from IpAddresses
[ RUN      ] IpAddresses.empty
[       OK ] IpAddresses.empty (0 ms)
[ RUN      ] IpAddresses.contains
[       OK ] IpAddresses.contains (1 ms)
[----------] 2 tests from IpAddresses (1 ms total)

[----------] 1 test from IpAddress
[ RUN      ] IpAddress.getAddrScope
[       OK ] IpAddress.getAddrScope (0 ms)
[----------] 1 test from IpAddress (0 ms total)
...

* Reducing scope of auxiliar variables.
Signed-off-by: Wataru Ishida <ishida.wataru@lab.ntt.co.jp>
…name separator when constructing Table objects (sonic-net#190)

* Also move TEST_DB to index 15, the largest index supported by default Redis config
…nic-net#194)

- Align (almost) all unit tests with new definition of TEST_DB (ID 15). Exceptions include redis_state_ut.cpp and redis_piped_state_ut.cpp, which now test against APPL_DB (DB ID 0), because due to hardcoded colon (":") separators in consumer_table_pops.lua, ConsumerTable/ConsumerStateTable currently only work with tables which use the colon as a table name separator.

- Remove hard-coded table name separators from json_ut.cpp. Instead, fetch separator from Table object
)

* Use EXPECT_EQ, instead of EXPECT_TRUE for everything

* Use unsigned value for comparison with json.size()

* Add newlines at the end of the files
…t#192)

* Refactor select and selectable. Now they support priority

* Remove fd parameter from Select.select(). This parameter was never used

* Use references as loop variables

* Make select fair for selectables.

If we have selectables with equal priority,
select will choose a selectable which was chosen before
all others. So one selectable can't block others

This commit also contains typo fix

* Revert "Use references as loop variables"

This reverts commit bac891b.

* Revert performance changes

* Address comments

* Make the comparator comment clearer

* Use right EINTR error code for netlink function

* Move Selectable comparator to the Select class as a private functional object, to avoid it using by others

* Hide m_last_used_time from all classes except Select

* Rename some class members

* Make more consistent naming for LastUsedTime of selectable
Signed-off-by: Shu0T1an ChenG <shuche@microsoft.com>
…c-net#198)

* Pass arguments by references for constructors and methods

* Don't make copies of the values, if we can

* use equality operator instead of the string comparator

* Don't use std::move for return values

* Initialize ip address and ip prefix more effectevely

* Fix typo

* Address comments
* Pass arguments by references for constructors and methods

* Use = default construction to define empty constructors destructors

* emplace_back is faster, than push_back for const char* and pairs

* Use = default and override to make the code more C+11

* Remove unused ~NetDispatcher()
Signed-off-by: Sihui Han <sihan@microsoft.com>
@mkbalani mkbalani requested a review from krambn May 31, 2018 22:29
@mkbalani mkbalani merged commit 4e0aa64 into bf-master Jun 1, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

9 participants