Skip to content

Conversation

@jukkar
Copy link
Member

@jukkar jukkar commented Jun 28, 2018

Allow gPTP code to be run as a linux process and communicate
with gPTP daemon running in linux host.

Signed-off-by: Jukka Rissanen [email protected]

@codecov-io
Copy link

codecov-io commented Jun 28, 2018

Codecov Report

Merging #8620 into master will decrease coverage by 2.18%.
The diff coverage is 0%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #8620      +/-   ##
==========================================
- Coverage    54.4%   52.22%   -2.19%     
==========================================
  Files         444      195     -249     
  Lines       42233    24673   -17560     
  Branches     7996     5124    -2872     
==========================================
- Hits        22978    12886   -10092     
+ Misses      16048     9721    -6327     
+ Partials     3207     2066    -1141
Impacted Files Coverage Δ
drivers/ethernet/eth_native_posix_adapt.c 24.39% <ø> (ø)
drivers/ethernet/eth_native_posix.c 22.1% <0%> (ø)
include/entropy.h 33.33% <0%> (-41.67%) ⬇️
subsys/net/ip/net_stats.h 65.83% <0%> (-34.17%) ⬇️
kernel/stack.c 67.3% <0%> (-25.2%) ⬇️
kernel/init.c 57.35% <0%> (-23.35%) ⬇️
kernel/msg_q.c 77.77% <0%> (-15.47%) ⬇️
include/misc/slist.h 86.66% <0%> (-13.34%) ⬇️
drivers/net/loopback.c 72% <0%> (-12%) ⬇️
kernel/mempool.c 82.05% <0%> (-10.98%) ⬇️
... and 437 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ad15056...8c26e40. Read the comment docs.

Copy link
Member

@aescolar aescolar Jun 28, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would not be too difficult to provide you a version of the host device time which could be offset. If you want tell, and I can add you a couple of functions in the timer driver. Same about the 2 functions below

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Setting the host device time is probably not needed here, at least for now. The reason being that the native_posix target is typically used when testing things and it might not be ok to change the host time in this case. Of course we could make this optional if someone really wishes to have this kind of feature. I am ok if you send a PR that adds this kind of support thou.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok, but note that I did not mean that we would change the real host time, but instead that we would provide you a fake time which would be offset compared to the real host one.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I misunderstood you then. That kind of fake time would be much welcomed feature so if you have time to add such a feature, I would appreciate that.

Copy link
Member

@aescolar aescolar Jun 29, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Roger. I added a note in #6044 about it. Hopefully I will have time in the following days to add it.

Copy link
Member

@aescolar aescolar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just a couple of comments:

Copy link
Member

@aescolar aescolar Jun 28, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looking at this, I would actually think it would be better to not access the host time directly, but to have the timer driver provide you the host time, to have just 1 central place for it.

@aescolar
Copy link
Member

Just in case it is not obvious: My comments, if you would agree with them, could be addressed after this PR would be merged.

Copy link
Contributor

@pfalcon pfalcon left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@aescolar, I assume that you'd seen the big issues, you gave -1 here. Otherwise, approving, to go on with other gPTP patches.

Allow gPTP code to be run as a linux process and communicate
with gPTP daemon running in linux host.

Signed-off-by: Jukka Rissanen <[email protected]>
@jukkar jukkar force-pushed the gptp-native-posix branch from c939d6a to 8c26e40 Compare July 3, 2018 17:47
@jukkar
Copy link
Member Author

jukkar commented Jul 3, 2018

Small refactoring because of #8615. This PR also requires #8681 in order to avoid compile warning.

@jukkar jukkar merged commit 16f31f1 into zephyrproject-rtos:master Jul 5, 2018
@jukkar jukkar deleted the gptp-native-posix branch July 20, 2018 19:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants