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

[build]: Fix compiling warnings using ARM 32 bit compiler #1015

Merged
merged 25 commits into from
Aug 16, 2019

Conversation

antony-rheneus
Copy link
Contributor

What I did

Why I did it

How I verified it

Details if related

antony-rheneus and others added 17 commits July 24, 2019 00:43
Signed-off-by: Antony Rheneus <arheneus@marvell.com>
Signed-off-by: Antony Rheneus <arheneus@marvell.com>
Signed-off-by: Antony Rheneus <arheneus@marvell.com>
Signed-off-by: Shu0t1an Cheng <shuche@microsoft.com>
Buffer pool watermark design is built on a READ_AND_CLEAR polling mode at the syncd level. We observe some SAI implementation is missing the clear_stats operation support for buffer pool watermark, either simply not coded yet or having hardware limitation. In such cases, we have mismatch between the actual polling behavior and what a user perceives from FLEX_COUNTER_DB read from FLEX_COUNTER_GROUP_TABLE.

To have a consistent view, we propose per buffer pool watermark stats polling mode at the orchagent level when not all buffer pools support clear_stats operation on a switch. The situation is detected by issuing clear_stats operation at the orchagent level to probe the capability over all pools first. If this is truly the case, we then do not set "STATS_MODE" field in "FLEX_COUNTER_GROUP_TABLE:BUFFER_POOL_WATERMARK_STAT_COUNTER", but set it to the per buffer pool table "FLEX_COUNTER_TABLE:BUFFER_POOL_WATERMARK_STAT_COUNTER:oid:<buffer_pool_oid>".
…c-net#994)

make explicit failure if team kernel module is not available on the system

Signed-off-by: Guohan Lu <gulv@microsoft.com>
Signed-off-by: tengfei <tengfei@asterfusion.com>
…#996)

default image is docker-sonic-vs:latest

Signed-off-by: Guohan Lu <gulv@microsoft.com>
This is to get a better JUnitXML file and align all
the tests under the same level of hierarchy.

Signed-off-by: Shu0T1an ChenG <shuche@microsoft.com>
Signed-off-by: Antony Rheneus <arheneus@marvell.com>
Signed-off-by: Antony Rheneus <arheneus@marvell.com>
Signed-off-by: Antony Rheneus <arheneus@marvell.com>
Signed-off-by: Antony Rheneus <arheneus@marvell.com>
Signed-off-by: Antony Rheneus <arheneus@marvell.com>
Signed-off-by: Antony Rheneus <arheneus@marvell.com>
@antony-rheneus
Copy link
Contributor Author

I couldn't understand the failure results, would you please provide suggestions to resolve it.

@lguohan lguohan requested a review from qiluo-msft August 1, 2019 17:39
orchagent/portsorch.cpp Outdated Show resolved Hide resolved
@qiluo-msft
Copy link
Contributor

qiluo-msft commented Aug 2, 2019

    ProducerStateTable *psTable, const uint32_t defaultWarmStartTimerValue = 0);

We also need change implementation to use mktime explicitly convert from uint32_t (or any other int type) to time_t #Closed


Refers to: warmrestart/warmRestartAssist.h:58 in 00c8c93. [](commit_id = 00c8c93, deletion_comment = False)

Copy link
Contributor

@qiluo-msft qiluo-msft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as comments

Signed-off-by: Antony Rheneus <arheneus@marvell.com>
Copy link
Contributor

@stcheng stcheng left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please check

Signed-off-by: Antony Rheneus <arheneus@marvell.com>
Signed-off-by: Antony Rheneus <arheneus@marvell.com>
@antony-rheneus
Copy link
Contributor Author

antony-rheneus commented Aug 7, 2019

    ProducerStateTable *psTable, const uint32_t defaultWarmStartTimerValue = 0);

We also need change implementation to use mktime explicitly convert from uint32_t (or any other int type) to time_t

Refers to: warmrestart/warmRestartAssist.h:58 in 00c8c93. [](commit_id = 00c8c93, deletion_comment = False)

@qiluo-msft , I addressed as per your comments, changing from typecast to mktime()
however, typecast assigns the same value, whereas mktime() converts the time to different value. This would break the functionality.
#Closed

@antony-rheneus
Copy link
Contributor Author

    ProducerStateTable *psTable, const uint32_t defaultWarmStartTimerValue = 0);

We also need change implementation to use mktime explicitly convert from uint32_t (or any other int type) to time_t
Refers to: warmrestart/warmRestartAssist.h:58 in 00c8c93. [](commit_id = 00c8c93, deletion_comment = False)

@qiluo-msft , I addressed as per your comments, changing from typecast to mktime()
however, typecast assigns the same value, whereas mktime() converts the time to different value. This would break the functionality.

