[v2,8/8] examples: remove unnecessary include of atomic
Checks
Commit Message
Remove the unnecessary header file rte_atomic.h
included in example module.
Signed-off-by: Joyce Kong <joyce.kong@arm.com>
Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
---
examples/bond/main.c | 1 -
examples/ip_fragmentation/main.c | 1 -
examples/ip_reassembly/main.c | 1 -
examples/ipsec-secgw/ipsec-secgw.c | 1 -
examples/ipv4_multicast/main.c | 1 -
examples/l2fwd-crypto/main.c | 1 -
examples/l2fwd-event/l2fwd_common.h | 1 -
examples/l2fwd-event/l2fwd_event.c | 1 -
examples/l2fwd-keepalive/main.c | 1 -
examples/l2fwd/main.c | 1 -
examples/l3fwd-acl/main.c | 1 -
examples/l3fwd-power/main.c | 1 -
examples/l3fwd/main.c | 1 -
examples/link_status_interrupt/main.c | 1 -
examples/multi_process/client_server_mp/mp_client/client.c | 1 -
examples/multi_process/client_server_mp/mp_server/init.c | 1 -
examples/multi_process/simple_mp/main.c | 1 -
examples/multi_process/simple_mp/mp_commands.c | 1 -
examples/multi_process/symmetric_mp/main.c | 1 -
examples/server_node_efd/node/node.c | 1 -
examples/server_node_efd/server/init.c | 1 -
examples/vhost_blk/blk.c | 1 -
examples/vhost_blk/vhost_blk.c | 1 -
examples/vm_power_manager/channel_manager.c | 1 -
examples/vm_power_manager/channel_manager.h | 1 -
examples/vmdq/main.c | 1 -
examples/vmdq_dcb/main.c | 1 -
27 files changed, 27 deletions(-)
Comments
Hi Joyce,
> -----Original Message-----
> From: Joyce Kong <joyce.kong@arm.com>
> Sent: Monday, August 23, 2021 1:50 PM
> To: Chas Williams <chas3@att.com>; Min Hu (Connor) <humin29@huawei.com>;
> Ananyev, Konstantin <konstantin.ananyev@intel.com>; Nicolau, Radu
> <radu.nicolau@intel.com>; Akhil Goyal <gakhil@marvell.com>; Doherty, Declan
> <declan.doherty@intel.com>; Sunil Kumar Kori <skori@marvell.com>; Pavan
> Nikhilesh <pbhagavatula@marvell.com>; Richardson, Bruce
> <bruce.richardson@intel.com>; Hunt, David <david.hunt@intel.com>; Burakov,
> Anatoly <anatoly.burakov@intel.com>; Marohn, Byron <byron.marohn@intel.com>;
> Wang, Yipeng1 <yipeng1.wang@intel.com>; Maxime Coquelin
> <maxime.coquelin@redhat.com>; Xia, Chenbo <chenbo.xia@intel.com>
> Cc: dev@dpdk.org; thomas@monjalon.net; david.marchand@redhat.com;
> honnappa.nagarahalli@arm.com; ruifeng.wang@arm.com; nd@arm.com
> Subject: [PATCH v2 8/8] examples: remove unnecessary include of atomic
>
> Remove the unnecessary header file rte_atomic.h
> included in example module.
>
> Signed-off-by: Joyce Kong <joyce.kong@arm.com>
> Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
> ---
> examples/bond/main.c | 1 -
> examples/ip_fragmentation/main.c | 1 -
> examples/ip_reassembly/main.c | 1 -
> examples/ipsec-secgw/ipsec-secgw.c | 1 -
> examples/ipv4_multicast/main.c | 1 -
> examples/l2fwd-crypto/main.c | 1 -
> examples/l2fwd-event/l2fwd_common.h | 1 -
> examples/l2fwd-event/l2fwd_event.c | 1 -
> examples/l2fwd-keepalive/main.c | 1 -
> examples/l2fwd/main.c | 1 -
> examples/l3fwd-acl/main.c | 1 -
> examples/l3fwd-power/main.c | 1 -
> examples/l3fwd/main.c | 1 -
> examples/link_status_interrupt/main.c | 1 -
> examples/multi_process/client_server_mp/mp_client/client.c | 1 -
> examples/multi_process/client_server_mp/mp_server/init.c | 1 -
> examples/multi_process/simple_mp/main.c | 1 -
> examples/multi_process/simple_mp/mp_commands.c | 1 -
> examples/multi_process/symmetric_mp/main.c | 1 -
> examples/server_node_efd/node/node.c | 1 -
> examples/server_node_efd/server/init.c | 1 -
> examples/vhost_blk/blk.c | 1 -
> examples/vhost_blk/vhost_blk.c | 1 -
In vhost_blk.c, some atomic API is used (rte_atomic_thread_fence).
Although it compiles well, I think it's better to keep the include
rather than depending on other header includes rte_atomic.h.
Thanks,
Chenbo
> examples/vm_power_manager/channel_manager.c | 1 -
> examples/vm_power_manager/channel_manager.h | 1 -
> examples/vmdq/main.c | 1 -
> examples/vmdq_dcb/main.c | 1 -
> 27 files changed, 27 deletions(-)
<snip>
> Hi Joyce,
>
> > -----Original Message-----
> > From: Joyce Kong <joyce.kong@arm.com>
> > Sent: Monday, August 23, 2021 1:50 PM
> > To: Chas Williams <chas3@att.com>; Min Hu (Connor)
> > <humin29@huawei.com>; Ananyev, Konstantin
> > <konstantin.ananyev@intel.com>; Nicolau, Radu
> > <radu.nicolau@intel.com>; Akhil Goyal <gakhil@marvell.com>; Doherty,
> > Declan <declan.doherty@intel.com>; Sunil Kumar Kori
> > <skori@marvell.com>; Pavan Nikhilesh <pbhagavatula@marvell.com>;
> > Richardson, Bruce <bruce.richardson@intel.com>; Hunt, David
> > <david.hunt@intel.com>; Burakov, Anatoly <anatoly.burakov@intel.com>;
> > Marohn, Byron <byron.marohn@intel.com>; Wang, Yipeng1
> > <yipeng1.wang@intel.com>; Maxime Coquelin
> > <maxime.coquelin@redhat.com>; Xia, Chenbo <chenbo.xia@intel.com>
> > Cc: dev@dpdk.org; thomas@monjalon.net; david.marchand@redhat.com;
> > honnappa.nagarahalli@arm.com; ruifeng.wang@arm.com; nd@arm.com
> > Subject: [PATCH v2 8/8] examples: remove unnecessary include of atomic
> >
> > Remove the unnecessary header file rte_atomic.h included in example
> > module.
> >
> > Signed-off-by: Joyce Kong <joyce.kong@arm.com>
> > Reviewed-by: Ruifeng Wang <ruifeng.wang@arm.com>
> > ---
> > examples/bond/main.c | 1 -
> > examples/ip_fragmentation/main.c | 1 -
> > examples/ip_reassembly/main.c | 1 -
> > examples/ipsec-secgw/ipsec-secgw.c | 1 -
> > examples/ipv4_multicast/main.c | 1 -
> > examples/l2fwd-crypto/main.c | 1 -
> > examples/l2fwd-event/l2fwd_common.h | 1 -
> > examples/l2fwd-event/l2fwd_event.c | 1 -
> > examples/l2fwd-keepalive/main.c | 1 -
> > examples/l2fwd/main.c | 1 -
> > examples/l3fwd-acl/main.c | 1 -
> > examples/l3fwd-power/main.c | 1 -
> > examples/l3fwd/main.c | 1 -
> > examples/link_status_interrupt/main.c | 1 -
> > examples/multi_process/client_server_mp/mp_client/client.c | 1 -
> > examples/multi_process/client_server_mp/mp_server/init.c | 1 -
> > examples/multi_process/simple_mp/main.c | 1 -
> > examples/multi_process/simple_mp/mp_commands.c | 1 -
> > examples/multi_process/symmetric_mp/main.c | 1 -
> > examples/server_node_efd/node/node.c | 1 -
> > examples/server_node_efd/server/init.c | 1 -
> > examples/vhost_blk/blk.c | 1 -
> > examples/vhost_blk/vhost_blk.c | 1 -
>
> In vhost_blk.c, some atomic API is used (rte_atomic_thread_fence).
> Although it compiles well, I think it's better to keep the include rather than
> depending on other header includes rte_atomic.h.
>
> Thanks,
> Chenbo
>
Hi Chenbo, thanks for your suggestion, I'll rework with this patch in next version.
Joyce
> > examples/vm_power_manager/channel_manager.c | 1 -
> > examples/vm_power_manager/channel_manager.h | 1 -
> > examples/vmdq/main.c | 1 -
> > examples/vmdq_dcb/main.c | 1 -
> > 27 files changed, 27 deletions(-)
@@ -24,7 +24,6 @@
#include <rte_memcpy.h>
#include <rte_eal.h>
#include <rte_launch.h>
-#include <rte_atomic.h>
#include <rte_cycles.h>
#include <rte_prefetch.h>
#include <rte_lcore.h>
@@ -21,7 +21,6 @@
#include <rte_memcpy.h>
#include <rte_eal.h>
#include <rte_launch.h>
-#include <rte_atomic.h>
#include <rte_cycles.h>
#include <rte_prefetch.h>
#include <rte_lcore.h>
@@ -22,7 +22,6 @@
#include <rte_memcpy.h>
#include <rte_eal.h>
#include <rte_launch.h>
-#include <rte_atomic.h>
#include <rte_cycles.h>
#include <rte_prefetch.h>
#include <rte_lcore.h>
@@ -24,7 +24,6 @@
#include <rte_log.h>
#include <rte_eal.h>
#include <rte_launch.h>
-#include <rte_atomic.h>
#include <rte_cycles.h>
#include <rte_prefetch.h>
#include <rte_lcore.h>
@@ -20,7 +20,6 @@
#include <rte_memcpy.h>
#include <rte_eal.h>
#include <rte_launch.h>
-#include <rte_atomic.h>
#include <rte_cycles.h>
#include <rte_prefetch.h>
#include <rte_lcore.h>
@@ -20,7 +20,6 @@
#include <unistd.h>
#include <rte_string_fns.h>
-#include <rte_atomic.h>
#include <rte_branch_prediction.h>
#include <rte_common.h>
#include <rte_cryptodev.h>
@@ -27,7 +27,6 @@
#include <rte_memcpy.h>
#include <rte_eal.h>
#include <rte_launch.h>
-#include <rte_atomic.h>
#include <rte_cycles.h>
#include <rte_prefetch.h>
#include <rte_lcore.h>
@@ -5,7 +5,6 @@
#include <stdbool.h>
#include <getopt.h>
-#include <rte_atomic.h>
#include <rte_cycles.h>
#include <rte_ethdev.h>
#include <rte_eventdev.h>
@@ -24,7 +24,6 @@
#include <rte_memcpy.h>
#include <rte_eal.h>
#include <rte_launch.h>
-#include <rte_atomic.h>
#include <rte_cycles.h>
#include <rte_prefetch.h>
#include <rte_lcore.h>
@@ -24,7 +24,6 @@
#include <rte_memcpy.h>
#include <rte_eal.h>
#include <rte_launch.h>
-#include <rte_atomic.h>
#include <rte_cycles.h>
#include <rte_prefetch.h>
#include <rte_lcore.h>
@@ -20,7 +20,6 @@
#include <rte_memcpy.h>
#include <rte_eal.h>
#include <rte_launch.h>
-#include <rte_atomic.h>
#include <rte_cycles.h>
#include <rte_prefetch.h>
#include <rte_lcore.h>
@@ -24,7 +24,6 @@
#include <rte_memcpy.h>
#include <rte_eal.h>
#include <rte_launch.h>
-#include <rte_atomic.h>
#include <rte_cycles.h>
#include <rte_prefetch.h>
#include <rte_lcore.h>
@@ -24,7 +24,6 @@
#include <rte_memcpy.h>
#include <rte_eal.h>
#include <rte_launch.h>
-#include <rte_atomic.h>
#include <rte_cycles.h>
#include <rte_prefetch.h>
#include <rte_lcore.h>
@@ -22,7 +22,6 @@
#include <rte_memcpy.h>
#include <rte_eal.h>
#include <rte_launch.h>
-#include <rte_atomic.h>
#include <rte_cycles.h>
#include <rte_prefetch.h>
#include <rte_lcore.h>
@@ -17,7 +17,6 @@
#include <rte_memory.h>
#include <rte_memzone.h>
#include <rte_eal.h>
-#include <rte_atomic.h>
#include <rte_branch_prediction.h>
#include <rte_log.h>
#include <rte_per_lcore.h>
@@ -15,7 +15,6 @@
#include <rte_memzone.h>
#include <rte_eal.h>
#include <rte_byteorder.h>
-#include <rte_atomic.h>
#include <rte_launch.h>
#include <rte_per_lcore.h>
#include <rte_lcore.h>
@@ -30,7 +30,6 @@
#include <rte_per_lcore.h>
#include <rte_lcore.h>
#include <rte_debug.h>
-#include <rte_atomic.h>
#include <rte_branch_prediction.h>
#include <rte_ring.h>
#include <rte_log.h>
@@ -14,7 +14,6 @@
#include <rte_common.h>
#include <rte_memory.h>
#include <rte_eal.h>
-#include <rte_atomic.h>
#include <rte_branch_prediction.h>
#include <rte_launch.h>
#include <rte_log.h>
@@ -31,7 +31,6 @@
#include <rte_eal.h>
#include <rte_per_lcore.h>
#include <rte_lcore.h>
-#include <rte_atomic.h>
#include <rte_branch_prediction.h>
#include <rte_debug.h>
#include <rte_interrupts.h>
@@ -17,7 +17,6 @@
#include <rte_memory.h>
#include <rte_memzone.h>
#include <rte_eal.h>
-#include <rte_atomic.h>
#include <rte_branch_prediction.h>
#include <rte_log.h>
#include <rte_per_lcore.h>
@@ -15,7 +15,6 @@
#include <rte_memzone.h>
#include <rte_eal.h>
#include <rte_byteorder.h>
-#include <rte_atomic.h>
#include <rte_launch.h>
#include <rte_per_lcore.h>
#include <rte_lcore.h>
@@ -15,7 +15,6 @@
#include <string.h>
#include <stddef.h>
-#include <rte_atomic.h>
#include <rte_cycles.h>
#include <rte_log.h>
#include <rte_malloc.h>
@@ -17,7 +17,6 @@
#include <linux/virtio_blk.h>
#include <linux/virtio_ring.h>
-#include <rte_atomic.h>
#include <rte_cycles.h>
#include <rte_log.h>
#include <rte_malloc.h>
@@ -21,7 +21,6 @@
#include <rte_memory.h>
#include <rte_mempool.h>
#include <rte_log.h>
-#include <rte_atomic.h>
#include <rte_spinlock.h>
#include <libvirt/libvirt.h>
@@ -11,7 +11,6 @@ extern "C" {
#include <linux/limits.h>
#include <linux/un.h>
-#include <rte_atomic.h>
#include <stdbool.h>
/* Maximum name length including '\0' terminator */
@@ -20,7 +20,6 @@
#include <rte_memcpy.h>
#include <rte_eal.h>
#include <rte_launch.h>
-#include <rte_atomic.h>
#include <rte_cycles.h>
#include <rte_prefetch.h>
#include <rte_lcore.h>
@@ -20,7 +20,6 @@
#include <rte_memcpy.h>
#include <rte_eal.h>
#include <rte_launch.h>
-#include <rte_atomic.h>
#include <rte_cycles.h>
#include <rte_prefetch.h>
#include <rte_lcore.h>