mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
RDMA/rxe: Replace pr_xxx by rxe_dbg_xxx in rxe_net.c
[ Upstream commit 34549e88e0 ]
Replace (some) calls to pr_xxx() in rxe_net.c with rxe_dbg_xxx().
Calls with a rxe device not yet in scope are left as is.
Link: https://lore.kernel.org/r/20221103171013.20659-7-rpearsonhpe@gmail.com
Signed-off-by: Bob Pearson <rpearsonhpe@gmail.com>
Signed-off-by: Jason Gunthorpe <jgg@nvidia.com>
Stable-dep-of: 8776618dbbd1 ("RDMA/rxe: Fix incorrect rxe_put in error path")
Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
committed by
Greg Kroah-Hartman
parent
faa8d0ecf6
commit
4c0d0a653a
@@ -20,9 +20,10 @@
|
|||||||
|
|
||||||
static struct rxe_recv_sockets recv_sockets;
|
static struct rxe_recv_sockets recv_sockets;
|
||||||
|
|
||||||
static struct dst_entry *rxe_find_route4(struct net_device *ndev,
|
static struct dst_entry *rxe_find_route4(struct rxe_qp *qp,
|
||||||
struct in_addr *saddr,
|
struct net_device *ndev,
|
||||||
struct in_addr *daddr)
|
struct in_addr *saddr,
|
||||||
|
struct in_addr *daddr)
|
||||||
{
|
{
|
||||||
struct rtable *rt;
|
struct rtable *rt;
|
||||||
struct flowi4 fl = { { 0 } };
|
struct flowi4 fl = { { 0 } };
|
||||||
@@ -35,7 +36,7 @@ static struct dst_entry *rxe_find_route4(struct net_device *ndev,
|
|||||||
|
|
||||||
rt = ip_route_output_key(&init_net, &fl);
|
rt = ip_route_output_key(&init_net, &fl);
|
||||||
if (IS_ERR(rt)) {
|
if (IS_ERR(rt)) {
|
||||||
pr_err_ratelimited("no route to %pI4\n", &daddr->s_addr);
|
rxe_dbg_qp(qp, "no route to %pI4\n", &daddr->s_addr);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -43,7 +44,8 @@ static struct dst_entry *rxe_find_route4(struct net_device *ndev,
|
|||||||
}
|
}
|
||||||
|
|
||||||
#if IS_ENABLED(CONFIG_IPV6)
|
#if IS_ENABLED(CONFIG_IPV6)
|
||||||
static struct dst_entry *rxe_find_route6(struct net_device *ndev,
|
static struct dst_entry *rxe_find_route6(struct rxe_qp *qp,
|
||||||
|
struct net_device *ndev,
|
||||||
struct in6_addr *saddr,
|
struct in6_addr *saddr,
|
||||||
struct in6_addr *daddr)
|
struct in6_addr *daddr)
|
||||||
{
|
{
|
||||||
@@ -60,12 +62,12 @@ static struct dst_entry *rxe_find_route6(struct net_device *ndev,
|
|||||||
recv_sockets.sk6->sk, &fl6,
|
recv_sockets.sk6->sk, &fl6,
|
||||||
NULL);
|
NULL);
|
||||||
if (IS_ERR(ndst)) {
|
if (IS_ERR(ndst)) {
|
||||||
pr_err_ratelimited("no route to %pI6\n", daddr);
|
rxe_dbg_qp(qp, "no route to %pI6\n", daddr);
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (unlikely(ndst->error)) {
|
if (unlikely(ndst->error)) {
|
||||||
pr_err("no route to %pI6\n", daddr);
|
rxe_dbg_qp(qp, "no route to %pI6\n", daddr);
|
||||||
goto put;
|
goto put;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -77,7 +79,8 @@ put:
|
|||||||
|
|
||||||
#else
|
#else
|
||||||
|
|
||||||
static struct dst_entry *rxe_find_route6(struct net_device *ndev,
|
static struct dst_entry *rxe_find_route6(struct rxe_qp *qp,
|
||||||
|
struct net_device *ndev,
|
||||||
struct in6_addr *saddr,
|
struct in6_addr *saddr,
|
||||||
struct in6_addr *daddr)
|
struct in6_addr *daddr)
|
||||||
{
|
{
|
||||||
@@ -105,14 +108,14 @@ static struct dst_entry *rxe_find_route(struct net_device *ndev,
|
|||||||
|
|
||||||
saddr = &av->sgid_addr._sockaddr_in.sin_addr;
|
saddr = &av->sgid_addr._sockaddr_in.sin_addr;
|
||||||
daddr = &av->dgid_addr._sockaddr_in.sin_addr;
|
daddr = &av->dgid_addr._sockaddr_in.sin_addr;
|
||||||
dst = rxe_find_route4(ndev, saddr, daddr);
|
dst = rxe_find_route4(qp, ndev, saddr, daddr);
|
||||||
} else if (av->network_type == RXE_NETWORK_TYPE_IPV6) {
|
} else if (av->network_type == RXE_NETWORK_TYPE_IPV6) {
|
||||||
struct in6_addr *saddr6;
|
struct in6_addr *saddr6;
|
||||||
struct in6_addr *daddr6;
|
struct in6_addr *daddr6;
|
||||||
|
|
||||||
saddr6 = &av->sgid_addr._sockaddr_in6.sin6_addr;
|
saddr6 = &av->sgid_addr._sockaddr_in6.sin6_addr;
|
||||||
daddr6 = &av->dgid_addr._sockaddr_in6.sin6_addr;
|
daddr6 = &av->dgid_addr._sockaddr_in6.sin6_addr;
|
||||||
dst = rxe_find_route6(ndev, saddr6, daddr6);
|
dst = rxe_find_route6(qp, ndev, saddr6, daddr6);
|
||||||
#if IS_ENABLED(CONFIG_IPV6)
|
#if IS_ENABLED(CONFIG_IPV6)
|
||||||
if (dst)
|
if (dst)
|
||||||
qp->dst_cookie =
|
qp->dst_cookie =
|
||||||
@@ -285,7 +288,7 @@ static int prepare4(struct rxe_av *av, struct rxe_pkt_info *pkt,
|
|||||||
|
|
||||||
dst = rxe_find_route(skb->dev, qp, av);
|
dst = rxe_find_route(skb->dev, qp, av);
|
||||||
if (!dst) {
|
if (!dst) {
|
||||||
pr_err("Host not reachable\n");
|
rxe_dbg_qp(qp, "Host not reachable\n");
|
||||||
return -EHOSTUNREACH;
|
return -EHOSTUNREACH;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -309,7 +312,7 @@ static int prepare6(struct rxe_av *av, struct rxe_pkt_info *pkt,
|
|||||||
|
|
||||||
dst = rxe_find_route(skb->dev, qp, av);
|
dst = rxe_find_route(skb->dev, qp, av);
|
||||||
if (!dst) {
|
if (!dst) {
|
||||||
pr_err("Host not reachable\n");
|
rxe_dbg_qp(qp, "Host not reachable\n");
|
||||||
return -EHOSTUNREACH;
|
return -EHOSTUNREACH;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -368,7 +371,8 @@ static int rxe_send(struct sk_buff *skb, struct rxe_pkt_info *pkt)
|
|||||||
} else if (skb->protocol == htons(ETH_P_IPV6)) {
|
} else if (skb->protocol == htons(ETH_P_IPV6)) {
|
||||||
err = ip6_local_out(dev_net(skb_dst(skb)->dev), skb->sk, skb);
|
err = ip6_local_out(dev_net(skb_dst(skb)->dev), skb->sk, skb);
|
||||||
} else {
|
} else {
|
||||||
pr_err("Unknown layer 3 protocol: %d\n", skb->protocol);
|
rxe_dbg_qp(pkt->qp, "Unknown layer 3 protocol: %d\n",
|
||||||
|
skb->protocol);
|
||||||
atomic_dec(&pkt->qp->skb_out);
|
atomic_dec(&pkt->qp->skb_out);
|
||||||
rxe_put(pkt->qp);
|
rxe_put(pkt->qp);
|
||||||
kfree_skb(skb);
|
kfree_skb(skb);
|
||||||
@@ -376,7 +380,7 @@ static int rxe_send(struct sk_buff *skb, struct rxe_pkt_info *pkt)
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (unlikely(net_xmit_eval(err))) {
|
if (unlikely(net_xmit_eval(err))) {
|
||||||
pr_debug("error sending packet: %d\n", err);
|
rxe_dbg_qp(pkt->qp, "error sending packet: %d\n", err);
|
||||||
return -EAGAIN;
|
return -EAGAIN;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -417,7 +421,7 @@ int rxe_xmit_packet(struct rxe_qp *qp, struct rxe_pkt_info *pkt,
|
|||||||
|
|
||||||
if ((is_request && (qp->req.state != QP_STATE_READY)) ||
|
if ((is_request && (qp->req.state != QP_STATE_READY)) ||
|
||||||
(!is_request && (qp->resp.state != QP_STATE_READY))) {
|
(!is_request && (qp->resp.state != QP_STATE_READY))) {
|
||||||
pr_info("Packet dropped. QP is not in ready state\n");
|
rxe_dbg_qp(qp, "Packet dropped. QP is not in ready state\n");
|
||||||
goto drop;
|
goto drop;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -598,7 +602,7 @@ static int rxe_notify(struct notifier_block *not_blk,
|
|||||||
rxe_port_down(rxe);
|
rxe_port_down(rxe);
|
||||||
break;
|
break;
|
||||||
case NETDEV_CHANGEMTU:
|
case NETDEV_CHANGEMTU:
|
||||||
pr_info("%s changed mtu to %d\n", ndev->name, ndev->mtu);
|
rxe_dbg(rxe, "%s changed mtu to %d\n", ndev->name, ndev->mtu);
|
||||||
rxe_set_mtu(rxe, ndev->mtu);
|
rxe_set_mtu(rxe, ndev->mtu);
|
||||||
break;
|
break;
|
||||||
case NETDEV_CHANGE:
|
case NETDEV_CHANGE:
|
||||||
@@ -610,7 +614,7 @@ static int rxe_notify(struct notifier_block *not_blk,
|
|||||||
case NETDEV_CHANGENAME:
|
case NETDEV_CHANGENAME:
|
||||||
case NETDEV_FEAT_CHANGE:
|
case NETDEV_FEAT_CHANGE:
|
||||||
default:
|
default:
|
||||||
pr_info("ignoring netdev event = %ld for %s\n",
|
rxe_dbg(rxe, "ignoring netdev event = %ld for %s\n",
|
||||||
event, ndev->name);
|
event, ndev->name);
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user