@qiluo-msft , I suggest to revert the mktime() changes and go with typecasting approach

@qiluo-msft
Copy link
Contributor

I could not understand

typecast assigns the same value, whereas mktime() converts the time to different value. This would break the functionality.

Could you clarify?


In reply to: 518963372 [](ancestors = 518963372)

@antony-rheneus
Copy link
Contributor Author

I could not understand

typecast assigns the same value, whereas mktime() converts the time to different value. This would break the functionality.

Could you clarify?

In reply to: 518963372 [](ancestors = 518963372)

Original code:-
auto interv = timespec { .tv_sec = m_pollingInterval.count(), .tv_nsec = 0 };

Modified Code:-
tmInterval.tm_sec = m_pollingInterval.count();
auto interv = timespec { .tv_sec = mktime(&tmInterval), .tv_nsec = 0 };

In the above 2 cases, timespec.tv_sec values are NOT same. as mktime() returns a timestamp which is between given time since Unix Epoch.

mktime() returns timestamp since epoch and cannot be usedfor typecasting

Signed-off-by: Antony Rheneus <arheneus@marvell.com>
@stcheng stcheng changed the title Warning fixes to compile using arm 32 bit compiler [build]: Fix compiling warnings using ARM 32 bit compiler Aug 9, 2019
fpmsyncd/fpmsyncd.cpp Outdated Show resolved Hide resolved
Copy link
Contributor

@qiluo-msft qiluo-msft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor issues, otherwise looks good to me

@qiluo-msft qiluo-msft self-requested a review August 9, 2019 22:29
@qiluo-msft qiluo-msft dismissed their stale review August 9, 2019 22:30

Minor issues, otherwise looks good to me

@lguohan
Copy link
Contributor

lguohan commented Aug 11, 2019

@qiluo-msft , can you approve?

Signed-off-by: Antony Rheneus <arheneus@marvell.com>
Signed-off-by: Antony Rheneus <arheneus@marvell.com>
Signed-off-by: Antony Rheneus <arheneus@marvell.com>
@lguohan lguohan merged commit 65cbd55 into sonic-net:master Aug 16, 2019
dgsudharsan pushed a commit to dgsudharsan/sonic-swss that referenced this pull request Oct 7, 2019
EdenGri pushed a commit to EdenGri/sonic-swss that referenced this pull request Feb 28, 2022
)

merge container feature cli into feature cli

config command:
```
admin@vlab-01:~$ sudo config feature
Usage: config feature [OPTIONS] COMMAND [ARGS]...

  Modify configuration of features

Options:
  -?, -h, --help  Show this message and exit.

Commands:
  autorestart  Configure autorestart status for a feature
  state        Configure status of feature
```

show command:
```
admin@vlab-01:~$ show feature
Usage: show feature [OPTIONS] COMMAND [ARGS]...

  Show feature status

Options:
  -?, -h, --help  Show this message and exit.

Commands:
  autorestart  Show auto-restart status for a feature
  status       Show feature status
```

output:

```
admin@vlab-01:~$ show feature status
Feature     Status    AutoRestart
----------  --------  -------------
lldp        enabled   enabled
pmon        enabled   enabled
sflow       disabled  enabled
database    enabled   disabled
restapi     disabled  enabled
telemetry   enabled   enabled
snmp        enabled   enabled
bgp         enabled   enabled
radv        enabled   enabled
dhcp_relay  enabled   enabled
nat         enabled   enabled
teamd       enabled   enabled
syncd       enabled   enabled
swss        enabled   enabled
admin@vlab-01:~$ show feature autorestart
Feature     AutoRestart
----------  -------------
lldp        enabled
pmon        enabled
sflow       enabled
database    disabled
restapi     enabled
telemetry   enabled
snmp        enabled
bgp         enabled
radv        enabled
dhcp_relay  enabled
nat         enabled
teamd       enabled
syncd       enabled
swss        enabled
```

Signed-off-by: Guohan Lu <lguohan@gmail.com>
oleksandrivantsiv pushed a commit to oleksandrivantsiv/sonic-swss that referenced this pull request Mar 1, 2023
Update SAI submodule v1.9 with the following fixes

7594e53 (HEAD, origin/v1.9) Skip brcm teardown assertion (sonic-net#1423) (sonic-net#1428)
0c33f4a [FIX]Fix the circular reference issue when build sai header py (sonic-net#1427)
7e0fc24 Add support for building under Doxygen 1.9.1 (sonic-net#1414) (sonic-net#1424)
8ecf3ef [Fix]Correct enum check on branch 1.9 (sonic-net#1418)
e2b2f39 Add Thrift 0.14.1 compatibility (sonic-net#1403) (sonic-net#1416)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants