[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <375672b9-5464-c25e-da7b-e435cc505a5c@intel.com>
Date: Mon, 3 Feb 2020 09:07:27 -0800
From: Jacob Keller <jacob.e.keller@...el.com>
To: Jiri Pirko <jiri@...nulli.us>
Cc: netdev@...r.kernel.org, valex@...lanox.com, linyunsheng@...wei.com,
lihong.yang@...el.com
Subject: Re: [PATCH 01/15] devlink: prepare to support region operations
On 2/3/2020 3:35 AM, Jiri Pirko wrote:
> Thu, Jan 30, 2020 at 11:58:56PM CET, jacob.e.keller@...el.com wrote:
>> Modify the devlink region code in preparation for adding new operations
>> on regions.
>>
>> Create a devlink_region_ops structure, and move the name pointer from
>> within the devlink_region structure into the ops structure (similar to
>> the devlink_health_reporter_ops).
>>
>> This prepares the regions to enable support of additional operations in
>> the future such as requesting snapshots, or accessing the region
>> directly without a snapshot.
>>
>> Signed-off-by: Jacob Keller <jacob.e.keller@...el.com>
>> ---
>> drivers/net/ethernet/mellanox/mlx4/crdump.c | 25 ++++++++++++---------
>> drivers/net/netdevsim/dev.c | 6 ++++-
>> include/net/devlink.h | 17 ++++++++++----
>> net/core/devlink.c | 23 ++++++++++---------
>> 4 files changed, 45 insertions(+), 26 deletions(-)
>>
>> diff --git a/drivers/net/ethernet/mellanox/mlx4/crdump.c b/drivers/net/ethernet/mellanox/mlx4/crdump.c
>> index 64ed725aec28..4cea64033919 100644
>> --- a/drivers/net/ethernet/mellanox/mlx4/crdump.c
>> +++ b/drivers/net/ethernet/mellanox/mlx4/crdump.c
>> @@ -38,8 +38,13 @@
>> #define CR_ENABLE_BIT_OFFSET 0xF3F04
>> #define MAX_NUM_OF_DUMPS_TO_STORE (8)
>>
>> -static const char *region_cr_space_str = "cr-space";
>> -static const char *region_fw_health_str = "fw-health";
>
> Just leave these as are and use in ops and messages. It is odd to use
> ops.name in the message.
>
So this produces the following errors, not 100% sure how to resolve:
> drivers/net/ethernet/mellanox/mlx4/crdump.c:45:10: error: initializer element is not constant
> 45 | .name = region_cr_space_str,
> | ^~~~~~~~~~~~~~~~~~~
> drivers/net/ethernet/mellanox/mlx4/crdump.c:45:10: note: (near initialization for ‘region_cr_space_ops.name’)
> drivers/net/ethernet/mellanox/mlx4/crdump.c:49:10: error: initializer element is not constant
> 49 | .name = region_fw_health_str,
> | ^~~~~~~~~~~~~~~~~~~~
Thanks,
Jake
Powered by blists - more mailing lists