From 0ae7ced635a11be55b07cf126070618255e7722d Mon Sep 17 00:00:00 2001 From: Ron Gredvig Date: Thu, 15 Dec 2022 14:04:20 -0600 Subject: [PATCH] LU-16996 kfilnd: Wrong traffic class assigned 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 Change-Id: I21236c01d4bef53b62e2f303c8e24e059ce83c0a Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/51788 Reviewed-by: Ian Ziemba Reviewed-by: Oleg Drokin Tested-by: jenkins Tested-by: Maloo --- lnet/klnds/kfilnd/kfilnd_dom.c | 2 ++ lnet/klnds/kfilnd/kfilnd_ep.c | 2 ++ 2 files changed, 4 insertions(+) diff --git a/lnet/klnds/kfilnd/kfilnd_dom.c b/lnet/klnds/kfilnd/kfilnd_dom.c index afbf2ef..62fe677 100644 --- a/lnet/klnds/kfilnd/kfilnd_dom.c +++ b/lnet/klnds/kfilnd/kfilnd_dom.c @@ -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 = diff --git a/lnet/klnds/kfilnd/kfilnd_ep.c b/lnet/klnds/kfilnd/kfilnd_ep.c index d2c677c..904295a 100644 --- a/lnet/klnds/kfilnd/kfilnd_ep.c +++ b/lnet/klnds/kfilnd/kfilnd_ep.c @@ -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) { -- 1.8.3.1