Commit graph

99553 commits

Author SHA1 Message Date
Vincenzo Frascino
8ac1221565 boards: 96b_carbon: Add MPU support
This patch adds MPU support to the 96 boards Carbon board based on
STM32F401XE.

Change-Id: I8444318099a665133488ccdd5ba129c805f9a20e
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@linaro.org>
2017-04-25 21:53:20 +00:00
Vincenzo Frascino
5951e45580 soc: arm: stm32f4: Add Initial MPU Support
This patch adds initial MPU support to STM32F401XE.
The boot configuration prevents the following security issues:
* Prevent to read at an address that is reserved in the memory map.
* Prevent to write into the boot Flash/ROM.
* Prevent the application to access to the BootROM.
* Prevent from running code located in SRAM.

Change-Id: I4dc0669009bd5c0a829a69f8ff417c787b7043ed
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@linaro.org>
2017-04-25 21:53:19 +00:00
Vincenzo Frascino
25dbc4e5bc board: arm: v2m_beetle: Enable MPU by default
This patch enables MPU by default into the V2M Beetle port of Zephyr.

Change-Id: Iab2dea748c68a6932eb31e746d1a9cdb07808683
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@linaro.org>
2017-04-25 21:53:18 +00:00
Vincenzo Frascino
b125767fdb soc: arm: beetle: Add Initial MPU Support
This patch adds initial MPU support to ARM Beetle.
The boot configuration prevents the following security issues:
* Prevent to read at an address that is reserved in the memory map.
* Prevent to write into the boot Flash/ROM.
* Prevent from running code located in SRAM.

Change-Id: I64f1001369896fffb0647de6be605a95161c4695
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@linaro.org>
2017-04-25 21:53:17 +00:00
Vincenzo Frascino
e37214062c arm: core: mpu: Add ARM MPU support
This patch adds an initial driver for the ARM MPU.
This driver has been tested on ARM Beetle and STM32F4.

Change-Id: I2bc4031961ec5a1d569929249237646f4a349f16
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@linaro.org>
2017-04-25 21:53:17 +00:00
Vincenzo Frascino
0974496d52 arm: core: Add MPU parameter to the arm core
This patch add the Memory Protection Unit parameter to the arm core
configuration.

Change-Id: Ifee8cdd5738391a6f182e8d0382d27eeb8c546ba
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@linaro.org>
Signed-off-by: Marc Moreno <marc.morenoberengue@linaro.org>
2017-04-25 21:53:16 +00:00
Vincenzo Frascino
8f6d874f59 arm: soc: beetle: Add regions for mpu configuration
This patch adds the regions for the mpu configuration to the soc.h file.

Change-Id: Ifd1ce96eeb4731ae01f5171924af92b9e236a3dc
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@linaro.org>
Signed-off-by: Marc Moreno <marc.morenoberengue@linaro.org>
2017-04-25 21:53:15 +00:00
Daniel Thompson
5fcfa57bed boards: 96b_carbon: Fix broken PLL settings
The current PLL settings for the Carbon have two problems.

1. The VCO frequency (672MHz) is out of spec.
2. The 48MHz clock is being driven at 84MHz which breaks USB,
   breaks SDIO and also risks biasing the RNG.

Fix this by bringing the VCO down to 336MHz (which also fixes
the 48MHz clock) and update the other dividers accordingly.

Change-Id: I394c476a8b27f027da5cdc31992613b376cf6aff
Signed-off-by: Daniel Thompson <daniel.thompson@linaro.org>
2017-04-25 19:52:45 +00:00
Erwan Gouriou
933e39d2a8 sensor: lsm6ds0: fix copy/paste error
LSM6DS0 kconfig option refers to LIS3MDL sensor.
This commit fixes the issue.

Change-Id: I2867973064389cc745fcd5636e65916fcbc0ea40
Signed-off-by: Erwan Gouriou <erwan.gouriou@linaro.org>
2017-04-25 19:27:22 +00:00
Vincenzo Frascino
dfed8c4874 kernel: Add stack_info to k_thread
This patck adds the stack information into the k_thread data structure.
The information will be set by when creating a new thread (_new_thread)
and will be used by the scheduling process.

Change-Id: Ibe79fe92a9ef8bce27bf8616d8e0c878508c267d
Signed-off-by: Vincenzo Frascino <vincenzo.frascino@linaro.org>
2017-04-25 16:02:38 +00:00
Anas Nashif
2611a9695d doc: add galileo board documentation
Jira: ZEP-1914
Change-Id: I4df418808ae35f75d7ed343316341ce242902068
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-04-25 15:38:53 +00:00
Anas Nashif
ee07a98f9e doc: add minnowboard documentation
Jira: ZEP-1913
Change-Id: I69a15e7e18faf695550ca188bca6b8c21b90f4e9
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-04-25 09:42:17 -04:00
Adithya Baglody
23d946f4c0 drivers: console: Do not wait on the DTR signal from the host USB controller.
Jira: ZEP-1993
Change-Id: I4834d630f245f81381887af56e2d6ccd811094b4
Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
2017-04-25 02:33:01 +00:00
Inaky Perez-Gonzalez
37f4178f58 x86: call gen_idt with $ZEPHYR_BASE too
When calling scripts/gen_idt, if we don't have $ZEPHYR_BASE/scripts in
the path, it will fail, so we can call it with its full path to avoid
such need.

