DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [memnic PATCH 0/3] cosmetic improvements
@ 2014-01-24 16:18 Thomas Monjalon
  2014-01-24 16:18 ` [dpdk-dev] [memnic PATCH 1/3] pmd: remove symlink Thomas Monjalon
                   ` (2 more replies)
  0 siblings, 3 replies; 10+ messages in thread
From: Thomas Monjalon @ 2014-01-24 16:18 UTC (permalink / raw)
  To: dev

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

-- 
1.7.10.4

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [dpdk-dev] [memnic PATCH 1/3] pmd: remove symlink
  2014-01-24 16:18 [dpdk-dev] [memnic PATCH 0/3] cosmetic improvements Thomas Monjalon
@ 2014-01-24 16:18 ` Thomas Monjalon
  2014-01-30 11:22   ` Hiroshi Shimamoto
  2014-01-24 16:18 ` [dpdk-dev] [memnic PATCH 2/3] pmd: remove useless includes Thomas Monjalon
  2014-01-24 16:18 ` [dpdk-dev] [memnic PATCH 3/3] common: remove double underscores Thomas Monjalon
  2 siblings, 1 reply; 10+ messages in thread
From: Thomas Monjalon @ 2014-01-24 16:18 UTC (permalink / raw)
  To: dev

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

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
---
 pmd/Makefile |    2 +-
 pmd/memnic.h |    1 -
 2 files changed, 1 insertion(+), 2 deletions(-)
 delete mode 120000 pmd/memnic.h

diff --git a/pmd/Makefile b/pmd/Makefile
index a96e125..7f96af1 100644
--- a/pmd/Makefile
+++ b/pmd/Makefile
@@ -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
diff --git a/pmd/memnic.h b/pmd/memnic.h
deleted file mode 120000
index 5303ad4..0000000
--- a/pmd/memnic.h
+++ /dev/null
@@ -1 +0,0 @@
-../common/memnic.h
\ No newline at end of file
-- 
1.7.10.4

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [dpdk-dev] [memnic PATCH 2/3] pmd: remove useless includes
  2014-01-24 16:18 [dpdk-dev] [memnic PATCH 0/3] cosmetic improvements Thomas Monjalon
  2014-01-24 16:18 ` [dpdk-dev] [memnic PATCH 1/3] pmd: remove symlink Thomas Monjalon
@ 2014-01-24 16:18 ` Thomas Monjalon
  2014-01-30 11:30   ` Hiroshi Shimamoto
  2014-01-24 16:18 ` [dpdk-dev] [memnic PATCH 3/3] common: remove double underscores Thomas Monjalon
  2 siblings, 1 reply; 10+ messages in thread
From: Thomas Monjalon @ 2014-01-24 16:18 UTC (permalink / raw)
  To: dev

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
---
 common/memnic.h  |    4 ----
 pmd/pmd_memnic.c |    4 ----
 2 files changed, 8 deletions(-)

diff --git a/common/memnic.h b/common/memnic.h
index 6ff38a0..58dd019 100644
--- a/common/memnic.h
+++ b/common/memnic.h
@@ -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
diff --git a/pmd/pmd_memnic.c b/pmd/pmd_memnic.c
index d16eb0d..619941a 100644
--- a/pmd/pmd_memnic.c
+++ b/pmd/pmd_memnic.c
@@ -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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [dpdk-dev] [memnic PATCH 3/3] common: remove double underscores
  2014-01-24 16:18 [dpdk-dev] [memnic PATCH 0/3] cosmetic improvements Thomas Monjalon
  2014-01-24 16:18 ` [dpdk-dev] [memnic PATCH 1/3] pmd: remove symlink Thomas Monjalon
  2014-01-24 16:18 ` [dpdk-dev] [memnic PATCH 2/3] pmd: remove useless includes Thomas Monjalon
@ 2014-01-24 16:18 ` Thomas Monjalon
  2014-01-30 11:32   ` Hiroshi Shimamoto
  2 siblings, 1 reply; 10+ messages in thread
From: Thomas Monjalon @ 2014-01-24 16:18 UTC (permalink / raw)
  To: dev

The usage of double underscores is reserved.

Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
---
 common/memnic.h |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/common/memnic.h b/common/memnic.h
index 58dd019..e5b3c6f 100644
--- a/common/memnic.h
+++ b/common/memnic.h
@@ -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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [dpdk-dev] [memnic PATCH 1/3] pmd: remove symlink
  2014-01-24 16:18 ` [dpdk-dev] [memnic PATCH 1/3] pmd: remove symlink Thomas Monjalon
@ 2014-01-30 11:22   ` Hiroshi Shimamoto
  2014-02-04 13:09     ` Thomas Monjalon
  0 siblings, 1 reply; 10+ messages in thread
From: Hiroshi Shimamoto @ 2014-01-30 11:22 UTC (permalink / raw)
  To: Thomas Monjalon, dev

Hi,

> 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

> 
> Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
> ---
>  pmd/Makefile |    2 +-
>  pmd/memnic.h |    1 -
>  2 files changed, 1 insertion(+), 2 deletions(-)
>  delete mode 120000 pmd/memnic.h
> 
> diff --git a/pmd/Makefile b/pmd/Makefile
> index a96e125..7f96af1 100644
> --- a/pmd/Makefile
> +++ b/pmd/Makefile
> @@ -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
> diff --git a/pmd/memnic.h b/pmd/memnic.h
> deleted file mode 120000
> index 5303ad4..0000000
> --- a/pmd/memnic.h
> +++ /dev/null
> @@ -1 +0,0 @@
> -../common/memnic.h
> \ No newline at end of file
> --
> 1.7.10.4

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [dpdk-dev] [memnic PATCH 2/3] pmd: remove useless includes
  2014-01-24 16:18 ` [dpdk-dev] [memnic PATCH 2/3] pmd: remove useless includes Thomas Monjalon
