This helps to debug issues with mass connection handling (e.g. when
issues happen at ~500th connection).
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
It's possible to get number of free pkts/buffers with just
CONFIG_NET_BUF_POOL_USAGE, whereas CONFIG_NET_DEBUG_NET_PKT
depends on CONFIG_NET_LOG and adds quite a bunch of other
overhead. Also, give a hint that this option should be enabled
to get free buffer numbers.
Additionally, use unambiguous "Total" wording to represend the
maximum capacity of data structures, instead of previous "Count".
"Count" (or at least counter) is intuitively something which can
change, so not seeing any other numbers, it's very easy to assume
that it's actually number of free buffers (because that's the
information a user may be interested in in many cases).
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
There are 3 cases of possible allocation failures, only 1 of them
was logged. Now, all the cases are logged: 1) failure to allocate
net_pkt; 2) failure to allocate very first net_buf for it; 3)
failure to allocate additional net_buf for it (this latter was
the only one logged previously).
Signed-off-by: Paul Sokolovsky <paul.sokolovsky@linaro.org>
There have been situations where the remote stacks cannot responds
within a second, so increases it to 2 seconds. The timeout has to be
relatively short as the channel cannot be reused while disconnecting.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
MPS shall never be bigger than MTU + 2 as the remaining bytes cannot
be used since the SDU is limited to length + MTU.
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Add implementation to support Coded PHY update procedure
with packet transmit time restrictions.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Use S8 coding Rx chain delay timings to calculate the PA
pin assertions when in Coded PHY.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Always use S8 Rx Chain Delay instead of the actual Rx-ed
packet coding. I believe, as the packet always start with
S8, hence S8 timings when used the tIFS is near correct
value.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
When calculating and setting up the header compelte timeout
use S8 coding Rx chain delay.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
In the commit dd52b8ea02 ("Bluetooth: controller: Fix
first connection interval timing"), instead of using just a
tick unit as workaround, microseconds corresponding to a
tick unit was used while calculating the window offset to be
used at the connection update instant. This introduced an
error in scheduling the first event with new connection
parameters, causing supervision timeout of connection update
procedure.
Signed-off-by: Vinayak Kariappa Chettimada <vich@nordicsemi.no>
Mesh Profile Specification v1.0, 4.4.1.2.8:
"When an element receives a Config Model Subscription Add message
or a Config Model Subscription Virtual Address Add message that
is not successfully processed (i.e., it results in an error condition
listed in Table 4.113), it shall respond with the Config Model
Subscription Status message, setting its fields to the values
of the corresponding fields (i.e., the identically named fields)
of the incoming message and setting the Status field to a status code
(defined in Table 4.113), and setting all other fields to 0."
The same applies to other Model Subscription messages.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
It's possible that tx_notify still contains items when a Disconnect
Complete happens. Since the normal path for processing tx_notify is
not taken when the connection is not in CONNECTED state, we must make
sure to process the list latest in conn_cleanup() that's called as one
last thing before the connection object is freed up.
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
If the caller has passed net_pkt to prepare_segment(), then
it is caller responsibility to unref it in a case of error.
Fixes#4292
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Does the opposite of k_object_access_grant(); the provided thread will
lose access to that kernel object.
If invoked from userspace the caller must hace sufficient access
to that object and permission on the thread being revoked access.
Fix documentation for k_object_access_grant() API to reflect that
permission on the thread parameter is needed as well.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
Indicate to users that this feature isn't fully baked yet.
This will be reverted for 1.11 release.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
A space-constrained device wouldn't enable this feature.
Fixes build errors since these tests constrain the size of
the IDT.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This has extra stack overhead, no need to impose this on the caller
unless it's needed to avoid doing a system call for every
character.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
We add macros to define test cases that should be run with the CPU
in user mode, if the CPU supports it.
ztest_test_suite() declarations are now static as they can't go on
the main thread stack; the data gets shared between multiple threads.
It's better here anyway as a large test suite could fill up the main
stack, which is by default reduced to 512 bytes.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
By default, threads are created only having access to their own thread
object and nothing else. This new flag to k_thread_create() gives the
thread access to all objects that the parent had at the time it was
created, with the exception of the parent thread itself.
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
This requires openocd version 0.10 or later.
Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
Signed-off-by: Christophe Priouzeau <christophe.priouzeau@linaro.org>
- When flashing with dfu-util while alt is not a number, the name must
be quoted.
- Add missing commas in self.list_pattern
- Always call dfu-util with the VID/PID
Fixes: 257fa4af9 ("scripts: zephyr_flash_debug: flash like dfuutil.sh")
Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
All commands need to have quotation marks stripped.
Fixes: bee6f9e73 ("scripts: zephyr_flash_debug: flash like openocd.sh")
Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
This patch adds composite support for USB class drivers.
It acts as a relay between the usb_device stack and
class or function drivers.
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Add common device descriptor for USB class devices.
The common descriptor allows easy configuration of Manufacturer,
Product, SerialNumber strings and PID/VID.
It also allows future support for composite devices.
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
Add Mass Storage Class header. The header is based on mass_storage.h,
has been cleaned up and extended by the Class and Protocol Codes.
mass_storage.h will be removed after mass_storage.c has been reworked.
Signed-off-by: Johann Fischer <j.fischer@phytec.de>
1. After calling sendto(), the packet will be unreferenced.
Call coap_pending_cycle() to make sure the packet is referenced until
we got the response from the peer or retransmission timeout.
2. In retransmit_request(), we rearrange the order to avoid the issue.
3. Remove IPv4 configuration for source code is expecting IPv6
4. Correct a typo in README.rst
5. Initialize the interface w/ IPv6 address
Signed-off-by: Robert Chou <robert.ch.chou@acer.com>
When testing against etsi_coaptest.sh, test cases TD_COAP_BLOCK_03/04
will get stuck. This is because these testcases send out a blockwise
transfer but with an empty payload. Although this should be a legit
request, large-update/create handlers did not check "MORE" flag in
block1 option and always return an error when request comes with empty
payload.
Corrected as below
1. Initialize coap_block_context when first block arrives.
(SIZE1 option is not always available. In the case that SIZE1 is
unavailable, the zoap_block_context will be re-initialized each time
a new block has arrived)
2. Check "MORE" flag of block1 option. If it's the last block, then
an empty payload should be allowed.
3. Response w/ 2.04 CHANGED when the last block has arrived for
large-update
4. Response w/ 2.02 CREATE when the last block has arrived for
large-create
5. Remove adding block2 option to the response since we are not sending
back any data to the caller
Signed-off-by: Robert Chou <robert.ch.chou@acer.com>
Some chips are smart enough to handle the ACK request flag on
transmitted frames, so it's unneccessary for the L2 to wait for it.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This is both required in L2's radio part as well as it might be useful
on some ieee802154 radio drivers.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Finally removing set_ieee_addr, set_short_addr and set_pan_id which have
been replaced by set_filter.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
set_ieee_addr, set_short_addr and set_pan_id are now unused by L2, so
removing their exposure through the radio API.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
These are now fully replaced by set_filter() thus removing their usage
by the L2 layer.
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>