Skip to contentSkip to conversation

net/virtio-user: drop attribute "unused" for memory callback

PATCH Applied Tiwei Bie 4 participants 6 messages Nov 19, 2019 – Nov 21, 2019 Network drivers

lore
Share & tools
lore

Tiwei Bie

author
#0 lore raw

PATCH 1/1 net/virtio-user: drop attribute "unused" for memory callback

The "addr" param has been used since the event callbacks are enabled for external memory. So the "__rte_unused" should be dropped.

Besides, slightly refine the coding style by consistently assuming tabs are 8 characters.

Fixes f32c7c9de961 ("malloc: enable event callbacks for external memory")
---
 drivers/net/virtio/virtio_user/virtio_user_dev.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/virtio/virtio_user/virtio_user_dev.c +3 -3
index a4400e772..ea016e85d 100644
@@ -315,9 +315,9 @@ virtio_user_fill_intr_handle(struct virtio_user_dev *dev)
 
 static void
 virtio_user_mem_event_cb(enum rte_mem_event type __rte_unused,
-						 const void *addr __rte_unused,
-						 size_t len __rte_unused,
-						 void *arg)
+			 const void *addr,
+			 size_t len __rte_unused,
+			 void *arg)
 {
 	struct virtio_user_dev *dev = arg;
 	struct rte_memseg_list *msl;
Signature · 1 line
2.23.0
Reviewed-by on v1 1/1
#1 lore raw
Quoted 22 lines · Tiwei Bie

The "addr" param has been used since the event callbacks are enabled for external memory. So the "__rte_unused" should be dropped.

Besides, slightly refine the coding style by consistently assuming tabs are 8 characters.

Fixes f32c7c9de961 ("malloc: enable event callbacks for external memory")
---
 drivers/net/virtio/virtio_user/virtio_user_dev.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/virtio/virtio_user/virtio_user_dev.c +0 -0
index a4400e772..ea016e85d 100644
@@ -315,9 +315,9 @@ virtio_user_fill_intr_handle(struct virtio_user_dev *dev)
 
 static void

drivers/net/virtio/virtio_user/virtio_user_dev.c virtio_user_fill_intr_handle(struct virtio_user_dev *dev) · line 323

Quoted 10 lines
drivers/net/virtio/virtio_user/virtio_user_dev.c +3 -3
 virtio_user_mem_event_cb(enum rte_mem_event type __rte_unused,
-						 const void *addr __rte_unused,
-						 size_t len __rte_unused,
-						 void *arg)
+			 const void *addr,
+			 size_t len __rte_unused,
+			 void *arg)
 {
 	struct virtio_user_dev *dev = arg;
 	struct rte_memseg_list *msl;

David or Ferruh, could you pick it directly?
I don't plan to prepare a branch as I have this single patch for next -rc.

Thanks,
Maxime

#2 lore raw
Quoted 38 lines · Maxime Coquelin
Quoted 22 lines · Tiwei Bie

The "addr" param has been used since the event callbacks are enabled for external memory. So the "__rte_unused" should be dropped.

Besides, slightly refine the coding style by consistently assuming tabs are 8 characters.

Fixes f32c7c9de961 ("malloc: enable event callbacks for external memory")
---
 drivers/net/virtio/virtio_user/virtio_user_dev.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/virtio/virtio_user/virtio_user_dev.c +0 -0
index a4400e772..ea016e85d 100644
@@ -315,9 +315,9 @@ virtio_user_fill_intr_handle(struct virtio_user_dev *dev)
 
 static void

drivers/net/virtio/virtio_user/virtio_user_dev.c virtio_user_fill_intr_handle(struct virtio_user_dev *dev) · line 323

Quoted 10 lines
drivers/net/virtio/virtio_user/virtio_user_dev.c +3 -3
 virtio_user_mem_event_cb(enum rte_mem_event type __rte_unused,
-						 const void *addr __rte_unused,
-						 size_t len __rte_unused,
-						 void *arg)
+			 const void *addr,
+			 size_t len __rte_unused,
+			 void *arg)
 {
 	struct virtio_user_dev *dev = arg;
 	struct rte_memseg_list *msl;
Quoted 3 lines

David or Ferruh, could you pick it directly?
I don't plan to prepare a branch as I have this single patch for next -rc.

I can get it, but can you please confirm that it is safe to go to rc4, since already missed rc3?
Also can you please give your review/ack if you already reviewed.

#3 lore raw
Quoted 39 lines · Ferruh Yigit
Quoted 38 lines · Maxime Coquelin
Quoted 22 lines · Tiwei Bie

The "addr" param has been used since the event callbacks are enabled for external memory. So the "__rte_unused" should be dropped.

Besides, slightly refine the coding style by consistently assuming tabs are 8 characters.

Fixes f32c7c9de961 ("malloc: enable event callbacks for external memory")
---
  drivers/net/virtio/virtio_user/virtio_user_dev.c | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/virtio/virtio_user/virtio_user_dev.c +0 -0
index a4400e772..ea016e85d 100644
@@ -315,9 +315,9 @@ virtio_user_fill_intr_handle(struct virtio_user_dev *dev)
 
  static void

drivers/net/virtio/virtio_user/virtio_user_dev.c virtio_user_fill_intr_handle(struct virtio_user_dev *dev) · line 323

Quoted 10 lines
drivers/net/virtio/virtio_user/virtio_user_dev.c +3 -3
  virtio_user_mem_event_cb(enum rte_mem_event type __rte_unused,
-						 const void *addr __rte_unused,
-						 size_t len __rte_unused,
-						 void *arg)
+			 const void *addr,
+			 size_t len __rte_unused,
+			 void *arg)
  {
  	struct virtio_user_dev *dev = arg;
  	struct rte_memseg_list *msl;
Quoted 8 lines
Quoted 3 lines

David or Ferruh, could you pick it directly?
I don't plan to prepare a branch as I have this single patch for next -rc.

I can get it, but can you please confirm that it is safe to go to rc4, since already missed rc3?
Also can you please give your review/ack if you already reviewed.

I don't think there's anything unsafe about removing __rte_unused parameter :) The code itself hasn't changed.

