From: "Morten Brørup" <mb@smartsharesystems.com>
To: "Bruce Richardson" <bruce.richardson@intel.com>, <dev@dpdk.org>
Cc: "Ciara Power" <ciara.power@intel.com>
Subject: Re: [dpdk-dev] [PATCH v2 2/2] telemetry: add extra log message on socket bind failure
Date: Fri, 2 Jul 2021 16:22:59 +0200 [thread overview]
Message-ID: <98CBD80474FA8B44BF855DF32C47DC35C618D8@smartserver.smartshare.dk> (raw)
In-Reply-To: <20210702125554.606364-2-bruce.richardson@intel.com>
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Bruce Richardson
> Sent: Friday, 2 July 2021 14.56
>
> If the library fails to create the needed socket, add an additional
> check to report if the error is due to a missing DPDK runtime dir.
>
> Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
> ---
> lib/telemetry/telemetry.c | 5 +++++
> 1 file changed, 5 insertions(+)
>
> diff --git a/lib/telemetry/telemetry.c b/lib/telemetry/telemetry.c
> index 6baba57ec2..8665db8d03 100644
> --- a/lib/telemetry/telemetry.c
> +++ b/lib/telemetry/telemetry.c
> @@ -7,6 +7,7 @@
> #include <pthread.h>
> #include <sys/socket.h>
> #include <sys/un.h>
> +#include <sys/stat.h>
> #include <dlfcn.h>
> #endif /* !RTE_EXEC_ENV_WINDOWS */
>
> @@ -422,7 +423,11 @@ create_socket(char *path)
> strlcpy(sun.sun_path, path, sizeof(sun.sun_path));
> unlink(sun.sun_path);
> if (bind(sock, (void *) &sun, sizeof(sun)) < 0) {
> + struct stat st;
> +
> TMTY_LOG(ERR, "Error binding socket: %s\n",
> strerror(errno));
> + if (stat(socket_dir, &st) < 0 || !S_ISDIR(st.st_mode))
> + TMTY_LOG(ERR, "Cannot access DPDK runtime directory:
> %s\n", socket_dir);
> sun.sun_path[0] = 0;
> goto error;
> }
> --
> 2.30.2
>
Acked-by: Morten Brørup <mb@smartsharesystems.com>
next prev parent reply other threads:[~2021-07-02 14:23 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-07-01 9:34 [dpdk-dev] [PATCH] eal: create runtime dir even when shared data is not used Bruce Richardson
2021-07-01 14:43 ` Morten Brørup
2021-07-01 14:56 ` Bruce Richardson
2021-07-02 12:55 ` [dpdk-dev] [PATCH v2 1/2] " Bruce Richardson
2021-07-02 12:55 ` [dpdk-dev] [PATCH v2 2/2] telemetry: add extra log message on socket bind failure Bruce Richardson
2021-07-02 14:22 ` Morten Brørup [this message]
2021-07-05 10:16 ` Power, Ciara
2021-07-05 14:11 ` David Marchand
2021-07-02 14:21 ` [dpdk-dev] [PATCH v2 1/2] eal: create runtime dir even when shared data is not used Morten Brørup
2021-07-05 14:11 ` David Marchand
2021-07-05 14:39 ` Bruce Richardson
2021-07-07 12:35 ` David Marchand
2021-07-07 12:41 ` Bruce Richardson
2021-07-07 19:02 ` Tyler Retzlaff
2021-07-07 12:52 ` [dpdk-dev] [PATCH v3 " Bruce Richardson
2021-07-07 12:52 ` [dpdk-dev] [PATCH v3 2/2] telemetry: add extra log message on socket bind failure Bruce Richardson
2021-07-07 15:00 ` [dpdk-dev] [PATCH v3 1/2] eal: create runtime dir even when shared data is not used David Marchand
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=98CBD80474FA8B44BF855DF32C47DC35C618D8@smartserver.smartshare.dk \
--to=mb@smartsharesystems.com \
--cc=bruce.richardson@intel.com \
--cc=ciara.power@intel.com \
--cc=dev@dpdk.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).