Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
b2d3d47
net: if: vlan: Add virtual lan support
jukkar Jan 19, 2018
7bef774
tests: net: vlan: Add VLAN tests
jukkar Feb 2, 2018
b058aa7
net: shell: Add VLAN support
jukkar Jan 17, 2018
91b32d0
samples: net: vlan: Simple app for setting virtual lan settings
jukkar Jan 16, 2018
f22b1fb
drivers: eth: mcux: Enabling VLAN
jukkar Jan 16, 2018
e89e9ad
drivers: eth: native_posix: Add VLAN support
jukkar Mar 3, 2018
76932e9
drivers: eth: gmac: Adding VLAN support to Atmel E70 board
jukkar Mar 21, 2018
eacd2df
net: slip: Add multiple VLAN interface support
jukkar Mar 3, 2018
9be7c58
net: l2: ethernet: Add priority to sent ethernet VLAN header
jukkar Feb 7, 2018
6f80788
net: Add function to convert VLAN priority to packet priority
jukkar Mar 8, 2018
4e03ec0
drivers: net: mcux: Use VLAN priority to set RX packet priority
jukkar Mar 8, 2018
b060823
net: if: Use DEVICE_NAME_GET() instead of fixed string
jukkar Jan 30, 2018
ab4d61e
net: if: Add helper to select src interface for a IPv4 dst addr
jukkar Jan 31, 2018
971b1fc
net: shell: Use correct network interface for IPv4 ping
jukkar Jan 31, 2018
8856f09
net: app: Select local IP address properly if multiple interfaces
jukkar Feb 8, 2018
d982e64
net: l2: Remove l2_data section start and end pointers
jukkar Mar 2, 2018
573e2c8
syslog: net: Fix multiple network interface selection for IPv4
jukkar Mar 16, 2018
d44f092
net: shell: Add network interface up/down command
jukkar Mar 16, 2018
4f04b7e
net: core: Check interface when receiving a packet
jukkar Mar 21, 2018
9fd29f8
net: stats: Make statistics collection per network interface
jukkar Mar 27, 2018
6b95a81
net: stats: Fix the net_mgmt statistics collection
jukkar Mar 27, 2018
1d265cc
sample: net: stats: Example how to use net_mgmt for statistics
jukkar Mar 27, 2018
e58530d
net: stats: Add infrastructure for collecting ethernet stats
jukkar Mar 28, 2018
762545a
drivers: eth: native_posix: Add ethernet statistics support
jukkar Mar 28, 2018
8126dd2
samples: net: stats: Print ethernet statistics
jukkar Mar 28, 2018
2a9be79
net: if: Add TX timestamp callback support
jukkar Jan 24, 2018
0d35acf
net: gptp: Clock driver definition
jukkar Jan 24, 2018
5061047
net: gptp: Initial core IEEE 802.1AS support
jukkar Jan 24, 2018
b8ed5b0
ext: hal: nxp: mcux: Fix ethernet timestamping driver
jchevrier Apr 13, 2017
b2fe6c9
ext: hal: nxp: mcux: Enable enhanced buffer desc mode if needed
jukkar Jan 25, 2018
19b78c7
ext: hal: nxp: mcux: Fix PTP event packet type check
jukkar Feb 12, 2018
7b06ec7
drivers: eth: mcux: Enable gPTP support
jukkar Jan 25, 2018
59b3c16
samples: net: gptp: Sample application for gPTP support
jukkar Jan 24, 2018
4d27f9f
tests: net: timestamp: Add unit test for network pkt timestamping
jukkar Mar 7, 2018
d6971b4
net: shell: Add gPTP command
jukkar Jan 29, 2018
f3643e5
doc: net: Add information about gPTP
jukkar Jan 25, 2018
452d00d
net: gptp: Allow gPTP to run over VLAN
jukkar Feb 26, 2018
6df76e0
drivers: eth: mcux: Allow gPTP over VLAN
jukkar Feb 26, 2018
cb2f4ea
samples: net: gptp: Allow running gPTP over VLAN
jukkar Feb 26, 2018
26b11f2
net: gptp: Set priority of the sent gPTP packets
jukkar Mar 6, 2018
3bbf067
drivers: eth: mcux: Prioritize received PTP packets to high
jukkar Mar 8, 2018
317d551
net: Add statistics about time spent in TX and RX path
jukkar Mar 8, 2018
1225b9e
net: ethernet: Show interface for dropped RX packet
jukkar Mar 3, 2018
7eee992
net: gptp: Initial support for native-posix board
jukkar Mar 12, 2018
4b1cbb8
tests: net: Application for automatic network testing
jukkar Mar 3, 2018
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions doc/api/networking.rst
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,12 @@ Hostname Configuration Library
.. doxygengroup:: net_hostname
:project: Zephyr

generic Precision Time Protocol (gPTP)
**************************************

.. doxygengroup:: gptp
:project: Zephyr

Network technologies
********************

Expand Down
55 changes: 55 additions & 0 deletions doc/subsystems/networking/gptp_release_notes.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
gPTP stack for Zephyr
#####################

Overview
********

This gPTP stack supports the protocol and procedures as defined in
the IEEE 802.1AS-2011 standard (Timing and Syncronization for
Time-Sensitive Applications in Bridged Local Area Networks).