Change-Id: I47b340c9f3204ad8740c29e663e12082208bb13b
Signed-off-by: Inaky Perez-Gonzalez <inaky.perez-gonzalez@intel.com>
2017-04-25 02:32:29 +00:00
David Brown
edd0240397 doc: Add secure coding guidelines
Initial version of some document to capture the secure coding
practices used in the Zephyr project.

Signed-off-by: David Brown <david.brown@linaro.org>
Change-Id: Ic20546a7af832dc7bd193eb91ed44f1badc3ab87
2017-04-25 02:32:14 +00:00
Leandro Pereira
6ccfe5aa14 samples: Add SEGGER SystemView sample application
This sample application uses the kernel system logger already present
in Zephyr and publishes events through the SEGGER RTT protocol, so it's
available by the SEGGER SystemView application.

[1] https://www.segger.com/systemview.html?p=1731

Jira: ZEP-1463
Change-Id: If1eba4644b95175660b3040bdc4b2717b2cfc9ad
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
2017-04-25 02:16:37 +00:00
Leandro Pereira
678429da3c debug: Add SEGGER SystemView libraries
These libraries allow publishing information to enable system profiling
when using the SEGGER SystemView tool.  This tool provides a way to record
and visualize events such as threads scheduling, interrupts, and can help
find unintended interactions and resource conflicts.  More information can
be obtained from SEGGER website at [1], including downloads for major
platforms.

[1] https://www.segger.com/systemview.html?p=1731

Jira: ZEP-1463
Origin: https://www.segger.com/systemview.html?p=1731
Change-Id: I04f5897690089dc8a8fb4ae60726fe3a022b7a30
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2017-04-25 02:16:37 +00:00
Leandro Pereira
ffe74b45fa kernel: Add thread events to kernel event logger
This adds a new event type to the kernel event logger that tracks
thread-related events: being added to the ready queue, pending a
thread, and exiting a thread.

It's the only event type that contains "subevents" and thus has a
non-void parameter in their respective _sys_k_event_logger_*()
function.  Luckily, as isn't the case with other events (such as IRQs
and thread switching), these functions are called from
platform-agnostic places, so there's no need to worry about changing
the assembly guts.

This is the first patch in a series adding support for better real-time
profiling of Zephyr applications.

Jira: ZEP-1463
Change-Id: I6d63607ba347f7a9cac3d016fef8f5a0a830e267
Signed-off-by: Leandro Pereira <leandro.pereira@intel.com>
2017-04-25 02:16:36 +00:00
Mazen NEIFER
35a48decfa xtensa port: Fixed compilation error introduced by recent changes.
The error was introduced by
    b8823c4efd

Change-Id: Ibf930107a7a690e0cb0851b7c247d524e3cb89e5
Signed-off-by: Mazen NEIFER <mazen@nestwave.com>
2017-04-24 20:41:46 +00:00
Christer Weinigel
89c23e1c72 soc: stm32f4xx: Document the flash latency values
Document the flash latency values by copying the relevant tables
from the reference manuals for each MCU.

Change-Id: Ieb2824ffd7634d917399e3e62146d9243b527f44
Signed-off-by: Christer Weinigel <christer@weinigel.se>
2017-04-24 20:16:29 +00:00
David B. Kinder
3561c73ece spell: Kconfig help typos: /arch
Fix misspellings in Kconfig help text and made spelling of
RX and TX consistent (from reviewer comments)

Change-Id: Ie9d4c3863cd210e7a17b50a85a7e64156b6bf3d7
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-04-24 20:14:53 +00:00
Christer Weinigel
73cf531975 soc: stm32f4xx: Make missing flash latency info a compile error
If the flash latency isn't set most STM32F4xx MCU's won't be able
to run from flash when the CPU frequency is changed.  Make this a
compile time error instead of an assert at runtime.

Change-Id: Ic3421194545f8f83bd6e00f0cd011306c8d1eedd
Signed-off-by: Christer Weinigel <christer@weinigel.se>
2017-04-24 20:14:13 +00:00
Kumar Gala
4f1e304f68 build: only build gen_idt on x86
Change-Id: I0401e2557c69f1e32ddedb79758c1dde781ea69b
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-04-24 03:17:16 +00:00
Andrew Boie
ca441162a7 tests: add fatal test case
We want to show that if a non-essential thread gets a fatal exception,
that thread gets aborted but the rest of the system works properly.

We also test that k_oops() does the same.

