Skip to content

Commit a806b27

Browse files
committed
UCS/NETLINK: code review fixes
1 parent d2f227e commit a806b27

File tree

3 files changed

+2
-24
lines changed

3 files changed

+2
-24
lines changed

src/ucs/sys/netlink.c

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -309,9 +309,3 @@ int ucs_netlink_route_exists(int if_index, const struct sockaddr *sa_remote,
309309

310310
return info.found;
311311
}
312-
313-
int ucs_netlink_route_exists_allow_default(int if_index,
314-
const struct sockaddr *sa_remote)
315-
{
316-
return ucs_netlink_route_exists(if_index, sa_remote, 1);
317-
}

src/ucs/sys/netlink.h

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -60,21 +60,6 @@ ucs_netlink_send_request(int protocol, unsigned short nlmsg_type,
6060
int ucs_netlink_route_exists(int if_index, const struct sockaddr *sa_remote,
6161
int allow_default_gw);
6262

63-
/**
64-
* Check whether a routing table rule exists for a given network
65-
* interface name and a destination address, while allowing default gateway
66-
* routes.
67-
*
68-
* @param [in] if_index A global index representing the network interface,
69-
as assigned by the system (e.g., obtained via
70-
if_nametoindex()).
71-
* @param [in] sa_remote Pointer to the destination address.
72-
*
73-
* @return 1 if rule exists, or 0 otherwise.
74-
*/
75-
int ucs_netlink_route_exists_allow_default(int if_index,
76-
const struct sockaddr *sa_remote);
77-
7863
END_C_DECLS
7964

8065
#endif /* UCS_NETLINK_H */

src/uct/ib/base/ib_iface.c

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -710,7 +710,7 @@ uct_ib_iface_roce_is_routable(uct_ib_iface_t *iface, uint8_t gid_index,
710710
return 0;
711711
}
712712

713-
if (!ucs_netlink_route_exists_allow_default(ndev_index, sa_remote)) {
713+
if (!ucs_netlink_route_exists(ndev_index, sa_remote, 1)) {
714714
/* try to use loopback interface for reachability check, because it may
715715
* be used for routing in case of an interface with VRF is configured
716716
* and a RoCE IP interface uses this VRF table for routing.
@@ -721,8 +721,7 @@ uct_ib_iface_roce_is_routable(uct_ib_iface_t *iface, uint8_t gid_index,
721721
return 0;
722722
}
723723

724-
if (!ucs_netlink_route_exists_allow_default(lo_ndev_index,
725-
sa_remote)) {
724+
if (!ucs_netlink_route_exists(lo_ndev_index, sa_remote, 1)) {
726725
uct_iface_fill_info_str_buf(params,
727726
"remote address %s is not routable "
728727
"neither by interface "UCT_IB_IFACE_FMT

0 commit comments

Comments
 (0)