* [dpdk-dev] [PATCH 1/2] lib/librte_port: modify source and sink port structure parameter
@ 2016-08-09 16:30 Jasvinder Singh
2016-08-09 16:30 ` [dpdk-dev] [PATCH 2/2] examples/ip_pipeline: modify source port default parameter Jasvinder Singh
2016-08-09 17:46 ` [dpdk-dev] [PATCH 1/2] lib/librte_port: modify source and sink port structure parameter Dumitrescu, Cristian
0 siblings, 2 replies; 5+ messages in thread
From: Jasvinder Singh @ 2016-08-09 16:30 UTC (permalink / raw)
To: dev; +Cc: cristian.dumitrescu
The ``file_name`` data type of ``struct rte_port_source_params`` and
``struct rte_port_sink_params`` is changed from `char *`` to ``const char *``.
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
---
doc/guides/rel_notes/deprecation.rst | 4 ----
doc/guides/rel_notes/release_16_11.rst | 3 ++-
lib/librte_port/rte_port_source_sink.h | 4 ++--
3 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/doc/guides/rel_notes/deprecation.rst b/doc/guides/rel_notes/deprecation.rst
index 96db661..f302af0 100644
--- a/doc/guides/rel_notes/deprecation.rst
+++ b/doc/guides/rel_notes/deprecation.rst
@@ -61,7 +61,3 @@ Deprecation Notices
renamed to something more consistent (net and crypto prefixes) in 16.11.
Some of these driver names are used publicly, to create virtual devices,
so a deprecation notice is necessary.
-
-* API will change for ``rte_port_source_params`` and ``rte_port_sink_params``
- structures. The member ``file_name`` data type will be changed from
- ``char *`` to ``const char *``. This change targets release 16.11.
diff --git a/doc/guides/rel_notes/release_16_11.rst b/doc/guides/rel_notes/release_16_11.rst
index 0b9022d..4f3d899 100644
--- a/doc/guides/rel_notes/release_16_11.rst
+++ b/doc/guides/rel_notes/release_16_11.rst
@@ -94,7 +94,8 @@ API Changes
This section is a comment. Make sure to start the actual text at the margin.
-* The log history is removed.
+* The ``file_name`` data type of ``struct rte_port_source_params`` and
+ ``struct rte_port_sink_params`` is changed from `char *`` to ``const char *``.
ABI Changes
diff --git a/lib/librte_port/rte_port_source_sink.h b/lib/librte_port/rte_port_source_sink.h
index 4db8a8a..be585a7 100644
--- a/lib/librte_port/rte_port_source_sink.h
+++ b/lib/librte_port/rte_port_source_sink.h
@@ -55,7 +55,7 @@ struct rte_port_source_params {
struct rte_mempool *mempool;
/** The full path of the pcap file to read packets from */
- char *file_name;
+ const char *file_name;
/** The number of bytes to be read from each packet in the
* pcap file. If this value is 0, the whole packet is read;
* if it is bigger than packet size, the generated packets
@@ -69,7 +69,7 @@ extern struct rte_port_in_ops rte_port_source_ops;
/** sink port parameters */
struct rte_port_sink_params {
/** The full path of the pcap file to write the packets to */
- char *file_name;
+ const char *file_name;
/** The maximum number of packets write to the pcap file.
* If this value is 0, the "infinite" write will be carried
* out.
--
2.5.5
^ permalink raw reply [flat|nested] 5+ messages in thread
* [dpdk-dev] [PATCH 2/2] examples/ip_pipeline: modify source port default parameter
2016-08-09 16:30 [dpdk-dev] [PATCH 1/2] lib/librte_port: modify source and sink port structure parameter Jasvinder Singh
@ 2016-08-09 16:30 ` Jasvinder Singh
2016-08-09 17:47 ` Dumitrescu, Cristian
2016-08-09 17:46 ` [dpdk-dev] [PATCH 1/2] lib/librte_port: modify source and sink port structure parameter Dumitrescu, Cristian
1 sibling, 1 reply; 5+ messages in thread
From: Jasvinder Singh @ 2016-08-09 16:30 UTC (permalink / raw)
To: dev; +Cc: cristian.dumitrescu
The default value of ``file_name`` parameter of the source port structure is
changed from ``NULL`` to ``./config/packets.pcap``.
Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
---
examples/ip_pipeline/app.h | 4 ++--
examples/ip_pipeline/config_parse.c | 6 +-----
2 files changed, 3 insertions(+), 7 deletions(-)
diff --git a/examples/ip_pipeline/app.h b/examples/ip_pipeline/app.h
index 6a6fdd9..4fdf0d9 100644
--- a/examples/ip_pipeline/app.h
+++ b/examples/ip_pipeline/app.h
@@ -182,14 +182,14 @@ struct app_pktq_source_params {
uint32_t parsed;
uint32_t mempool_id; /* Position in the app->mempool_params array */
uint32_t burst;
- char *file_name; /* Full path of PCAP file to be copied to mbufs */
+ const char *file_name; /* Full path of PCAP file to be copied to mbufs */
uint32_t n_bytes_per_pkt;
};
struct app_pktq_sink_params {
char *name;
uint8_t parsed;
- char *file_name; /* Full path of PCAP file to be copied to mbufs */
+ const char *file_name; /* Full path of PCAP file to be copied to mbufs */
uint32_t n_pkts_to_dump;
};
diff --git a/examples/ip_pipeline/config_parse.c b/examples/ip_pipeline/config_parse.c
index 8fe8157..48c9923 100644
--- a/examples/ip_pipeline/config_parse.c
+++ b/examples/ip_pipeline/config_parse.c
@@ -207,7 +207,7 @@ struct app_pktq_source_params default_source_params = {
.parsed = 0,
.mempool_id = 0,
.burst = 32,
- .file_name = NULL,
+ .file_name = "./config/packets.pcap",
.n_bytes_per_pkt = 0,
};
@@ -3083,10 +3083,6 @@ app_config_init(struct app_params *app)
memcpy(app, &app_params_default, sizeof(struct app_params));
- /* configure default_source_params */
- default_source_params.file_name = strdup("./config/packets.pcap");
- PARSE_ERROR_MALLOC(default_source_params.file_name != NULL);
-
for (i = 0; i < RTE_DIM(app->mempool_params); i++)
memcpy(&app->mempool_params[i],
&mempool_params_default,
--
2.5.5
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH 1/2] lib/librte_port: modify source and sink port structure parameter
2016-08-09 16:30 [dpdk-dev] [PATCH 1/2] lib/librte_port: modify source and sink port structure parameter Jasvinder Singh
2016-08-09 16:30 ` [dpdk-dev] [PATCH 2/2] examples/ip_pipeline: modify source port default parameter Jasvinder Singh
@ 2016-08-09 17:46 ` Dumitrescu, Cristian
1 sibling, 0 replies; 5+ messages in thread
From: Dumitrescu, Cristian @ 2016-08-09 17:46 UTC (permalink / raw)
To: Singh, Jasvinder, dev
> -----Original Message-----
> From: Singh, Jasvinder
> Sent: Tuesday, August 9, 2016 9:31 AM
> To: dev@dpdk.org
> Cc: Dumitrescu, Cristian <cristian.dumitrescu@intel.com>
> Subject: [PATCH 1/2] lib/librte_port: modify source and sink port structure
> parameter
>
> The ``file_name`` data type of ``struct rte_port_source_params`` and
> ``struct rte_port_sink_params`` is changed from `char *`` to ``const char *``.
>
> Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
> ---
> doc/guides/rel_notes/deprecation.rst | 4 ----
> doc/guides/rel_notes/release_16_11.rst | 3 ++-
> lib/librte_port/rte_port_source_sink.h | 4 ++--
> 3 files changed, 4 insertions(+), 7 deletions(-)
>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH 2/2] examples/ip_pipeline: modify source port default parameter
2016-08-09 16:30 ` [dpdk-dev] [PATCH 2/2] examples/ip_pipeline: modify source port default parameter Jasvinder Singh
@ 2016-08-09 17:47 ` Dumitrescu, Cristian
2016-10-12 20:21 ` Thomas Monjalon
0 siblings, 1 reply; 5+ messages in thread
From: Dumitrescu, Cristian @ 2016-08-09 17:47 UTC (permalink / raw)
To: Singh, Jasvinder, dev
> -----Original Message-----
> From: Singh, Jasvinder
> Sent: Tuesday, August 9, 2016 9:31 AM
> To: dev@dpdk.org
> Cc: Dumitrescu, Cristian <cristian.dumitrescu@intel.com>
> Subject: [PATCH 2/2] examples/ip_pipeline: modify source port default
> parameter
>
> The default value of ``file_name`` parameter of the source port structure is
> changed from ``NULL`` to ``./config/packets.pcap``.
>
> Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
> ---
> examples/ip_pipeline/app.h | 4 ++--
> examples/ip_pipeline/config_parse.c | 6 +-----
> 2 files changed, 3 insertions(+), 7 deletions(-)
>
Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [dpdk-dev] [PATCH 2/2] examples/ip_pipeline: modify source port default parameter
2016-08-09 17:47 ` Dumitrescu, Cristian
@ 2016-10-12 20:21 ` Thomas Monjalon
0 siblings, 0 replies; 5+ messages in thread
From: Thomas Monjalon @ 2016-10-12 20:21 UTC (permalink / raw)
To: Singh, Jasvinder; +Cc: dev, Dumitrescu, Cristian
> > The default value of ``file_name`` parameter of the source port structure is
> > changed from ``NULL`` to ``./config/packets.pcap``.
> >
> > Signed-off-by: Jasvinder Singh <jasvinder.singh@intel.com>
>
> Acked-by: Cristian Dumitrescu <cristian.dumitrescu@intel.com>
Series applied, thanks
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2016-10-12 20:21 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-08-09 16:30 [dpdk-dev] [PATCH 1/2] lib/librte_port: modify source and sink port structure parameter Jasvinder Singh
2016-08-09 16:30 ` [dpdk-dev] [PATCH 2/2] examples/ip_pipeline: modify source port default parameter Jasvinder Singh
2016-08-09 17:47 ` Dumitrescu, Cristian
2016-10-12 20:21 ` Thomas Monjalon
2016-08-09 17:46 ` [dpdk-dev] [PATCH 1/2] lib/librte_port: modify source and sink port structure parameter Dumitrescu, Cristian
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).