Issue: ZEP-2052
Change-Id: I0f88bcae865bf12bb91bb55e50e8ac9721672434
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-04-22 10:31:49 -04:00
Andrew Boie
75caa2b084 arm: exception-assisted kernel panic/oops support
Put the reason code in r0 and make a SVC #2 call, which will be
propagated to _fatal_error_handler as an exception.

The _is_in_isr() implementation had to be tweaked a bit.  User-generated
SVC exception no longer just used for irq_offload(); just because we are
in it does not mean we are in interrupt context.  Instead, have the
irq_offload code set and clear the offload_routine global; it will be
non-NULL only if it's in use. Upcoming changes to support memory
protection (which will require system calls) will need this too.

We free up some small amount of ROM deleting _default_esf struct as it's
no longer needed.

Issue: ZEP-843
Change-Id: Ie82bd708575934cffe41e64f5c128c8704ca4e48
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-04-22 10:31:49 -04:00
Andrew Boie
7827b7bf4a x86: exception-assisted panic/oops support
We reserve a specific vector in the IDT to trigger when we want to
enter a fatal exception state from software.

Disabled for drivers/build_all tests as we were up to the ROM limit
on Quark D2000.

Issue: ZEP-843
Change-Id: I4de7f025fba0691d07bcc3b3f0925973834496a0
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-04-22 10:31:49 -04:00
Andrew Boie
cdb94d6425 kernel: add k_panic() and k_oops() APIs
Unlike assertions, these APIs are active at all times. The kernel will
treat these errors in the same way as fatal CPU exceptions. Ultimately,
the policy of what to do with these errors is implemented in
_SysFatalErrorHandler.

If the archtecture supports it, a real CPU exception can be triggered
which will provide a complete register dump and PC value when the
problem occurs. This will provide more helpful information than a fake
exception stack frame (_default_esf) passed to the arch-specific exception
handling code.

Issue: ZEP-843
Change-Id: I8f136905c05bb84772e1c5ed53b8e920d24eb6fd
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-04-22 10:31:49 -04:00
Marti Bolivar
dc91536855 printk: add vprintk()
This is needed by application code that wants to print formatted
strings, but only has a fmt and va_list, and lacks memory to spare for
"buf" and something like:

	 vsnprintk(buf, sizeof(buf), fmt, ap);
	 printk("%s", buf);

Change-Id: Ic9cc915ec7e5f8f9492c730667f39788ecae65f6
Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
2017-04-22 14:29:33 +00:00
Marti Bolivar
4a157f3e48 printk: add missing __printf_like attributes
GCC supports __attribute__((format (printf ...))) even when the
variadic arguments are not present. In this case, the attribute
argument specifying the start of the variadic arguments should be
zero.

Use this in printk.h to add __printf_like where it's missing.

Change-Id: I7868439d5791e391aeb07356af9819524e68c771
Signed-off-by: Marti Bolivar <marti.bolivar@linaro.org>
2017-04-22 14:29:32 +00:00
Andrew Boie
3b662555d1 arm: work around QEMU issue with _IsInIsr
The ICSR RETTOBASE bit is improperly implemented in QEMU (the polarity
is flipped) and the fix for it has not yet made it into a QEMU release,
although it is present in upstream master branch.

The symptom is that if we are not in thread mode, the system always
believes were are in a nested exception state, causing _IsInIsr() to
always return true.

Skip the nested exception check if we are building for QEMU.

This is a workaround until SDK-54 is resolved.

Issue: SDK-54
Change-Id: I06eafcc85fb76a9b23b4ba85ed6e111a08516231
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-04-22 01:08:27 +00:00
Andrew Boie
e09a04f068 arm: fix exception handling
For exceptions where we are just going to abort the current thread, we
need to exit handler mode properly so that PendSV can run and perform a
context switch. For ARM architecture this means that the fatal error
handling code path can indeed return if we were 1) in handler mode and
2) only wish to abort the current thread.

Fixes a very long-standing bug where a thread that generates an
exception, and should only abort the thread, instead takes down the
entire system.

Issue: ZEP-2052
Change-Id: Ib356a34a6fda2e0f8aff39c4b3270efceb81e54d
Signed-off-by: Andrew Boie <andrew.p.boie@intel.com>
2017-04-22 01:08:07 +00:00
David B. Kinder
61de8f892b spell: Kconfig help typos: /kernel /misc /subsys
Fix misspellings in Kconfig help text

Change-Id: I6eda081c7b6f38287ace8c0a741e65df92d6817b
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-04-22 01:04:56 +00:00
David B. Kinder
93e4d7258d spell: fix Kconfig help typos: /boards /drivers
Fix misspellings in Kconfig help text

Change-Id: I3ae28a5d23d8e266612114bc0eb8a6e158129dc7
Signed-off-by: David B. Kinder <david.b.kinder@intel.com>
2017-04-21 21:31:30 +00:00
Kumar Gala
96ee45df8d kernel: refactor thread_monitor_init into common code
We do the same thing on all arch's right now for thread_monitor_init so
lets put it in a common place.  This also should fix an issue on xtensa
when thread monitor can be enabled (reference to _nanokernel.threads).

