fs: rpmsgfs_client: process host message as ns_announcement#18671
Open
AndreHeinemans-NXP wants to merge 1 commit intoapache:masterfrom
Open
fs: rpmsgfs_client: process host message as ns_announcement#18671AndreHeinemans-NXP wants to merge 1 commit intoapache:masterfrom
AndreHeinemans-NXP wants to merge 1 commit intoapache:masterfrom
Conversation
Threat unsolicited messages from the host as ns_announcement messages. It unlocks the client flow by calling rpmsg_post() on the semaphore. Without this or an NS announcement, the client's semaphore will wait forever. This is practical when the server side is running from linux userspace using ioctl where controlling NS announcements is problematic. Signed-off-by: Andre Heinemans <andre.heinemans@nxp.com>
| return -ENOMEM; | ||
| } | ||
|
|
||
| priv->connected = false; |
| static void rpmsgfs_set_connected(struct rpmsg_endpoint *ept) | ||
| { | ||
| FAR struct rpmsgfs_s *priv = ept->priv; | ||
| priv->connected = true; |
Contributor
There was a problem hiding this comment.
but when connected is reset to false
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Threat unsolicited messages from the host as ns_announcement messages. It unlocks the client flow by calling rpmsg_post() on the semaphore. Without this or an NS announcement, the client's semaphore will wait forever.
This is practical when the server side is running from linux userspace using ioctl where controlling NS announcements is problematic. When exporting a channel by ioctl, no NS announcements are sent. So instead, a message from the server daemon will do the trick.
Impact
Targets using CONFIG_FS_RPMSGFS
Testing
Tested on
rpmsgfs-server is functional but there is still some work in progress. It is an alternative to the rpmsgfs linux kernel driver.