Linux RDMA and InfiniBand development
 help / color / mirror / Atom feed
From: Guoqing Jiang <guoqing.jiang@linux.dev>
To: yanjun.zhu@linux.dev, jgg@ziepe.ca, leon@kernel.org
Cc: linux-rdma@vger.kernel.org, Guoqing Jiang <guoqing.jiang@linux.dev>
Subject: [PATCH] RDMA/rxe: No need to check IPV6 in rxe_find_route
Date: Mon, 22 Aug 2022 19:23:55 +0800	[thread overview]
Message-ID: <20220822112355.17635-1-guoqing.jiang@linux.dev> (raw)

This check is unnecessary since rxe_find_route6 returns NULL if
CONFIG_IPV6 is disabled.

Signed-off-by: Guoqing Jiang <guoqing.jiang@linux.dev>
---
 drivers/infiniband/sw/rxe/rxe_net.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/infiniband/sw/rxe/rxe_net.c b/drivers/infiniband/sw/rxe/rxe_net.c
index c53f4529f098..b0f31f849144 100644
--- a/drivers/infiniband/sw/rxe/rxe_net.c
+++ b/drivers/infiniband/sw/rxe/rxe_net.c
@@ -113,11 +113,9 @@ static struct dst_entry *rxe_find_route(struct net_device *ndev,
 			saddr6 = &av->sgid_addr._sockaddr_in6.sin6_addr;
 			daddr6 = &av->dgid_addr._sockaddr_in6.sin6_addr;
 			dst = rxe_find_route6(ndev, saddr6, daddr6);
-#if IS_ENABLED(CONFIG_IPV6)
 			if (dst)
 				qp->dst_cookie =
 					rt6_get_cookie((struct rt6_info *)dst);
-#endif
 		}
 
 		if (dst && (qp_type(qp) == IB_QPT_RC)) {
-- 
2.31.1


             reply	other threads:[~2022-08-22 11:24 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-22 11:23 Guoqing Jiang [this message]
2022-08-22 16:33 ` [PATCH] RDMA/rxe: No need to check IPV6 in rxe_find_route William Kucharski
2022-08-23  0:39   ` Guoqing Jiang
2022-08-22 18:49 ` kernel test robot

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=20220822112355.17635-1-guoqing.jiang@linux.dev \
    --to=guoqing.jiang@linux.dev \
    --cc=jgg@ziepe.ca \
    --cc=leon@kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=yanjun.zhu@linux.dev \
    /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