Change-Id: If2f26c1578aa1f18565a530de4880ae7bd5a0da2
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-04-21 20:34:42 +00:00
Kumar Gala
b8823c4efd kernel: Refactor common _new_thread init code
We do a bit of the same stuff on all the arch's to setup a new thread.
So lets put that code in a common place so we unify it for everyone and
reduce some duplicated code.

Change-Id: Ic04121bfd6846aece16aa7ffd4382bdcdb6136e3
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-04-21 20:34:42 +00:00
Kumar Gala
5742a508a2 kernel: cleanup use of naked unsigned in _new_thread
There are a few places that we used an naked unsigned type, lets be
explicit and make it 'unsigned int'.

Change-Id: I33fcbdec4a6a1c0b1a2defb9a5844d282d02d80e
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-04-21 20:34:41 +00:00
Kumar Gala
a48e8790d3 checkpatch: update checkpatch to warn about C99 type usage
Only in rare cases should we allow C99 types, so lets warn about it to
catch issues.

Change-Id: I2bacdd4ba98f88482e0b7acc0567ff1139e749bf
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-04-21 17:24:04 +00:00
Kumar Gala
cc334c7273 Convert remaining code to using newly introduced integer sized types
Convert code to use u{8,16,32,64}_t and s{8,16,32,64}_t instead of C99
integer types.  This handles the remaining includes and kernel, plus
touching up various points that we skipped because of include
dependancies.  We also convert the PRI printf formatters in the arch
code over to normal formatters.

Jira: ZEP-2051

Change-Id: Iecbb12601a3ee4ea936fd7ddea37788a645b08b0
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-04-21 11:38:23 -05:00
Tomasz Bursztyka
d9a1e367b2 gpio: Align pin parameter type in configure with all other functions
s/uint8_t/uint32_t

For some reason gpio_pin_configure uses a uint8_t though all other
places ask for uint32_t.

Change-Id: I50c113d71fd1d1cfba231fbc98b355b69a78dbec
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-04-21 16:34:55 +00:00
Tomasz Bursztyka
9f3bdcedf7 arch/arc/soc: If IOAPIC is not enabled, gpio_dw should still compile
Irq flags should be set to 0.

Change-Id: I7c5104c0dc89ba79789a263649422f51a556f218
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-04-21 16:34:54 +00:00
Tomasz Bursztyka
d2b5853cd9 drivers/gpio: Use ifdef relevantly in DW drivers
Change-Id: I580ca0aeccd7b2c1117fc71571dac9faa5baf8b0
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-04-21 16:34:53 +00:00
Tomasz Bursztyka
e9e78878d0 drivers/spi: Get QMSI shim driver following syntax rules
Even one liner if () should have get { ... }

Change-Id: I7f9d8d74398286e97549bed050e29d4d175e1b02
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
2017-04-21 16:34:52 +00:00
Kumar Gala
83a5990185 docs: convert to using newly introduced integer sized types
Convert code to use u{8,16,32,64}_t and s{8,16,32,64}_t instead of C99
integer types.

Jira: ZEP-2051

Change-Id: I731cc91517436685836023cbda34f894586a54bc
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-04-21 16:11:51 +00:00
Kumar Gala
ccad5bf3e3 drivers: convert to using newly introduced integer sized types
Convert code to use u{8,16,32,64}_t and s{8,16,32,64}_t instead of C99
integer types.

Jira: ZEP-2051

Change-Id: I08f51e2bfd475f6245771c1bd2df7ffc744c48c4
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-04-21 10:06:48 -05:00
Kumar Gala
e547533435 samples: convert to using newly introduced integer sized types
Convert code to use u{8,16,32,64}_t and s{8,16,32,64}_t instead of C99
integer types.

Jira: ZEP-2051

Change-Id: I08c682bfc0b80dfa88de859e90a011bcd2db2762
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-04-21 09:53:53 -05:00
Kumar Gala
eaaa175b92 tests: convert to using newly introduced integer sized types
Convert code to use u{8,16,32,64}_t and s{8,16,32,64}_t instead of C99
integer types.

Jira: ZEP-2051

Change-Id: I6c676bc6c5e850a8725785554cd535e32067f33e
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-04-21 09:53:49 -05:00
Kumar Gala
6da829690f subsys: convert to using newly introduced integer sized types
Convert code to use u{8,16,32,64}_t and s{8,16,32,64}_t instead of C99
integer types.

Jira: ZEP-2051

Change-Id: Icbf9e542b23208890a3a32358447d44cdc274ef1
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-04-21 09:36:22 -05:00
Kumar Gala
a509441210 net: convert to using newly introduced integer sized types
Convert code to use u{8,16,32,64}_t and s{8,16,32,64}_t instead of C99
integer types.

Jira: ZEP-2051

Change-Id: I4ec03eb2183d59ef86ea2c20d956e5d272656837
Signed-off-by: Kumar Gala <kumar.gala@linaro.org>
2017-04-21 09:30:38 -05:00
Jukka Rissanen
7f8d2d198b Merge net branch into master
Main changes:

