Skip to contentSkip to conversation

cosmetic improvements

PATCH In review Thomas Monjalon 2 participants 10 messages Jan 24, 2014 – Feb 4, 2014 7 messages not in the archive

lore
Share & tools
lore
#0 lore raw

cover cosmetic improvements

These patches are some minor improvements for the new memnic PMD.

---

Thomas Monjalon (3):
pmd: remove symlink
pmd: remove useless includes
common: remove double underscores

 common/memnic.h  |   10 +++-------
 pmd/Makefile     |    2 +-
 pmd/memnic.h     |    1 -
 pmd/pmd_memnic.c |    4 ----
 4 files changed, 4 insertions(+), 13 deletions(-)
 delete mode 120000 pmd/memnic.h
Signature · 1 line
1.7.10.4

A message that is not in the archive (sent off-list or not yet received): cover.1390580092.git.thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org

#2 lore raw

PATCH 1/3 pmd: remove symlink

No need to have a symbolic link to a common file
when it can be simply included.

---
 pmd/Makefile |    2 +-
 pmd/memnic.h |    1 -
 2 files changed, 1 insertion(+), 2 deletions(-)
 delete mode 120000 pmd/memnic.h
pmd/Makefile +1 -1
index a96e125..7f96af1 100644
@@ -59,7 +59,7 @@ ifeq '$(RTE_INCLUDE)' ''
 endif
 	$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) \
 		-I$(RTE_INCLUDE) -include $(RTE_CONFIG) \
-		-o $@ $<
+		-I$S/../common -o $@ $<
 
 install : $(DESTDIR)$(libdir)/$(SOLIB)
 	install -D -m 644 $S/README.rst $(DESTDIR)$(docdir)/README.rst
pmd/memnic.h deleted +0 -1
deleted file mode 120000
index 5303ad4..0000000
@@ -1 +0,0 @@
-../common/memnic.h
\ No newline at end of file
Signature · 1 line
1.7.10.4

A message that is not in the archive (sent off-list or not yet received): 924a3a6605ea8909ad16a6d55a6fa179b516b319.1390580092.git.thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org

#4 lore raw

Re: [memnic PATCH 1/3] pmd: remove symlink

Hi,

Quoted 4 lines

Subject: [memnic PATCH 1/3] pmd: remove symlink

No need to have a symbolic link to a common file
when it can be simply included.

Looks fine to me.

When I prepared the file with a bit complex file path layout, easy to keep consistency.
Because you separated the code from DPDK vSwitch, there is no reason to do that.

thanks,
Hiroshi

Quoted 31 lines
---
 pmd/Makefile |    2 +-
 pmd/memnic.h |    1 -
 2 files changed, 1 insertion(+), 2 deletions(-)
 delete mode 120000 pmd/memnic.h
pmd/Makefile +1 -1
index a96e125..7f96af1 100644
@@ -59,7 +59,7 @@ ifeq '$(RTE_INCLUDE)' ''
 endif
 	$(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) \
 		-I$(RTE_INCLUDE) -include $(RTE_CONFIG) \
-		-o $@ $<
+		-I$S/../common -o $@ $<
 
 install : $(DESTDIR)$(libdir)/$(SOLIB)
 	install -D -m 644 $S/README.rst $(DESTDIR)$(docdir)/README.rst
pmd/memnic.h deleted +0 -2
deleted file mode 120000
index 5303ad4..0000000
@@ -1 +0,0 @@
-../common/memnic.h
\ No newline at end of file
--

1.7.10.4

A message that is not in the archive (sent off-list or not yet received): 7F861DC0615E0C47A872E6F3C5FCDDBD0102CF51-ZmjkEB1lVlLt6d3pZDjeaEtBU8KWyXPq@public.gmane.org

author Applied
#6 lore raw

Re: [memnic PATCH 1/3] pmd: remove symlink

30/01/2014 12:22, Hiroshi Shimamoto:

Quoted 4 lines
Quoted 2 lines

No need to have a symbolic link to a common file
when it can be simply included.

Looks fine to me.

Applied, thanks.

Signature · 1 line
Thomas
#7 lore raw

PATCH 2/3 pmd: remove useless includes

In reply to a message not in the archive
---
 common/memnic.h  |    4 ----
 pmd/pmd_memnic.c |    4 ----
 2 files changed, 8 deletions(-)
common/memnic.h +0 -4
index 6ff38a0..58dd019 100644
@@ -31,10 +31,6 @@
 #ifndef __MEMNIC_H__
 #define __MEMNIC_H__
 
-#ifndef __KERNEL__
-#include <stdint.h>
-#endif /* __KERNEL__ */
-
 #define MEMNIC_MAGIC		0x43494e76
 #define MEMNIC_VERSION		0x00000001
 #define MEMNIC_VERSION_1	0x00000001
pmd/pmd_memnic.c +0 -4
index d16eb0d..619941a 100644
@@ -30,18 +30,14 @@
  */
 
 #include <rte_ethdev.h>
-
 #include <rte_string_fns.h>
 #include <rte_malloc.h>
 #include <rte_memcpy.h>
-#include <rte_log.h>
 
 #include "memnic.h"
 
 #include <sys/mman.h>
-#include <sys/stat.h>
 #include <fcntl.h>
