From: Jason Gunthorpe <jgg@nvidia.com>
To: Yi Zhang <yi.zhang@redhat.com>
Cc: <linux-rdma@vger.kernel.org>, <bvanassche@acm.org>,
<kamalheib1@gmail.com>, <yanjunz@mellanox.com>
Subject: Re: [PATCH v2] RDMA/rxe: fix the parent sysfs read when the interface has 15 chars
Date: Mon, 24 Aug 2020 14:07:35 -0300 [thread overview]
Message-ID: <20200824170735.GA3209509@nvidia.com> (raw)
In-Reply-To: <20200820153646.31316-1-yi.zhang@redhat.com>
On Thu, Aug 20, 2020 at 11:36:46PM +0800, Yi Zhang wrote:
> parent sysfs reads will yield '\0' bytes when the interface name
> has 15 chars, and there will no "\n" output.
>
> reproducer:
> Create one interface with 15 chars
> [root@test ~]# ip a s enp0s29u1u7u3c2
> 2: enp0s29u1u7u3c2: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc fq_codel state UNKNOWN group default qlen 1000
> link/ether 02:21:28:57:47:17 brd ff:ff:ff:ff:ff:ff
> inet6 fe80::ac41:338f:5bcd:c222/64 scope link noprefixroute
> valid_lft forever preferred_lft forever
> [root@test ~]# modprobe rdma_rxe
> [root@test ~]# echo enp0s29u1u7u3c2 > /sys/module/rdma_rxe/parameters/add
> [root@test ~]# cat /sys/class/infiniband/rxe0/parent
> enp0s29u1u7u3c2[root@test ~]#
> [root@test ~]# f="/sys/class/infiniband/rxe0/parent"
> [root@test ~]# echo "$(<"$f")"
> -bash: warning: command substitution: ignored null byte in input
> enp0s29u1u7u3c2
>
> Suggested-by: Jason Gunthorpe <jgg@nvidia.com>
> Signed-off-by: Yi Zhang <yi.zhang@redhat.com>
> Reviewed-by: Bart Van Assche <bvanassche@acm.org>
> ---
> drivers/infiniband/sw/rxe/rxe_verbs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied to for-rc with a Fixes and cc stable line
Thanks,
Jason
prev parent reply other threads:[~2020-08-24 17:08 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-20 15:36 [PATCH v2] RDMA/rxe: fix the parent sysfs read when the interface has 15 chars Yi Zhang
2020-08-24 16:47 ` Bart Van Assche
2020-08-24 17:07 ` Jason Gunthorpe [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=20200824170735.GA3209509@nvidia.com \
--to=jgg@nvidia.com \
--cc=bvanassche@acm.org \
--cc=kamalheib1@gmail.com \
--cc=linux-rdma@vger.kernel.org \
--cc=yanjunz@mellanox.com \
--cc=yi.zhang@redhat.com \
/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