- Refactoring net_nbuf usage.
- Fix null pointer access in IPv6.
- Fix compiler warnings.
- TCP ACK timer and retransmit fixes.
- Print enhancements in net-shell.
- RPL fixes.
- ZoAP fixes.

----------------------------------------------------------------
Andrei Emeltchenko (1):
      net: shell: Correct print format specifier

Jukka Rissanen (10):
      net: ipv6: Make sure not to access null pointer
      net: tcp: Avoid unused variable compiler warning
      net: pkt: Make the debug print eye friendly
      net: conn: Utility to print connection handlers
      net: Print debug info if packet is loopback back to us
      net: context: Set the local port correctly in accept
      net: tcp: Make sure ACK timer is not run if cancelled
      Bluetooth: ipsp: Fix compile error in sample app
      net: context: Connect callback was set too late
      net: shell: Fix compiler error when printing conn handlers

Mitul Shah (1):
      net: context: Fixing bug in net context put flow

Paul Sokolovsky (1):
      net: shell: conn: Dump local/remote ports for contexts.

Ravi kumar Veeramally (5):
      net: rpl: Fix rpl header update
      net: zoap: Refactor zoap utilities
      net: zoap: Fix memory overflow issue
      net: zoap: Remove unused helper function
      net: zoap: Prepare and send error response separately

Tomasz Bursztyka (7):
      net: Renaming net nbuf API to net pkt API
      net/net_pkt: Fully separate struct net_pkt from struct net_buf
      net_pkt: Removing legacy net_dir
      net_pkt: Externalize ext_bitmap handling
      net_pkt: Reordering the attributes for better alignment
      net: Rename all *_BUF() macros to *_HDR()
      net_pkt: Let's make all IPv6 related attributes prefixed with ipv6_

