From: Denys Dmytriyenko <denys@ti.com>
To: Hongmei Gou <a0271529@ti.com>
Cc: meta-arago@arago-project.org, Murali Karicheri <m-karicheri2@ti.com>
Subject: Re: [rocko/master/ti2018.03] [PATCH] iproute2: add patches to fix segmentation fault for prp
Date: Fri, 28 Sep 2018 13:18:49 -0400 [thread overview]
Message-ID: <20180928171849.GC13888@beryl> (raw)
In-Reply-To: <1538150870-27795-1-git-send-email-a0271529@ti.com>
On Fri, Sep 28, 2018 at 12:07:50PM -0400, Hongmei Gou wrote:
> When ip -d link command is executed with prp interface setup,
> it encounters a segmentation fault. This causes snmpwalk command
> to time out since it uses the above command to list the
> interfaces. This patch fixes the issue.
>
> Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
> Signed-off-by: Hongmei Gou <a0271529@ti.com>
> ---
> ...able-display-for-vlan-params-in-ip-d-link.patch | 63 ++++++++++++++++++++++
> .../iproute2/0002-prp-invalid-maxattr.patch | 29 ++++++++++
> .../iproute2/iproute2_4.11.0.bbappend | 4 +-
> 3 files changed, 95 insertions(+), 1 deletion(-)
> create mode 100644 meta-arago-distro/recipes-connectivity/iproute2/iproute2/0001-hsr-prp-disable-display-for-vlan-params-in-ip-d-link.patch
> create mode 100644 meta-arago-distro/recipes-connectivity/iproute2/iproute2/0002-prp-invalid-maxattr.patch
>
> diff --git a/meta-arago-distro/recipes-connectivity/iproute2/iproute2/0001-hsr-prp-disable-display-for-vlan-params-in-ip-d-link.patch b/meta-arago-distro/recipes-connectivity/iproute2/iproute2/0001-hsr-prp-disable-display-for-vlan-params-in-ip-d-link.patch
> new file mode 100644
> index 0000000..cb5a6b9
> --- /dev/null
> +++ b/meta-arago-distro/recipes-connectivity/iproute2/iproute2/0001-hsr-prp-disable-display-for-vlan-params-in-ip-d-link.patch
> @@ -0,0 +1,63 @@
> +From b893b6e581785fd4a458d5cf1a8178e858636db2 Mon Sep 17 00:00:00 2001
> +From: Murali Karicheri <m-karicheri2@ti.com>
> +Date: Thu, 27 Sep 2018 11:56:00 -0400
> +Subject: [PATCH 1/2] hsr/prp: disable display for vlan params in ip -d link
> + command
> +
> +Seeing a crash with ip -d link command for prp. Disable it for now
> +as a trial to check if that is causing the segmentation fault
> +for prp. These values are not coming from kernel anyways. So it
> +doesn't correctly display it currently. So this has no impact on
> +the functionality. Can add it later once kernel provide the right
> +values in the response.
Upstream-status is missing.
> +Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
> +---
> + ip/iplink_hsr.c | 9 ---------
> + ip/iplink_prp.c | 9 ---------
> + 2 files changed, 18 deletions(-)
> +
> +diff --git a/ip/iplink_hsr.c b/ip/iplink_hsr.c
> +index 34e91679..e713cb7b 100644
> +--- a/ip/iplink_hsr.c
> ++++ b/ip/iplink_hsr.c
> +@@ -180,15 +180,6 @@ static void hsr_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb[])
> + RTA_PAYLOAD(tb[IFLA_HSR_SUPERVISION_ADDR]),
> + ARPHRD_VOID,
> + b1, sizeof(b1)));
> +- if (tb[IFLA_HSR_SV_VID])
> +- fprintf(f, "SV_VID %d ",
> +- rta_getattr_u16(tb[IFLA_HSR_SV_VID]));
> +- if (tb[IFLA_HSR_SV_PCP])
> +- fprintf(f, "SV_PCP %d ",
> +- rta_getattr_u8(tb[IFLA_HSR_SV_PCP]));
> +- if (tb[IFLA_HSR_SV_CFI])
> +- fprintf(f, "SV_CFI %d ",
> +- rta_getattr_u8(tb[IFLA_HSR_SV_CFI]));
> + }
> +
> + static void hsr_print_help(struct link_util *lu, int argc, char **argv,
> +diff --git a/ip/iplink_prp.c b/ip/iplink_prp.c
> +index e25ae82d..b09528a5 100644
> +--- a/ip/iplink_prp.c
> ++++ b/ip/iplink_prp.c
> +@@ -170,15 +170,6 @@ static void prp_print_opt(struct link_util *lu, FILE *f, struct rtattr *tb[])
> + RTA_PAYLOAD(tb[IFLA_PRP_SUPERVISION_ADDR]),
> + ARPHRD_VOID,
> + b1, sizeof(b1)));
> +- if (tb[IFLA_PRP_SV_VID])
> +- fprintf(f, "SV_VID %d ",
> +- rta_getattr_u16(tb[IFLA_PRP_SV_VID]));
> +- if (tb[IFLA_PRP_SV_PCP])
> +- fprintf(f, "SV_PCP %d ",
> +- rta_getattr_u8(tb[IFLA_PRP_SV_PCP]));
> +- if (tb[IFLA_PRP_SV_CFI])
> +- fprintf(f, "SV_CFI %d ",
> +- rta_getattr_u8(tb[IFLA_PRP_SV_CFI]));
> + }
> +
> + static void prp_print_help(struct link_util *lu, int argc, char **argv,
> +--
> +2.17.0
> +
> +
> diff --git a/meta-arago-distro/recipes-connectivity/iproute2/iproute2/0002-prp-invalid-maxattr.patch b/meta-arago-distro/recipes-connectivity/iproute2/iproute2/0002-prp-invalid-maxattr.patch
> new file mode 100644
> index 0000000..cfd0106
> --- /dev/null
> +++ b/meta-arago-distro/recipes-connectivity/iproute2/iproute2/0002-prp-invalid-maxattr.patch
> @@ -0,0 +1,29 @@
> +From 755328f9c9d45149cad1a8e6c371d2020b99f18e Mon Sep 17 00:00:00 2001
> +From: Murali Karicheri <m-karicheri2@ti.com>
> +Date: Thu, 27 Sep 2018 14:54:48 -0400
> +Subject: [PATCH 2/2] prp: invalid maxattr
> +
> +Fix the cut and paste error of using IFLA_VLAN_MAX instead of IFLA_PRP_MAX.
Upstream-status is missing.
> +Signed-off-by: Murali Karicheri <m-karicheri2@ti.com>
> +---
> + ip/iplink_prp.c | 2 +-
> + 1 file changed, 1 insertion(+), 1 deletion(-)
> +
> +diff --git a/ip/iplink_prp.c b/ip/iplink_prp.c
> +index b09528a5..beef603b 100644
> +--- a/ip/iplink_prp.c
> ++++ b/ip/iplink_prp.c
> +@@ -180,7 +180,7 @@ static void prp_print_help(struct link_util *lu, int argc, char **argv,
> +
> + struct link_util prp_link_util = {
> + .id = "prp",
> +- .maxattr = IFLA_VLAN_MAX,
> ++ .maxattr = IFLA_PRP_MAX,
> + .parse_opt = prp_parse_opt,
> + .print_opt = prp_print_opt,
> + .print_help = prp_print_help,
> +--
> +2.17.0
> +
> +
> diff --git a/meta-arago-distro/recipes-connectivity/iproute2/iproute2_4.11.0.bbappend b/meta-arago-distro/recipes-connectivity/iproute2/iproute2_4.11.0.bbappend
> index 2b2d6d2..26949c4 100644
> --- a/meta-arago-distro/recipes-connectivity/iproute2/iproute2_4.11.0.bbappend
> +++ b/meta-arago-distro/recipes-connectivity/iproute2/iproute2_4.11.0.bbappend
> @@ -1,4 +1,4 @@
> -PR_append = ".arago2"
> +PR_append = ".arago3"
>
> FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
>
> @@ -6,4 +6,6 @@ SRC_URI_append = " \
> file://0001-add-support-for-prp-similar-to-hsr.patch \
> file://0001-hsr-prp-add-support-for-vlan-tagged-sv-frames.patch \
> file://0001-hsr-prp-remove-the-debug-print-from-the-code.patch \
> + file://0001-hsr-prp-disable-display-for-vlan-params-in-ip-d-link.patch \
> + file://0002-prp-invalid-maxattr.patch \
> "
> --
> 1.9.1
>
> _______________________________________________
> meta-arago mailing list
> meta-arago@arago-project.org
> http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago
prev parent reply other threads:[~2018-09-28 17:18 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2018-09-28 16:07 [rocko/master/ti2018.03] [PATCH] iproute2: add patches to fix segmentation fault for prp Hongmei Gou
2018-09-28 17:18 ` Denys Dmytriyenko [this message]
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=20180928171849.GC13888@beryl \
--to=denys@ti.com \
--cc=a0271529@ti.com \
--cc=m-karicheri2@ti.com \
--cc=meta-arago@arago-project.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.