-#include <stdio.h>
 #include <unistd.h>
 #include <errno.h>
 
Signature · 1 line
1.7.10.4

A message that is not in the archive (sent off-list or not yet received): b96ee2cdb5460abdd4a59dadb8b1ebf8e886ffad.1390580092.git.thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org

#9 lore raw

Re: [memnic PATCH 2/3] pmd: remove useless includes

Quoted 13 lines

Subject: [memnic PATCH 2/3] pmd: remove useless includes

---
 common/memnic.h  |    4 ----
 pmd/pmd_memnic.c |    4 ----
 2 files changed, 8 deletions(-)
common/memnic.h +0 -0
index 6ff38a0..58dd019 100644

common/memnic.h line 37

Quoted 7 lines
common/memnic.h +0 -4
@@ -31,10 +31,6 @@
 #ifndef __MEMNIC_H__
 #define __MEMNIC_H__
 
-#ifndef __KERNEL__
-#include <stdint.h>
-#endif /* __KERNEL__ */
-

I'm not sure, but you're not seeing error, it's okay. I put it for uintxx_t series, originally.

others, fine to me.

thanks,
Hiroshi

Quoted 28 lines
common/memnic.h +0 -0
 #define MEMNIC_MAGIC		0x43494e76
 #define MEMNIC_VERSION		0x00000001
 #define MEMNIC_VERSION_1	0x00000001
pmd/pmd_memnic.c +0 -5
index d16eb0d..619941a 100644
@@ -30,18 +30,14 @@
  */
 
 #include <rte_ethdev.h>
-
 #include <rte_string_fns.h>
 #include <rte_malloc.h>
 #include <rte_memcpy.h>
-#include <rte_log.h>
 
 #include "memnic.h"
 
 #include <sys/mman.h>
-#include <sys/stat.h>
 #include <fcntl.h>
-#include <stdio.h>
 #include <unistd.h>
 #include <errno.h>
 
--

1.7.10.4

A message that is not in the archive (sent off-list or not yet received): 7F861DC0615E0C47A872E6F3C5FCDDBD0102D004-ZmjkEB1lVlLt6d3pZDjeaEtBU8KWyXPq@public.gmane.org

author Applied
#11 lore raw

Re: [memnic PATCH 2/3] pmd: remove useless includes

30/01/2014 12:30, Hiroshi Shimamoto:

Quoted 6 lines
Quoted 1 line

I'm not sure, but you're not seeing error, it's okay. I put it for uintxx_t series, originally.

others, fine to me.

Applied, thanks.

Signature · 1 line
Thomas
#12 lore raw

PATCH 3/3 common: remove double underscores

In reply to a message not in the archive

The usage of double underscores is reserved.

---
 common/memnic.h |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
common/memnic.h +3 -3
index 58dd019..e5b3c6f 100644
@@ -28,8 +28,8 @@
  *
  */
 
-#ifndef __MEMNIC_H__
-#define __MEMNIC_H__
+#ifndef MEMNIC_H
+#define MEMNIC_H
 
 #define MEMNIC_MAGIC		0x43494e76
 #define MEMNIC_VERSION		0x00000001
@@ -135,4 +135,4 @@ static inline uint32_t cmpxchg(uint32_t *dst, uint32_t old, uint32_t new)
 }
 #endif /* __KERNEL__ */
 
-#endif /* __MEMNIC_H__ */
+#endif /* MEMNIC_H */
Signature · 1 line
1.7.10.4

A message that is not in the archive (sent off-list or not yet received): ca51c424ebf2a88335901b811fb3842ba29d7fb1.1390580092.git.thomas.monjalon-pdR9zngts4EAvxtiuMwx3w@public.gmane.org

#14 lore raw

Re: [memnic PATCH 3/3] common: remove double underscores

Looks fine to me.

thanks,
Hiroshi

Quoted 32 lines

Subject: [memnic PATCH 3/3] common: remove double underscores

The usage of double underscores is reserved.

---
 common/memnic.h |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
common/memnic.h +3 -4
index 58dd019..e5b3c6f 100644
@@ -28,8 +28,8 @@
  *
  */
 
-#ifndef __MEMNIC_H__
-#define __MEMNIC_H__
+#ifndef MEMNIC_H
+#define MEMNIC_H
 
 #define MEMNIC_MAGIC		0x43494e76
 #define MEMNIC_VERSION		0x00000001
@@ -135,4 +135,4 @@ static inline uint32_t cmpxchg(uint32_t *dst, uint32_t old, uint32_t new)
 }
 #endif /* __KERNEL__ */
 
-#endif /* __MEMNIC_H__ */
+#endif /* MEMNIC_H */
--

1.7.10.4

A message that is not in the archive (sent off-list or not yet received): 7F861DC0615E0C47A872E6F3C5FCDDBD0102D04E-ZmjkEB1lVlLt6d3pZDjeaEtBU8KWyXPq@public.gmane.org

author Applied
#16 lore raw

Re: [memnic PATCH 3/3] common: remove double underscores

30/01/2014 12:32, Hiroshi Shimamoto:

Quoted 5 lines
Quoted 3 lines

The usage of double underscores is reserved.

Looks fine to me.

Applied, thanks.

Signature · 1 line
Thomas