diff mbox series

[RFC,net-next,v4,04/11] net/smc: implement some unsupported operations of loopback-ism

Message ID 20240317100545.96663-5-guwen@linux.alibaba.com (mailing list archive)
State Superseded
Delegated to: Netdev Maintainers
Headers show
Series net/smc: SMC intra-OS shortcut with loopback-ism | expand

Checks

Context Check Description
netdev/series_format success Posting correctly formatted
netdev/tree_selection success Clearly marked for net-next
netdev/ynl success Generated files up to date; no warnings/errors; no diff in generated;
netdev/fixes_present success Fixes tag not required for -next series
netdev/header_inline success No static functions without inline keyword in header files
netdev/build_32bit success Errors and warnings before: 939 this patch: 939
netdev/build_tools success No tools touched, skip
netdev/cc_maintainers success CCed 10 of 10 maintainers
netdev/build_clang success Errors and warnings before: 956 this patch: 956
netdev/verify_signedoff success Signed-off-by tag matches author and committer
netdev/deprecated_api success None detected
netdev/check_selftest success No net selftest shell script
netdev/verify_fixes success No Fixes tag
netdev/build_allmodconfig_warn success Errors and warnings before: 956 this patch: 956
netdev/checkpatch success total: 0 errors, 0 warnings, 0 checks, 48 lines checked
netdev/build_clang_rust success No Rust files in patch. Skipping build
netdev/kdoc success Errors and warnings before: 0 this patch: 0
netdev/source_inline success Was 0 now: 0

Commit Message

Wen Gu March 17, 2024, 10:05 a.m. UTC
vlan operations are not supported currently since the need for vlan in
loopback-ism situation does not seem to be strong.

signal_event operation is not supported since no event now needs to be
processed by loopback-ism device.

Signed-off-by: Wen Gu <guwen@linux.alibaba.com>
---
 net/smc/smc_loopback.c | 36 +++++++++++++++++++++++++++++++-----
 1 file changed, 31 insertions(+), 5 deletions(-)

Comments

Jan Karcher March 21, 2024, 8:12 a.m. UTC | #1
On 17/03/2024 11:05, Wen Gu wrote:
> vlan operations are not supported currently since the need for vlan in
> loopback-ism situation does not seem to be strong.
> 
> signal_event operation is not supported since no event now needs to be
> processed by loopback-ism device.

Hi Wen Gu,

Could we re-phrase this commit message please? I had some trouble 
reading it. Maybe something along:

Operations that loopback-ism does not support currently:
- vlan operations, since there is no strong use-case for it
- signal_event operations, since there are no events to be processed
     by the loopback-ism device.

Thanks
- Jan