Signature · 2 lines
Thanks,
Anatoly
#4 lore raw
Quoted 44 lines · Anatoly
Quoted 43 lines · Ferruh Yigit
Quoted 41 lines · Maxime Coquelin
Quoted 22 lines · Tiwei Bie

The "addr" param has been used since the event callbacks are enabled for external memory. So the "__rte_unused" should be dropped.

Besides, slightly refine the coding style by consistently assuming tabs are 8 characters.

Fixes f32c7c9de961 ("malloc: enable event callbacks for external memory")
---
  drivers/net/virtio/virtio_user/virtio_user_dev.c | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/virtio/virtio_user/virtio_user_dev.c +0 -0
index a4400e772..ea016e85d 100644
@@ -315,9 +315,9 @@ virtio_user_fill_intr_handle(struct virtio_user_dev *dev)
 
  static void

drivers/net/virtio/virtio_user/virtio_user_dev.c virtio_user_fill_intr_handle(struct virtio_user_dev *dev) · line 323

Quoted 10 lines
drivers/net/virtio/virtio_user/virtio_user_dev.c +3 -3
  virtio_user_mem_event_cb(enum rte_mem_event type __rte_unused,
-						 const void *addr __rte_unused,
-						 size_t len __rte_unused,
-						 void *arg)
+			 const void *addr,
+			 size_t len __rte_unused,
+			 void *arg)
  {
  	struct virtio_user_dev *dev = arg;
  	struct rte_memseg_list *msl;

David or Ferruh, could you pick it directly?
I don't plan to prepare a branch as I have this single patch for next -rc.

Quoted 8 lines
Quoted 4 lines

I can get it, but can you please confirm that it is safe to go to rc4, since already missed rc3?
Also can you please give your review/ack if you already reviewed.

I don't think there's anything unsafe about removing __rte_unused parameter :) The code itself hasn't changed.

I haven't checked the patch when I write it, agree it looks pretty safe to proceed.

Applied
#5 lore raw
In reply to Maxime Coquelin
Quoted 23 lines · Maxime Coquelin
Quoted 20 lines · Tiwei Bie

The "addr" param has been used since the event callbacks are enabled for external memory. So the "__rte_unused" should be dropped.

Besides, slightly refine the coding style by consistently assuming tabs are 8 characters.

Fixes f32c7c9de961 ("malloc: enable event callbacks for external memory")
---
 drivers/net/virtio/virtio_user/virtio_user_dev.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
drivers/net/virtio/virtio_user/virtio_user_dev.c +0 -0
index a4400e772..ea016e85d 100644
@@ -315,9 +315,9 @@ virtio_user_fill_intr_handle(struct virtio_user_dev *dev)
 
Quoted 15 lines

drivers/net/virtio/virtio_user/virtio_user_dev.c virtio_user_fill_intr_handle(struct virtio_user_dev *dev) · line 323

Quoted 12 lines
drivers/net/virtio/virtio_user/virtio_user_dev.c +3 -3
 static void
 virtio_user_mem_event_cb(enum rte_mem_event type __rte_unused,
-						 const void *addr __rte_unused,
-						 size_t len __rte_unused,
-						 void *arg)
+			 const void *addr,
+			 size_t len __rte_unused,
+			 void *arg)
 {
 	struct virtio_user_dev *dev = arg;
 	struct rte_memseg_list *msl;

Applied to dpdk-next-net/master, thanks.