Added a linker script that shall be common to most riscv SOCs.
Linker script also accounts for execution in place in ROM, when
CONFIG_XIP is set.
Nonetheless, riscv32 SOCs (like pulpino) requiring a different
system layout can still define their own linker script.
Change-Id: I3ad670446d439772c29a8204e307ac79643dc650
Signed-off-by: Jean-Paul Etienne <fractalclone@gmail.com>
riscv defines the machine-mode timer registers that are implemented
by the all riscv SOCs that follow the riscv privileged architecture
specification.
The timer registers implemented in riscv-qemu follow this specification.
To account for future riscv SOCs, reimplement the riscv_qemu_driver by
the riscv_machine_driver.
Change-Id: I645b03c91b4e07d0f2609908decc27ba9b8240d4
Signed-off-by: Jean-Paul Etienne <fractalclone@gmail.com>
Update the network applications section now that the http_server
and mqtt_publisher sample apps were merged.
Change-Id: I65dd568b7f92a1f7c89f7aa4f876f53a32ecb878
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
The timeout given to APIs is in milliseconds and not ticks.
Change-Id: Iae198ca3aee326c19d0894a22f6e5cfca19ba131
Signed-off-by: Johan Hedberg <johan.hedberg@intel.com>
Doing it only in net_context, prevented to do it once NS succesfully
finished. This generated an error in 15.4, where pending data had wrong
ll reserve size.
Change-Id: I0f917fb76171457e5dff2c29e44edb8f00662150
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Use a static buffer for sending UDP payload instead of reading
values from memory.
Change-Id: I037db5cd9b8784966d481c36e8cbe92d19760475
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Compiler was giving "Unused variables" warnings if IPv6 was
enabled and IPv4 was not, and vice versa.
Change-Id: I3b17534bb8bdef207512ea5b618e138edb420871
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The IP address and port number were incorrectly parsed if
user used udp.upload command.
Change-Id: Ib37d481012af5e186a1e342c92d10ddef9fe35b1
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The IP address family was not set correctly when setting up
the connection. This lead to connectivity error in udp.upload
command.
Change-Id: I598ff2675f97e10e2033763a497f7583c94f3840
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
We must use the nexthop instead of destination address
when sending the packet. The current code mixed destination
and nexthop addresses and ignored the nexthop when sending
neighbor solicitation message.
Change-Id: I53887c16ef6fcf8365f1f47ab5792cb208dd273e
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Add the HTTP server sample application on top of the
HTTP Parser Library.
This sample application is based on TCP and HTTP chunk
transfer code found at:
https://gerrit.zephyrproject.org/r/#/c/9977/
A README file with sample output and a detailed
description of this application is also provided.
Jira: ZEP-820
Jira: ZEP-1542
Jira: ZEP-1556
Change-Id: I649104a256190577000bbac118136d5bc21f83bf
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
Keep track of amount of bytes that are sent or received from
all network interfaces.
Change-Id: I706481aab1a7e0cf2bc78d032f2ef4ebbabe3184
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
Current behaviour has an issue when UDP context is created with local
port number 0, net_conn_input() happens to treat zero port as
a wildcard ("receive packets for all ports"). net_context_bind()
for a UDP context doesn't affect its existing connection in any way.
Proposed solution is, context should be created with a random free
port assigned and bind() updates connection information from context.
Jira: ZEP-1644
Change-Id: Idb3592b58c831d986763312077b0dcdd95850bc9
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
The port numbers in the range from 0 to 1023 are the well-known ports
or system ports. Do not allocate them for users.
Change-Id: I4d7b4e1314759e4d8b260669946b9880282642c0
Signed-off-by: Ravi kumar Veeramally <ravikumar.veeramally@linux.intel.com>
Commit-ID 83ed3a29be changed the way
fragments are managed after being sent, and this brought a bug in the
active scan logic. Up to active scan to keep the buffer referenced
relevantly now, which is simpler than it used to be.
Reported-by: Johann Fischer <j.fischer@phytec.de>
Change-Id: I23db4bab878328b1ca3cb313e737de819177c281
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
This enables these samples to interoperate with Linux 6LoWPAN over
Bluetooth implementation while that is being fixed, in the long term
we might remove it from the samples once Linux is fixed.
Jira: ZEP-1656
Change-Id: I8ca9fe5a27f43cebc75b6fe5a436a5e8fcee26d5
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This adds a NET_L2_BLUETOOTH_ZEP1656 which sets NET_IF_POINTOPOINT to
avoid using nbr cache with Linux peers as they send wrong link
addresses.
Jira: ZEP-1656
Change-Id: I842f4cbb99ae9d9c004494739c07189c191929fe
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
This flag can be used by driver to indicate pointopoint links which should
not require destination link address to be resolved.
Jira: ZEP-1656
Change-Id: I58dd3bf48485d6203e75373497e00668317b9825
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
The DNS client sample application was updated to use IP addresses
from the prj_*.conf files. This patch updates the README file to
reflect those changes.
Change-Id: Ic72510be8da208aef19fb188560221e1c2386457
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
Fix references to Qemu section and references to boards.
Change-Id: Ib2174ff698d57d3272073eecc71209e047961aaa
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
Copy the documentation from the Wiki over here, the cross linking
between online documentation and Wiki and duplication of information was
inconsistent and confusing. Put everything in one place.
Change-Id: Ia3aaec1b431477e2ec54dbec2ccaa655870b0ee3
Signed-off-by: Anas Nashif <anas.nashif@intel.com>
The net_nbuf_get*() functions were calling net_buf_alloc()
with K_FOREVER. This can cause issue if called from isr
context. The fix is to check if we are in isr and then try
to alloc net_buf with K_NO_WAIT.
Change-Id: I809170f2cd059480d436763e19a35386d9bdf048
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
It doesn't really make sense for GET requests to have payloads, we
shouldn't even be checking if they have any payloads.
Change-Id: I4bb8cccd6c733a5825c2ca5067a990937c7045a6
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
The returning 'len' was always informing the remaining available space
in that net_buf fragment. This not the expected behaviour for
incoming packets, in this case, we really want the size for the
payload already present in the packet.
When this function is called with a packet without a payload, with
will return the available space in the packet, when the payload is
already set, it will return the size of that payload.
Change-Id: Ia4643b8c2a015ad2316bed037e457b186e420b19
Signed-off-by: Vinicius Costa Gomes <vinicius.gomes@intel.com>
Channel, PAN-ID, short and extended address
Change-Id: Icdf94dff6f59cd155a072a609290197b37bd084c
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Channel, pan-id, short and extended addresses.
Change-Id: Ib63dadac37d649df3efc8fdd67f5312d3a7c8e20
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
Fix setting short address through net mgmt API. It's not about
coordinator's short address, but local one.
Change-Id: I320143e40d336a1085bf12b17a88a2c35da83504
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
ORFD or RFD does not matter: the extended address should be set
according to device's MAC address.
Change-Id: I39d09c3a953283eeaa30b908ea159638604bd72b
Signed-off-by: Tomasz Bursztyka <tomasz.bursztyka@linux.intel.com>
- Reorganize some CONF variables and add the CONFIG_NET_SAMPLES_xxx
variables to the DNS sample application.
- Remove all the numeric IP addresses
- Use the CONFIG_NET_SAMPLES_xxx variables to define the IP addresses
Change-Id: Ib294d338f163f03ea1b47143b489d916578c532d
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
- Move the MAX_ADDRESSES macro to config.h.
Document the meaning and usage of this macro
- Delete unused defines
Change-Id: I035feb605611e564db15cba77d6a3dce8409ca18
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
Add the FRDM_K64F board to the DNS sample app testcase.ini
Change-Id: Iea8f7d09ed0d793711a5807f4bb67ed35ebf52c1
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
Delete redundant line and let the common exit point to release
the buffers.
Change-Id: I97e0ef79803083fabd841fb3d38d67c04ff31f7b
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
This commit adds the MQTT Publisher sample application for Zephyr.
The following MQTT API routines are exercised in this sample:
- mqtt_init
- mqtt_tx_connect
- mqtt_tx_pingreq
- mqtt_tx_publish
- mqtt_tx_disconnect
The following MQTT API data structures are used in this application:
- struct mqtt_ctx
- struct mqtt_connect_msg
- struct mqtt_publish_msg
This sample application exemplifies how to send MQTT PUBLISH messages
with different QoS values.
A README file is also included in this patch.
Change-Id: I2b41b276d5178a2cd1b07b031c38bff481885fff
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
Don't try to process null or zero-length buffers generated by
the IP stack. Zero-length buffers are valid at the TCP layer but
contain no information for applications.
Change-Id: If66d301527f56ca8e8761789b7fd6931fc37b8e0
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
Add the malformed callback that will be executed when a message
is received and it does not follow the MQTT v3.1.1 spec.
There is another case when this callback may be executed: when
the IP stack reception buffer's size is not enough to hold an
MQTT message.
The publisher and subscriber parser routines are updated to make
use of this callback. Inline documentation is also updated.
Change-Id: Id1d34336c4322673ca85f2db0b8d432db3c9afa8
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
1) Remove some variables pointing to user-provided data.
2) Pass the context structure instead of those variables.
3) Homogenize the use of "ctx" for all the callbacks receiving the
struct mqtt_ctx * pointer.
Now users must use the CONTAINER_OF macro to access data required
by the MQTT callbacks.
Change-Id: I871c0bd8601a67b39187683215579f9ed0087cf9
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
Although the buffer size validation works as it is inside the
mqtt_linearize_buffer routine, let's move it before getting a
data buffer from the buffer poll.
Change-Id: Id80af8a1e188929769463b04deaef3956b63cd00
Signed-off-by: Flavio Santes <flavio.santes@intel.com>
This makes sure ll addresses are properly set before sending reducing the
duplicated code on L2 drivers.
Change-Id: I5330c1d00a344e77555c6f31033ae42af20214bf
Signed-off-by: Luiz Augusto von Dentz <luiz.von.dentz@intel.com>
Fix comparisons in net_if_get_by_index and net_if_get_by_iface:
__net_if_end is not a pointer to a net_if structure.
Change-Id: Ie8e3a457c3f0fa97c080b38b5b7d2b420c50252b
Signed-off-by: Julien Chevrier <julien.chevrier@intel.com>
If we send unicast NS, then the destination IPv6 address needs
to be in the neighbor cache, otherwise we have a NS sending loop.
Change-Id: I11e8f5d5740248024a0becc77055786cd2e32199
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
The compact function was never really properly tested
but it is used by other routines that have unit tests.
This commit makes sure there is a special testing for
the buffer compact function.
Change-Id: I35c108fd8459a9482ccae68a51ffa28fb2e0ae99
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
There is dead code that is never executed so removing it.
Coverity-CID: 157585
Change-Id: I6926289b5735b78fcb99ad493d1b05198b9e36cc
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>
This document describes the changes in Zephyr 1.7 networking
stack compared to Zephyr 1.6. This document is a high level
description of the changes between these two major Zephyr releases.
For individual changes, the application developer can find more
details in the network header file documentation in include/net/*.
Change-Id: I281d670bee0c08e07c28fc423157ddb3f2bec8f1
Signed-off-by: Jukka Rissanen <jukka.rissanen@linux.intel.com>