Best Effort is the default priority with the assigned value of 0, but
Background is the lowest priority with the assigned value of 1.
Ref: IEEE 802.1Q, Chapter I.4, Table I-2.
Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
The new mappings require at least two traffic classes so there are fewer
tests than there are for the strict mapping.
Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
This commits adds new priority to traffic class mappings and allows
users to choose which mapping to use through menuconfig.
The new mappings are recommended in 802.1 (chapter 34.5) for
time-sensitive applications supporting the credit-based sharper
algorithm.
Signed-off-by: Tomasz Gorochowik <tgorochowik@antmicro.com>
Due to a misspelling in the existence check for the stored checksum
file, zephyr/.config was always regenerated from the config fragments
(e.g. prj.conf), overwriting any custom zephyr/.config configuration
done in e.g. menuconfig.
This bug was introduced by commit 5402662dd9 ("cmake: kconfig: Fix
rerunning cmake after Kconfig warnings").
Fixes: #9270
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Split out the arch specific syscall code to reduce include pollution
from other arch related headers. For example on ARM its possible to get
errno.h included via SoC specific headers. Which created an interesting
compile issue because of the order of syscall & errno/errno syscall
inclusion.
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
In coap module previous test cases are modified as well as
new test functions are added to increase the code coverage
Signed-off-by: Tarun Kumar Agarwal <tarun.kumar.agarwal@intel.com>
Zephyr UART drivers offer very low-level functionality. Oftentimes,
it would be useful to provide higher-level wrappers around UART
device which would offer additional functionality. However, UART
driver irq callback routine receives just a pointer to (low-level)
UART device, and it's not possible to get to a wrapper structure
(without introducing expensive external mapping structures). This
is an indirect reason why the current UARt wrappers - uart_pipe,
console - are instantiated statically just for one underlying UART
device and cannot be reused for multiple devices.
Solve this by allowing to pass an arbitrary user data to irq
callback, set by new uart_irq_callback_user_data_set() function.
Existing uart_irq_callback_set() keeps setting a callback which
will receive pointer to the device.
While public API maintains compatibility, drivers themselves need
to be updated to support arbitrary user data storage/passing (as
legacy uart_irq_callback_set() functionality is now implemented in
terms of it).
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
Input length was accounting TC_AES_BLOCK_SIZE twice and consequently
not considering the whole cipher.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
do_cbc_decrypt() was not accounting IV's size in the input buffer.
Note that tinycrypt expects that IV and cipher text to be contiguous,
but input length must consider only the cipher text.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
Update tinycrypt to latest revision, two commits after 0.2.8 release.
These commits are only bug fixes and one of them is fixing incorrect
buffer size in decryption with CBC mode.
This algorithm is being used by tinycrypt shim and is tested in
samples/drivers/crypto/.
Signed-off-by: Flavio Ceolin <flavio.ceolin@intel.com>
The runtime filters (both aggregated and per-backend) are all getting
initialized to the default level CONFIG_LOG_DEFAULT_LEVEL. This is not
correct behavior: the initial runtime setting for each source ID
should match its compile-time level setting.
Otherwise, setting CONFIG_LOG_RUNTIME_FILTERING=y changes the logging
behavior for messages that pass the compile time filter check, but not
the runtime check (this currently happens when LOG_LEVEL=4, since
CONFIG_LOG_DEFAULT_LEVEL=3).
Fix this by initializing all filters to their module's compile time
settings. Also make sure that filters are set up before backends are
activated, to avoid race conditions.
Fix a stray documentation typo while we are here.
Signed-off-by: Marti Bolivar <marti@foundries.io>
The documentation says a module can be split up over multiple files,
but there's no good way to do that. In the file with the
LOG_MODULE_REGISTER() call, the definitions of the module's state
variables serve as declarations that LOG_DBG(), etc. can use. But in
other files making up the module, no such declarations are available,
and the macro expansion bombs out spectacularly and confusingly.
Fix this by adding a LOG_MODULE_DECLARE() macro which other files in
the module can use to declare the internal state used by the log
module, so that LOG_DBG() etc. work properly.
Keep the documentation up to date.
Signed-off-by: Marti Bolivar <marti@foundries.io>
Settings consider the character space the end of the value, so instead
encode the name using settings_str_from_bytes and restore it with
settings_bytes_from_str.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Modified the web page to make it direct and easier to understand.
Major changes being the selection of the directory in the Zephyr SDK
Installation and a Note added for the '.zephyrrc' to include the SDK
installation location if not default.
Minor changes involving the elimination of repeated use of same sentence
with different Host OS and indentation correction in the Fedora section
since it showed up in 'white text' rather than code block.
SDK's '.zephyrrc' documentation needed to have the default location and
the user defined location
Signed-off-by: Arjun Warty <arjun.warty@nxp.com>
Commit b3d165f ("scripts: kconfig: Handle warnings generated
during evaluation") made it common for kconfig.py to fail after writing
zephyr/.config. This confuses the configuration fragment checksum logic
in cmake/kconfig.cmake, because it expects the saved checksum file to
exist if zephyr/.config exists.
The end result is a CMake error when rerunning the configuration after
non-whitelisted Kconfig warnings.
Fix it by only writing zephyr/.config (and zephyr/include/autoconf.h) in
kconfig.py if there are no warnings-turned-errors.
Also check if the saved checksum file exists in kconfig.cmake before
trying to open it. Normally this shouldn't happen though.
Move the writing of the checksum file to before writing zephyr/.config
as well. That way, zephyr/.config only gets written if the other
operations succeed.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Initially missing function prototypes warnings and undefined macro
warnings were disabled to quickly prototype the posix arch and
native_posix board.
But there is no excuse anymore to have this warnings disabled.
=> enable them.
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
unistd.h was missing (used by read, close..)
printk header was also missing, but replace it's use
with posix_print_trace: It is faster and does not require
any Zephyr functionality to work.
fflush is not needed in this case.
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
The native_posix random driver uses random() and srandom()
whicha are old XOPEN POSIX extension (part of POSIX 2001).
To avoid compiler warnings due to the host libC headers
not including this prototypes otherwise, let's define
this 2 macros.
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
A few function prototypes were missing in the native_posix
board and its drivers.
Let's add them.
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
When compiling with the native_posix console, the prototype
for posix_flush_stdout() was missing => added.
Signed-off-by: Alberto Escolar Piedras <alpi@oticon.com>
- Get rid of duplicate I2C dependencies, which show up in the
documentation as e.g. 'I2C && I2C'. The 'source's in
drivers/i2c/Kconfig are already within an 'if I2C' block.
- Factor out I2C_GPIO_<n> dependencies in drivers/i2c/Kconfig.gpio into
'if I2C_GPIO_<n>' blocks.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>
Add a Getting Started section in the README.rst for quick and easy
access to what is arguably the most read page of our doc website.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
Replace the current title with an image containing the Zephyr logo for
the root README.rst, in order to make the GitHub landing page more
attractive.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
The dummy L2 does not setup the link layer address. Do not check the
source and destination link layer addresses when routing packets
otherwise packet routing will not work when using a dummy L2.
Signed-off-by: Florian Vaussard <florian.vaussard@gmail.com>
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
As the test is testing neighbor discovery which needs to know
link addresses, we must run the test using Ethernet L2.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Unspecified address 0.0.0.0 was used as a requested IPv4 address
because the ARP message was generated second time. So for IPv4
autoconf ARP message, generate the message only once.
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Allows ethernet drivers to provide vendor specific statistics
and details in the form of key-value pairs with the name of
the staticstic and its value.
The new string tables will be behind a new config:
NET_STATISTICS_ETHERNET_VENDOR
Suggested-by: Jukka Rissanen <jukka.rissanen@intel.com>
Signed-off-by: Jonathan Yong <jonathan.yong@intel.com>
If a disconnection callback was registered, it is not called
as the check done in net_app is reversed. The disconnection callback
is not called if there are any inactive contexts.
The check should be on any active context.
Signed-off-by: Philémon Jaermann <p.jaermann@gmail.com>
Normally App Keys are identified using the AppKey Index value (a 12
bit value in practice), whereas the stack-internal array index has
very little relevance.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
When we receive a security request we need to make sure that any
existing keys contain an LTK to encrypt with. Otherwise there's a risk
of trying to encrypt with an all-zeroes LTK.
Fixes#3221
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Added implementation to check and wait for stable 32KHz
clock source before starting connectable/directed
advertising state and initiating state.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fix the implementation to correctly check the status of
HFCLK and LFCLK states with respect to the requested
sources.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Added Kconfig option and implementation to support a
non-blocking startup of 32KHz crystal oscillator.
This will reduce the time from boot to application start
while the crystal startup happens in background.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Fixed the implementation to generate command status as per
Bluetooth v5.0 specification instead of the incorrect
command complete that was generated before.
Also, the unsupported features status will be generated
before the invalid parameters status.
Relates to commit 258c7ccff1 ("Bluetooth: controller: Fix
HCI LE Set PHY invalid behavior check")
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
- Remove redundant 'n' defaults. 'n' is the default value for bool
symbols.
This makes the auto-generated documentation clearer as well: You get
"implicitly defaults to n" instead of
"- n if <propagated dependencies>".
- Shorten
<type>
prompt "foo"
to
<type> "foo"
This works for all types, not just bool.
- Various formatting nits.
Signed-off-by: Ulf Magnusson <Ulf.Magnusson@nordicsemi.no>