> 
> Signed-off-by: Wen Gu <guwen@linux.alibaba.com>
> ---
>   net/smc/smc_loopback.c | 36 +++++++++++++++++++++++++++++++-----
>   1 file changed, 31 insertions(+), 5 deletions(-)
> 
> diff --git a/net/smc/smc_loopback.c b/net/smc/smc_loopback.c
> index 7656a2474500..253128c77208 100644
> --- a/net/smc/smc_loopback.c
> +++ b/net/smc/smc_loopback.c
> @@ -49,6 +49,32 @@ static int smc_lo_query_rgid(struct smcd_dev *smcd, struct smcd_gid *rgid,
>   	return 0;
>   }
>   
> +static int smc_lo_add_vlan_id(struct smcd_dev *smcd, u64 vlan_id)
> +{
> +	return -EOPNOTSUPP;
> +}
> +
> +static int smc_lo_del_vlan_id(struct smcd_dev *smcd, u64 vlan_id)
> +{
> +	return -EOPNOTSUPP;
> +}
> +
> +static int smc_lo_set_vlan_required(struct smcd_dev *smcd)
> +{
> +	return -EOPNOTSUPP;
> +}
> +
> +static int smc_lo_reset_vlan_required(struct smcd_dev *smcd)
> +{
> +	return -EOPNOTSUPP;
> +}
> +
> +static int smc_lo_signal_event(struct smcd_dev *dev, struct smcd_gid *rgid,
> +			       u32 trigger_irq, u32 event_code, u64 info)
> +{
> +	return 0;
> +}
> +
>   static int smc_lo_supports_v2(void)
>   {
>   	return SMC_LO_V2_CAPABLE;
> @@ -77,11 +103,11 @@ static const struct smcd_ops lo_ops = {
>   	.query_remote_gid = smc_lo_query_rgid,
>   	.register_dmb		= NULL,
>   	.unregister_dmb		= NULL,
> -	.add_vlan_id		= NULL,
> -	.del_vlan_id		= NULL,
> -	.set_vlan_required	= NULL,
> -	.reset_vlan_required	= NULL,
> -	.signal_event		= NULL,
> +	.add_vlan_id = smc_lo_add_vlan_id,
> +	.del_vlan_id = smc_lo_del_vlan_id,
> +	.set_vlan_required = smc_lo_set_vlan_required,
> +	.reset_vlan_required = smc_lo_reset_vlan_required,
> +	.signal_event = smc_lo_signal_event,
>   	.move_data		= NULL,
>   	.supports_v2 = smc_lo_supports_v2,
>   	.get_local_gid = smc_lo_get_local_gid,
Wen Gu March 22, 2024, 1:39 a.m. UTC | #2
On 2024/3/21 16:12, Jan Karcher wrote:
> 
> 
> On 17/03/2024 11:05, Wen Gu wrote:
>> vlan operations are not supported currently since the need for vlan in
>> loopback-ism situation does not seem to be strong.
>>
>> signal_event operation is not supported since no event now needs to be
>> processed by loopback-ism device.
> 
> Hi Wen Gu,
> 
> Could we re-phrase this commit message please? I had some trouble reading it. Maybe something along:
> 
> Operations that loopback-ism does not support currently:
> - vlan operations, since there is no strong use-case for it
> - signal_event operations, since there are no events to be processed
>      by the loopback-ism device.
> 
> Thanks
> - Jan
> 
>>
>> Signed-off-by: Wen Gu <guwen@linux.alibaba.com>

OK, it will be improved as you suggested. Thanks!
diff mbox series

Patch

diff --git a/net/smc/smc_loopback.c b/net/smc/smc_loopback.c
index 7656a2474500..253128c77208 100644
--- a/net/smc/smc_loopback.c
+++ b/net/smc/smc_loopback.c
@@ -49,6 +49,32 @@  static int smc_lo_query_rgid(struct smcd_dev *smcd, struct smcd_gid *rgid,
 	return 0;
 }
 
+static int smc_lo_add_vlan_id(struct smcd_dev *smcd, u64 vlan_id)
+{
+	return -EOPNOTSUPP;
+}
+
+static int smc_lo_del_vlan_id(struct smcd_dev *smcd, u64 vlan_id)
+{
+	return -EOPNOTSUPP;
+}
+
+static int smc_lo_set_vlan_required(struct smcd_dev *smcd)
+{
+	return -EOPNOTSUPP;
+}
+
+static int smc_lo_reset_vlan_required(struct smcd_dev *smcd)
+{
+	return -EOPNOTSUPP;
+}
+
+static int smc_lo_signal_event(struct smcd_dev *dev, struct smcd_gid *rgid,
+			       u32 trigger_irq, u32 event_code, u64 info)
+{
+	return 0;
+}
+
 static int smc_lo_supports_v2(void)
 {
 	return SMC_LO_V2_CAPABLE;
@@ -77,11 +103,11 @@  static const struct smcd_ops lo_ops = {
 	.query_remote_gid = smc_lo_query_rgid,
 	.register_dmb		= NULL,
 	.unregister_dmb		= NULL,
-	.add_vlan_id		= NULL,
-	.del_vlan_id		= NULL,
-	.set_vlan_required	= NULL,
-	.reset_vlan_required	= NULL,
-	.signal_event		= NULL,
+	.add_vlan_id = smc_lo_add_vlan_id,
+	.del_vlan_id = smc_lo_del_vlan_id,
+	.set_vlan_required = smc_lo_set_vlan_required,
+	.reset_vlan_required = smc_lo_reset_vlan_required,
+	.signal_event = smc_lo_signal_event,
 	.move_data		= NULL,
 	.supports_v2 = smc_lo_supports_v2,
 	.get_local_gid = smc_lo_get_local_gid,