june li (1):
      net: tcp: Do buf ref when resending a segment

 .../networking/connectivity-example-app.c          |   22 +-
 .../networking/ip-stack-architecture.rst           |    2 +-
 doc/subsystems/networking/l2-and-drivers.rst       |   14 +-
 drivers/console/telnet_console.c                   |   54 +-
 drivers/ethernet/Kconfig.sam_gmac                  |   12 +-
 drivers/ethernet/eth_enc28j60.c                    |   40 +-
 drivers/ethernet/eth_mcux.c                        |   38 +-
 drivers/ethernet/eth_sam_gmac.c                    |  106 +-
 drivers/ethernet/eth_sam_gmac_priv.h               |    6 +-
 drivers/ieee802154/ieee802154_cc2520.c             |   60 +-
 drivers/ieee802154/ieee802154_mcr20a.c             |   46 +-
 drivers/ieee802154/ieee802154_nrf5.c               |   42 +-
 drivers/ieee802154/ieee802154_uart_pipe.c          |   36 +-
 drivers/slip/slip.c                                |   53 +-
 include/net/arp.h                                  |    6 +-
 include/net/buf.h                                  |    5 -
 include/net/ethernet.h                             |    4 +-
 include/net/ieee802154_radio.h                     |   12 +-
 include/net/mqtt.h                                 |    2 +-
 include/net/nbuf.h                                 | 1314 ----------------
 include/net/net_context.h                          |   59 +-
 include/net/net_core.h                             |   11 +-
 include/net/net_if.h                               |   25 +-
 include/net/net_l2.h                               |   10 +-
 include/net/net_offload.h                          |   34 +-
 include/net/net_pkt.h                              | 1297 ++++++++++++++++
 include/net/zoap.h                                 |  124 +-
 samples/bluetooth/ipsp/prj.conf                    |    8 +-
 samples/bluetooth/ipsp/src/main.c                  |   75 +-
 samples/net/coaps_client/prj_qemu_x86.conf         |    8 +-
 samples/net/coaps_client/src/coaps_client.c        |   37 +-
 samples/net/coaps_client/src/udp.c                 |   32 +-
 samples/net/coaps_client/src/udp.h                 |    2 +-
 samples/net/coaps_server/prj_arduino_101.conf      |    8 +-
 samples/net/coaps_server/prj_qemu_x86.conf         |    8 +-
 samples/net/coaps_server/src/coaps_server.c        |   64 +-
 samples/net/coaps_server/src/udp.c                 |   47 +-
 samples/net/coaps_server/src/udp.h                 |    2 +-
 samples/net/dhcpv4_client/prj_arduino_101.conf     |    8 +-
 samples/net/dhcpv4_client/prj_frdm_k64f.conf       |    8 +-
 samples/net/dhcpv4_client/prj_qemu_x86.conf        |    8 +-
 samples/net/dhcpv4_client/src/main.c               |    1 -
 samples/net/dns_resolve/prj_qemu_x86.conf          |   10 +-
 samples/net/echo_client/prj_arduino_101.conf       |    8 +-
 .../net/echo_client/prj_arduino_101_cc2520.conf    |   10 +-
 samples/net/echo_client/prj_bt.conf                |    8 +-
 samples/net/echo_client/prj_cc2520.conf            |   10 +-
 samples/net/echo_client/prj_frdm_k64f.conf         |    8 +-
 samples/net/echo_client/prj_frdm_k64f_cc2520.conf  |   10 +-
 samples/net/echo_client/prj_frdm_k64f_mcr20a.conf  |   10 +-
 samples/net/echo_client/prj_nrf5.conf              |   10 +-
 samples/net/echo_client/prj_qemu_802154.conf       |   10 +-
 samples/net/echo_client/prj_qemu_cortex_m3.conf    |    8 +-
 samples/net/echo_client/prj_qemu_x86.conf          |    8 +-
 samples/net/echo_client/prj_sam_e70_xplained.conf  |    8 +-
 samples/net/echo_client/src/echo-client.c          |  131 +-
 samples/net/echo_server/prj_arduino_101.conf       |    8 +-
 .../net/echo_server/prj_arduino_101_cc2520.conf    |   10 +-
 samples/net/echo_server/prj_bt.conf                |    8 +-
 samples/net/echo_server/prj_cc2520.conf            |   10 +-
 samples/net/echo_server/prj_frdm_k64f.conf         |    8 +-
 samples/net/echo_server/prj_frdm_k64f_cc2520.conf  |   10 +-
 samples/net/echo_server/prj_frdm_k64f_mcr20a.conf  |   10 +-
 samples/net/echo_server/prj_nrf5.conf              |   10 +-
 samples/net/echo_server/prj_qemu_802154.conf       |   10 +-
 samples/net/echo_server/prj_qemu_cortex_m3.conf    |    8 +-
 samples/net/echo_server/prj_qemu_x86.conf          |    8 +-
 samples/net/echo_server/prj_sam_e70_xplained.conf  |    8 +-
 samples/net/echo_server/src/echo-server.c          |  111 +-
 samples/net/http_client/prj_frdm_k64f.conf         |   10 +-
 samples/net/http_client/prj_qemu_x86.conf          |    8 +-
 samples/net/http_client/src/config.h               |    6 +-
 samples/net/http_client/src/http_client.c          |    1 -
 samples/net/http_client/src/http_client_rcv.c      |   34 +-
 samples/net/http_client/src/http_client_rcv.h      |    2 +-
 samples/net/http_client/src/tcp_client.c           |   10 +-
 samples/net/http_client/src/tcp_client.h           |    2 +-
 samples/net/http_server/README.rst                 |    2 +-
 samples/net/http_server/prj_arduino_101.conf       |    8 +-
 samples/net/http_server/prj_bt.conf                |    8 +-
 samples/net/http_server/prj_frdm_k64f.conf         |    8 +-
 samples/net/http_server/prj_qemu_x86.conf          |    8 +-
 samples/net/http_server/src/http_server.c          |   14 +-
 samples/net/http_server/src/http_server.h          |    4 +-
 samples/net/http_server/src/http_write_utils.c     |    1 -
 samples/net/http_server/src/ssl_utils.c            |   30 +-
 samples/net/http_server/src/ssl_utils.h            |    2 +-
 samples/net/ieee802154/hw/prj_cc2520_1.conf        |   10 +-
 samples/net/ieee802154/hw/prj_cc2520_2.conf        |   10 +-
 samples/net/ieee802154/hw/prj_mcr20a.conf          |   10 +-
 samples/net/ieee802154/hw/prj_nrf5.conf            |   10 +-
 samples/net/ieee802154/qemu/prj.conf               |   10 +-
 samples/net/ieee802154/qemu/prj_client.conf        |   10 +-
 samples/net/ieee802154/qemu/prj_server.conf        |   10 +-
 samples/net/irc_bot/prj_frdm_k64f.conf             |    8 +-
 samples/net/irc_bot/prj_qemu_x86.conf              |    8 +-
 samples/net/irc_bot/src/irc-bot.c                  |   28 +-
 samples/net/leds_demo/src/leds-demo.c              |   86 +-
 .../net/mbedtls_dtlsclient/prj_arduino_101.conf    |    8 +-
 samples/net/mbedtls_dtlsclient/src/udp.c           |   38 +-
 samples/net/mbedtls_dtlsclient/src/udp.h           |    2 +-
 samples/net/mbedtls_dtlsserver/src/udp.c           |   32 +-
 samples/net/mbedtls_dtlsserver/src/udp.h           |    2 +-
 samples/net/mbedtls_sslclient/prj_arduino_101.conf |    8 +-
 samples/net/mbedtls_sslclient/src/tcp.c            |   36 +-
 samples/net/mbedtls_sslclient/src/tcp.h            |    4 +-
 samples/net/mqtt_publisher/prj_96b_nitrogen.conf   |   10 +-
 samples/net/mqtt_publisher/prj_frdm_k64f.conf      |   12 +-
 samples/net/mqtt_publisher/prj_qemu_x86.conf       |   10 +-
 samples/net/mqtt_publisher/src/main.c              |    1 -
 samples/net/nats/prj_qemu_x86.conf                 |    5 +-
 samples/net/nats/src/main.c                        |    1 -
 samples/net/nats/src/nats.c                        |   36 +-
 samples/net/telnet/prj_frdm_k64f.conf              |    8 +-
 samples/net/telnet/prj_qemu_x86.conf               |    8 +-
 samples/net/telnet/prj_qemu_x86_iamcu.conf         |    8 +-
 samples/net/wpan_serial/prj.conf                   |    6 +-
 samples/net/wpan_serial/src/main.c                 |   77 +-
 samples/net/wpanusb/prj.conf                       |    4 +-
 samples/net/wpanusb/src/wpanusb.c                  |   52 +-
 samples/net/zoap_client/src/zoap-client.c          |   37 +-
 samples/net/zoap_server/src/zoap-server.c          |  188 +--
 samples/net/zperf/prj_bt.conf                      |   10 +-
 samples/net/zperf/prj_frdm_k64f.conf               |   10 +-
 samples/net/zperf/prj_frdm_k64f_prof.conf          |   10 +-
 samples/net/zperf/prj_qemu_x86.conf                |   10 +-
 samples/net/zperf/prj_quark_se_c1000_devboard.conf |    8 +-
 samples/net/zperf/src/zperf_session.c              |   28 +-
 samples/net/zperf/src/zperf_session.h              |    2 +-
 samples/net/zperf/src/zperf_tcp_receiver.c         |   16 +-
 samples/net/zperf/src/zperf_tcp_uploader.c         |   27 +-
 samples/net/zperf/src/zperf_udp_receiver.c         |  109 +-
 samples/net/zperf/src/zperf_udp_uploader.c         |  104 +-
 subsys/net/Makefile                                |    2 +-
 subsys/net/ip/6lo.c                                |  196 ++-
 subsys/net/ip/6lo.h                                |   12 +-
 subsys/net/ip/6lo_private.h                        |    4 +-
 subsys/net/ip/Kconfig                              |   34 +-
 subsys/net/ip/Kconfig.debug                        |   16 +-
 subsys/net/ip/Makefile                             |    2 +-
 subsys/net/ip/connection.c                         |  113 +-
 subsys/net/ip/connection.h                         |   29 +-
 subsys/net/ip/dhcpv4.c                             |  173 ++-
 subsys/net/ip/icmpv4.c                             |  176 +--
 subsys/net/ip/icmpv4.h                             |   16 +-
 subsys/net/ip/icmpv6.c                             |  255 +--
 subsys/net/ip/icmpv6.h                             |   32 +-
 subsys/net/ip/ipv4.c                               |   92 +-
 subsys/net/ip/ipv4.h                               |   28 +-
 subsys/net/ip/ipv6.c                               | 1271 +++++++--------
 subsys/net/ip/ipv6.h                               |   71 +-
 subsys/net/ip/l2/arp.c                             |  197 +--
 subsys/net/ip/l2/bluetooth.c                       |   50 +-
 subsys/net/ip/l2/dummy.c                           |   20 +-
 subsys/net/ip/l2/ethernet.c                        |  146 +-
 subsys/net/ip/l2/ieee802154/ieee802154.c           |  117 +-
 subsys/net/ip/l2/ieee802154/ieee802154_fragment.c  |  150 +-
 subsys/net/ip/l2/ieee802154/ieee802154_fragment.h  |   10 +-
 subsys/net/ip/l2/ieee802154/ieee802154_frame.c     |   43 +-
 subsys/net/ip/l2/ieee802154/ieee802154_frame.h     |   16 +-
 subsys/net/ip/l2/ieee802154/ieee802154_mgmt.c      |   42 +-
 .../net/ip/l2/ieee802154/ieee802154_radio_aloha.c  |   16 +-
 .../ip/l2/ieee802154/ieee802154_radio_csma_ca.c    |   16 +-
 .../net/ip/l2/ieee802154/ieee802154_radio_utils.h  |   20 +-
 subsys/net/ip/nbuf.c                               | 1611 -------------------
 subsys/net/ip/net_context.c                        |  358 +++--
 subsys/net/ip/net_core.c                           |  127 +-
 subsys/net/ip/net_if.c                             |   58 +-
 subsys/net/ip/net_pkt.c                            | 1627 ++++++++++++++++++++
 subsys/net/ip/net_private.h                        |   42 +-
 subsys/net/ip/net_shell.c                          |  258 +++-
 subsys/net/ip/route.c                              |   24 +-
 subsys/net/ip/route.h                              |    4 +-
 subsys/net/ip/rpl-mrhof.c                          |    1 -
 subsys/net/ip/rpl-of0.c                            |    1 -
 subsys/net/ip/rpl.c                                |  688 ++++-----
 subsys/net/ip/rpl.h                                |   16 +-
 subsys/net/ip/tcp.c                                |  223 +--
 subsys/net/ip/tcp.h                                |   31 +-
 subsys/net/ip/udp.h                                |   42 +-
 subsys/net/ip/utils.c                              |   41 +-
 subsys/net/lib/dns/resolve.c                       |   32 +-
 subsys/net/lib/http/http_client.c                  |   54 +-
 subsys/net/lib/http/http_server.c                  |   23 +-
 subsys/net/lib/mqtt/mqtt.c                         |  118 +-
 subsys/net/lib/zoap/zoap.c                         |  280 ++--
 subsys/net/lib/zoap/zoap_link_format.c             |  105 +-
 tests/net/6lo/prj.conf                             |   13 +-
 tests/net/6lo/src/main.c                           |   83 +-
 tests/net/arp/prj.conf                             |   10 +-
 tests/net/arp/src/main.c                           |  232 +--
 tests/net/context/prj.conf                         |   10 +-
 tests/net/context/src/main.c                       |  116 +-
 tests/net/dhcpv4/prj.conf                          |    8 +-
 tests/net/dhcpv4/src/main.c                        |  134 +-
 tests/net/icmpv6/prj.conf                          |    8 +-
 tests/net/icmpv6/src/main.c                        |   41 +-
 tests/net/ieee802154/crypto/prj.conf               |    7 +-
 tests/net/ieee802154/fragment/prj.conf             |   10 +-
 tests/net/ieee802154/fragment/src/main.c           |   86 +-
 tests/net/ieee802154/l2/prj.conf                   |    8 +-
 .../net/ieee802154/l2/src/ieee802154_fake_driver.c |   24 +-
 tests/net/ieee802154/l2/src/ieee802154_test.c      |   47 +-
 tests/net/iface/prj.conf                           |    8 +-
 tests/net/iface/src/main.c                         |   22 +-
 tests/net/ip-addr/prj.conf                         |    8 +-
 tests/net/ip-addr/src/main.c                       |    6 +-
 tests/net/ipv6/prj.conf                            |   10 +-
 tests/net/ipv6/src/main.c                          |  119 +-
 tests/net/lib/dns_resolve/src/main.c               |   10 +-
 .../net/lib/mqtt_publisher/src/test_mqtt_publish.c |    2 +-
 .../lib/mqtt_subscriber/src/test_mqtt_subscribe.c  |    2 +-
 tests/net/lib/zoap/prj.conf                        |    4 +-
 tests/net/lib/zoap/src/main.c                      |  318 ++--
 tests/net/mgmt/prj.conf                            |    8 +-
 tests/net/mgmt/src/mgmt.c                          |    6 +-
 tests/net/mld/prj.conf                             |    6 +-
 tests/net/mld/src/main.c                           |   66 +-
 tests/net/neighbor/prj.conf                        |   10 +-
 tests/net/neighbor/src/main.c                      |    1 -
 tests/net/{nbuf => net_pkt}/Makefile               |    0
 tests/net/{nbuf => net_pkt}/prj.conf               |   17 +-
 tests/net/{nbuf => net_pkt}/src/Makefile           |    0
 tests/net/{nbuf => net_pkt}/src/main.c             |  663 ++++----
 tests/net/{nbuf => net_pkt}/testcase.ini           |    0
 tests/net/route/prj.conf                           |    8 +-
 tests/net/route/src/main.c                         |   61 +-
 tests/net/rpl/prj.conf                             |   10 +-
 tests/net/rpl/src/main.c                           |   49 +-
 tests/net/tcp/prj.conf                             |   10 +-
 tests/net/tcp/src/main.c                           |  314 ++--
 tests/net/trickle/prj.conf                         |    8 +-
 tests/net/udp/prj.conf                             |   10 +-
 tests/net/udp/src/main.c                           |  106 +-
 tests/net/utils/prj.conf                           |    8 +-
 tests/net/utils/src/main.c                         |  139 +-
 236 files changed, 8793 insertions(+), 8685 deletions(-)
 delete mode 100644 include/net/nbuf.h
 create mode 100644 include/net/net_pkt.h
 delete mode 100644 subsys/net/ip/nbuf.c
 create mode 100644 subsys/net/ip/net_pkt.c
 rename tests/net/{nbuf => net_pkt}/Makefile (100%)
 rename tests/net/{nbuf => net_pkt}/prj.conf (53%)
 rename tests/net/{nbuf => net_pkt}/src/Makefile (100%)
 rename tests/net/{nbuf => net_pkt}/src/main.c (61%)
 rename tests/net/{nbuf => net_pkt}/testcase.ini (100%)

Change-Id: I7ce3d65b6e92d12a2f6536cd41ce1281bcdf9a7a
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-04-21 16:29:38 +03:00
Jukka Rissanen
af1e3b9d32 net: shell: Fix compiler error when printing conn handlers
There was compiler error if CONFIG_NET_DEBUG_CONN was set.

Change-Id: Ibb6721c55dd2c56cd0097359a53563c6221859ea
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
2017-04-21 15:44:22 +03:00