Whamcloud - gitweb
LU-16996 kfilnd: Wrong traffic class assigned 88/51788/2
authorRon Gredvig <ron.gredvig@hpe.com>
Thu, 15 Dec 2022 20:04:20 +0000 (14:04 -0600)
committerOleg Drokin <green@whamcloud.com>
Tue, 22 Aug 2023 06:42:14 +0000 (06:42 +0000)
The wrong traffic class was being assigned to a transmit
context when multiple networks were assigned to the same
interface.

This was discovered by noticing a currently unsupported
traffic class didn't fail when it was used. The traffic
class from the shared domain was being used instead.

This was fixed by explicitly specifying the traffic
class when creating a transmit context for an endpoint.

Test-Parameters: trivial
HPE-bug-id: LUS-11415
Signed-off-by: Ron Gredvig <ron.gredvig@hpe.com>
Change-Id: I21236c01d4bef53b62e2f303c8e24e059ce83c0a
Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/51788
Reviewed-by: Ian Ziemba <ian.ziemba@hpe.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
lnet/klnds/kfilnd/kfilnd_dom.c
lnet/klnds/kfilnd/kfilnd_ep.c

index afbf2ef..62fe677 100644 (file)
@@ -345,6 +345,8 @@ struct kfilnd_dom *kfilnd_dom_get(struct lnet_ni *ni, const char *node,
        hints->tx_attr->op_flags = KFI_COMPLETION;
        hints->tx_attr->iov_limit = 256; /* 1 MiB LNet message */
        hints->tx_attr->rma_iov_limit = 256; /* 1 MiB LNet message */
+       hints->tx_attr->tclass =
+               ni->ni_lnd_tunables.lnd_tun_u.lnd_kfi.lnd_traffic_class;
        hints->ep_attr->auth_key =
                (void *)&ni->ni_lnd_tunables.lnd_tun_u.lnd_kfi.lnd_auth_key;
        hints->ep_attr->auth_key_size =
index d2c677c..904295a 100644 (file)
@@ -849,6 +849,8 @@ struct kfilnd_ep *kfilnd_ep_alloc(struct kfilnd_dev *dev,
                tx_scale_factor;
        tx_attr.iov_limit = LNET_MAX_IOV;
        tx_attr.rma_iov_limit = LNET_MAX_IOV;
+       tx_attr.tclass =
+               dev->kfd_ni->ni_lnd_tunables.lnd_tun_u.lnd_kfi.lnd_traffic_class;
        rc = kfi_tx_context(dev->kfd_sep, context_id, &tx_attr, &ep->end_tx,
                            ep);
        if (rc) {