[dpdk-dev,v2] doc: add known issue with EAL argv

Message ID 1464013494-28484-1-git-send-email-jingjing.wu@intel.com (mailing list archive)
State Accepted, archived
Delegated to: Thomas Monjalon
Headers

Commit Message

Jingjing Wu May 23, 2016, 2:24 p.m. UTC
  This patch docs the issue on EAL argument that the last EAL
argument is replaced by program name in argv[].

Reported-by: Ziye Yang <ziye.yang@intel.com>
Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
---
 doc/guides/rel_notes/known_issues.rst | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)
  

Comments

John McNamara June 9, 2016, 8:58 a.m. UTC | #1
> -----Original Message-----
> From: dev [mailto:dev-bounces@dpdk.org] On Behalf Of Jingjing Wu
> Sent: Monday, May 23, 2016 3:25 PM
> To: david.marchand@6wind.com
> Cc: dev@dpdk.org; Wu, Jingjing <jingjing.wu@intel.com>; Yang, Ziye
> <ziye.yang@intel.com>; Richardson, Bruce <bruce.richardson@intel.com>
> Subject: [dpdk-dev] [PATCH v2] doc: add known issue with EAL argv
> 
> This patch docs the issue on EAL argument that the last EAL argument is
> replaced by program name in argv[].
> 
> Reported-by: Ziye Yang <ziye.yang@intel.com>
> Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>

Acked-by: John McNamara <john.mcnamara@intel.com>
  
Thomas Monjalon June 14, 2016, 2:58 p.m. UTC | #2
> > This patch docs the issue on EAL argument that the last EAL argument is
> > replaced by program name in argv[].
> > 
> > Reported-by: Ziye Yang <ziye.yang@intel.com>
> > Signed-off-by: Jingjing Wu <jingjing.wu@intel.com>
> 
> Acked-by: John McNamara <john.mcnamara@intel.com>

Applied (with small rst fix), thanks
  

Patch

diff --git a/doc/guides/rel_notes/known_issues.rst b/doc/guides/rel_notes/known_issues.rst
index 923a202..8ca2a86 100644
--- a/doc/guides/rel_notes/known_issues.rst
+++ b/doc/guides/rel_notes/known_issues.rst
@@ -618,3 +618,24 @@  DPDK may not build on some Intel CPUs using clang < 3.7.0
 
 **Driver/Module**:
    Environment Abstraction Layer (EAL).
+
+
+The last EAL argument is replaced by the program name in argv[]
+-----------------------------------------------------------
+
+**Description**:
+   The last EAL argument is replaced by program name in ``argv[]`` after ``eal_parse_args`` is called.
+   This is the intended behavior but it causes the pointer to the last EAL argument to be lost.
+
+**Implication**:
+  If the last EAL argument in ``argv[]`` is generated by a malloc function, changing it will cause memory
+  issues when freeing the argument.
+
+**Resolution/Workaround**:
+   An application should not consider the value in ``argv[]`` as unchanged.
+
+**Affected Environment/Platform**:
+   ALL.
+
+**Driver/Module**:
+   Environment Abstraction Layer (EAL).