@ 2014-01-30 11:30   ` Hiroshi Shimamoto
  2014-02-04 13:11     ` Thomas Monjalon
  0 siblings, 1 reply; 10+ messages in thread
From: Hiroshi Shimamoto @ 2014-01-30 11:30 UTC (permalink / raw)
  To: Thomas Monjalon, dev

> Subject: [memnic PATCH 2/3] pmd: remove useless includes
> 
> Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
> ---
>  common/memnic.h  |    4 ----
>  pmd/pmd_memnic.c |    4 ----
>  2 files changed, 8 deletions(-)
> 
> diff --git a/common/memnic.h b/common/memnic.h
> index 6ff38a0..58dd019 100644
> --- a/common/memnic.h
> +++ b/common/memnic.h
> @@ -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

>  #define MEMNIC_MAGIC		0x43494e76
>  #define MEMNIC_VERSION		0x00000001
>  #define MEMNIC_VERSION_1	0x00000001
> diff --git a/pmd/pmd_memnic.c b/pmd/pmd_memnic.c
> index d16eb0d..619941a 100644
> --- a/pmd/pmd_memnic.c
> +++ b/pmd/pmd_memnic.c
> @@ -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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [dpdk-dev] [memnic PATCH 3/3] common: remove double underscores
  2014-01-24 16:18 ` [dpdk-dev] [memnic PATCH 3/3] common: remove double underscores Thomas Monjalon
@ 2014-01-30 11:32   ` Hiroshi Shimamoto
  2014-02-04 13:11     ` Thomas Monjalon
  0 siblings, 1 reply; 10+ messages in thread
From: Hiroshi Shimamoto @ 2014-01-30 11:32 UTC (permalink / raw)
  To: Thomas Monjalon, dev

Looks fine to me.

thanks,
Hiroshi

> Subject: [memnic PATCH 3/3] common: remove double underscores
> 
> The usage of double underscores is reserved.
> 
> Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
> ---
>  common/memnic.h |    6 +++---
>  1 file changed, 3 insertions(+), 3 deletions(-)
> 
> diff --git a/common/memnic.h b/common/memnic.h
> index 58dd019..e5b3c6f 100644
> --- a/common/memnic.h
> +++ b/common/memnic.h
> @@ -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

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [dpdk-dev] [memnic PATCH 1/3] pmd: remove symlink
  2014-01-30 11:22   ` Hiroshi Shimamoto
@ 2014-02-04 13:09     ` Thomas Monjalon
  0 siblings, 0 replies; 10+ messages in thread
From: Thomas Monjalon @ 2014-02-04 13:09 UTC (permalink / raw)
  To: Hiroshi Shimamoto; +Cc: dev

30/01/2014 12:22, Hiroshi Shimamoto:
> > No need to have a symbolic link to a common file
> > when it can be simply included.
> 
> Looks fine to me.

Applied, thanks.

-- 
Thomas

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [dpdk-dev] [memnic PATCH 2/3] pmd: remove useless includes
  2014-01-30 11:30   ` Hiroshi Shimamoto
@ 2014-02-04 13:11     ` Thomas Monjalon
  0 siblings, 0 replies; 10+ messages in thread
From: Thomas Monjalon @ 2014-02-04 13:11 UTC (permalink / raw)
  To: Hiroshi Shimamoto; +Cc: dev

30/01/2014 12:30, Hiroshi Shimamoto:
> > Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
> 
> 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.

-- 
Thomas

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [dpdk-dev] [memnic PATCH 3/3] common: remove double underscores
  2014-01-30 11:32   ` Hiroshi Shimamoto
@ 2014-02-04 13:11     ` Thomas Monjalon
  0 siblings, 0 replies; 10+ messages in thread
From: Thomas Monjalon @ 2014-02-04 13:11 UTC (permalink / raw)
  To: Hiroshi Shimamoto; +Cc: dev

30/01/2014 12:32, Hiroshi Shimamoto:
> > The usage of double underscores is reserved.
> > 
> > Signed-off-by: Thomas Monjalon <thomas.monjalon@6wind.com>
> 
> Looks fine to me.

Applied, thanks.

-- 
Thomas

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2014-02-04 13:10 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-01-24 16:18 [dpdk-dev] [memnic PATCH 0/3] cosmetic improvements Thomas Monjalon
2014-01-24 16:18 ` [dpdk-dev] [memnic PATCH 1/3] pmd: remove symlink Thomas Monjalon
2014-01-30 11:22   ` Hiroshi Shimamoto
2014-02-04 13:09     ` Thomas Monjalon
2014-01-24 16:18 ` [dpdk-dev] [memnic PATCH 2/3] pmd: remove useless includes Thomas Monjalon
2014-01-30 11:30   ` Hiroshi Shimamoto
2014-02-04 13:11     ` Thomas Monjalon
2014-01-24 16:18 ` [dpdk-dev] [memnic PATCH 3/3] common: remove double underscores Thomas Monjalon
2014-01-30 11:32   ` Hiroshi Shimamoto
2014-02-04 13:11     ` Thomas Monjalon

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).