commit | 24e87c1c48919b37456c7087e358ea4bd281c892 | [log] [tgz] |
---|---|---|
author | Paul Stewart <pstew@chromium.org> | Wed Jun 10 20:54:12 2015 -0700 |
committer | ChromeOS Commit Bot <chromeos-commit-bot@chromium.org> | Sat Jun 13 01:26:21 2015 +0000 |
tree | 15bee74d7c4fef0c17edeaa03faefc60198e6573 | |
parent | 05a9f626a9921ae1e5b92db2c2a222317f5fb397 [diff] |
shill: RTNLHandler: Mask known errors Create a concept of an error mask -- a list of errno values that are are considered benign for a given RTNL method call. Maintain window of these error masks for the last N most recent sequence numbers sent to the kernel. On receipt of an error response, only send a LOG(ERROR) (visible in /var/log/messages) if this error is not anticipated by the error mask. Use this facility to create a variant of SendMessage() that inspects the outgoing message request and assigns a default error mask -- for example an "Add" request that receives an EEXIST ("already exists") error is benign with respect to method calls that just wish that this entry exist. Use this new facility to make routing and address requests silent in the face of requests that fail because the work is already essentially done. While here, make the normal processing of incoming and outgoing RTNL messages at a less verbose level, since libshill-net doesn't use context-specific logging. BUG=chromium:498908 TEST=New unit tests (for regressions) + Manual: TEST=restart shill; grep "shill.*rtnl" /var/log/messages Change-Id: I9b4a9ae579dd34935a9c269979668dc569728790 Reviewed-on: https://chromium-review.googlesource.com/276739 Reviewed-by: mukesh agrawal <quiche@chromium.org> Tested-by: Paul Stewart <pstew@chromium.org> Commit-Queue: Paul Stewart <pstew@chromium.org>