mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Ahern <dsahern@gmail.com>
To: Petr Machata <petrm@nvidia.com>, Patrisious Haddad <phaddad@nvidia.com>
Cc: jgg@ziepe.ca, leon@kernel.org, stephen@networkplumber.org,
	netdev@vger.kernel.org, linux-rdma@vger.kernel.org,
	linuxarm@huawei.com, linux-kernel@vger.kernel.org,
	huangjunxian6@hisilicon.com, michaelgur@nvidia.com
Subject: Re: [PATCH iproute2-next 2/3] rdma: Add an option to set privileged QKEY parameter
Date: Thu, 19 Oct 2023 09:05:06 -0600	[thread overview]
Message-ID: <2c0e946d-eaaf-59f8-2c5a-c47890920c5a@gmail.com> (raw)
In-Reply-To: <87il72aiqm.fsf@nvidia.com>

On 10/19/23 4:38 AM, Petr Machata wrote:
> 
> Patrisious Haddad <phaddad@nvidia.com> writes:
> 
>> @@ -40,6 +45,22 @@ static int sys_show_parse_cb(const struct nlmsghdr *nlh, void *data)
>>  				   mode_str);
>>  	}
>>  
>> +	if (tb[RDMA_NLDEV_SYS_ATTR_PRIVILEGED_QKEY_MODE]) {
>> +		const char *pqkey_str;
>> +		uint8_t pqkey_mode;
>> +
>> +		pqkey_mode =
>> +			mnl_attr_get_u8(tb[RDMA_NLDEV_SYS_ATTR_PRIVILEGED_QKEY_MODE]);
>> +
>> +		if (pqkey_mode < ARRAY_SIZE(privileged_qkey_str))
>> +			pqkey_str = privileged_qkey_str[pqkey_mode];
>> +		else
>> +			pqkey_str = "unknown";
>> +
>> +		print_color_string(PRINT_ANY, COLOR_NONE, "privileged-qkey",
>> +				   "privileged-qkey %s ", pqkey_str);
>> +	}
>> +
> 
> Elsewhere in the file, you just use print_color_on_off(), why not here?

+1


  reply	other threads:[~2023-10-19 15:05 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-19  8:21 [PATCH iproute2-next 0/3] Add support to set privileged qkey parameter Patrisious Haddad
2023-10-19  8:21 ` [PATCH iproute2-next 1/3] rdma: update uapi headers Patrisious Haddad
2023-10-19  8:21 ` [PATCH iproute2-next 2/3] rdma: Add an option to set privileged QKEY parameter Patrisious Haddad
2023-10-19 10:38   ` Petr Machata
2023-10-19 15:05     ` David Ahern [this message]
2023-10-22  7:41     ` Patrisious Haddad
2023-10-22 16:48       ` David Ahern
2023-10-23 11:24         ` Patrisious Haddad
2023-10-22  9:22     ` Patrisious Haddad
2023-10-19  8:21 ` [PATCH iproute2-next 3/3] rdma: Adjust man page for rdma system set privileged_qkey command Patrisious Haddad

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=2c0e946d-eaaf-59f8-2c5a-c47890920c5a@gmail.com \
    --to=dsahern@gmail.com \
    --cc=huangjunxian6@hisilicon.com \
    --cc=jgg@ziepe.ca \
    --cc=leon@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-rdma@vger.kernel.org \
    --cc=linuxarm@huawei.com \
    --cc=michaelgur@nvidia.com \
    --cc=netdev@vger.kernel.org \
    --cc=petrm@nvidia.com \
    --cc=phaddad@nvidia.com \
    --cc=stephen@networkplumber.org \
    /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

all inboxes | Powered by JetHome®