Supported features
*******************

The stack handles communications and state machines defined in the standard
IEEE802.1AS-2011. Mandatory requirements, for a full-duplex point-to-point link
endpoint, as defined in Annex A of the standard are supported.

The stack is in principle capable of handling communications on multiple network
interfaces (also defined as "ports" in the standard) and thus act as
a 802.1AS bridge. However, this mode of operation has not been validated.

Supported hardware
******************

Although the stack itself is hardware independent, ethernet frame timestamping
support must be enabled in ethernet drivers.

Boards supported:

- NXP FRDM-K64F
- QEMU (emulated, limited capabilities due to lack of hardware clock)

Enabling the stack
******************

In menuconfig, the following configuration must me enabled:

- CONFIG_NET_GPTP (Networking -> Link layer and IP networking support -> IP stack -> Link layer options -> Enable IEEE802.1AS support)

Application interfaces
**********************

Only two Application Interfaces as defined in section 9 of the standard
are available:

- ClockTargetPhaseDiscontinuity interface (gptp_event_capture)
- ClockTargetEventCapture interface (gptp_register_phase_dis_cb)

Function prototypes can be found in "include/net/gptp.h".

Testing
*******

The stack has been informally tested using the OpenAVB gPTP and
Linux ptp4l daemons.
1 change: 1 addition & 0 deletions drivers/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,4 @@ add_subdirectory_ifdef(CONFIG_NETWORKING net)
add_subdirectory_ifdef(CONFIG_NET_L2_ETHERNET ethernet)
add_subdirectory_ifdef(CONFIG_ENTROPY_GENERATOR entropy)
add_subdirectory_ifdef(CONFIG_SYS_CLOCK_EXISTS timer)
add_subdirectory_ifdef(CONFIG_NET_GPTP ptp_clock)
2 changes: 2 additions & 0 deletions drivers/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -73,4 +73,6 @@ source "drivers/display/Kconfig"

source "drivers/led_strip/Kconfig"

source "drivers/ptp_clock/Kconfig"

endmenu
2 changes: 2 additions & 0 deletions drivers/ethernet/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
zephyr_library_include_directories(${ZEPHYR_BASE}/subsys/net/ip/l2)

zephyr_sources_ifdef(CONFIG_ETH_SAM_GMAC
eth_sam_gmac.c
phy_sam_gmac.c
Expand Down
35 changes: 35 additions & 0 deletions drivers/ethernet/Kconfig.mcux
Original file line number Diff line number Diff line change
Expand Up @@ -100,4 +100,39 @@ config ETH_MCUX_0_MAC5
help
This is the byte 5 of the MAC address.
endif

config PTP_CLOCK_MCUX
bool "MCUX PTP clock driver support"
default n
default y if NET_GPTP
select PTP_CLOCK
depends on NET_GPTP
help
Enable MCUX PTP clock support.

if PTP_CLOCK_MCUX

config ETH_MCUX_PTP_RX_BUFFERS
int "Size of the RX timestamp ring buffer"
default 10
help
Set the number of RX buffers provided to the MCUX driver
to store timestamps.

config ETH_MCUX_PTP_TX_BUFFERS
int "Size of the TX timestamp ring buffer"
default 10
help
Set the number of TX buffers provided to the MCUX driver
to store timestamps.

config ETH_MCUX_PTP_CLOCK_SRC_HZ
int "Frequency of the clock source for the PTP timer"
default 50000000
help
Set the frequency in Hz sourced to the PTP timer.
If the value is set properly, the timer will be accurate.

endif # PTP_CLOCK_MCUX

endif
8 changes: 8 additions & 0 deletions drivers/ethernet/Kconfig.native_posix
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,14 @@ config ETH_NATIVE_POSIX_DEV_NAME
help
This option sets the TUN/TAP device name in your host system.

config ETH_NATIVE_POSIX_PTP_CLOCK
bool "PTP clock driver support"
default n
select PTP_CLOCK
depends on NET_GPTP
help
Enable PTP clock support.

config ETH_NATIVE_POSIX_RANDOM_MAC
bool "Random MAC address"
depends on ENTROPY_GENERATOR
Expand Down
3 changes: 3 additions & 0 deletions drivers/ethernet/eth_dw.c
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@
#include <misc/__assert.h>
#include <net/net_core.h>
#include <net/net_pkt.h>
#include <net/ethernet.h>
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
Expand Down Expand Up @@ -327,6 +328,8 @@ static void eth_initialize(struct net_if *iface)
if (r < 0) {
SYS_LOG_ERR("Could not initialize ethernet device: %d", r);
}

ethernet_init(iface);
}

/* Bindings to the plaform */
Expand Down
2 changes: 2 additions & 0 deletions drivers/ethernet/eth_enc28j60.c
Original file line number Diff line number Diff line change
Expand Up @@ -703,6 +703,8 @@ static void eth_enc28j60_iface_init_0(struct net_if *iface)
net_if_set_link_addr(iface, mac_address_0, sizeof(mac_address_0),
NET_LINK_ETHERNET);
context->iface = iface;

ethernet_init(iface);
}

static const struct ethernet_api api_funcs_0 = {
Expand Down
Loading