* [dpdk-stable] patch 'net/cxgbe: fix init failure due to new flash parts' has been queued to LTS release 17.11.4
@ 2018-07-27 2:30 Yongseok Koh
2018-07-27 2:31 ` [dpdk-stable] patch 'net/thunderx: avoid sq door bell write on zero packet' " Yongseok Koh
` (8 more replies)
0 siblings, 9 replies; 10+ messages in thread
From: Yongseok Koh @ 2018-07-27 2:30 UTC (permalink / raw)
To: Rahul Lakkireddy; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to LTS release 17.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/18. So please
shout if anyone has objections.
Thanks.
Yongseok
---
>From bcca14b169feeda4d6dd750084afafd5a263838f Mon Sep 17 00:00:00 2001
From: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
Date: Mon, 9 Jul 2018 21:13:23 +0530
Subject: [PATCH] net/cxgbe: fix init failure due to new flash parts
[ upstream commit 9726c51df05037e505ffcb4aa2e6d4f0385c3ef1 ]
Add decode logic for new flash parts shipped with new Chelsio NICs
to fix initialization failure on these NICs.
Signed-off-by: Rahul Lakkireddy <rahul.lakkireddy@chelsio.com>
---
drivers/net/cxgbe/base/t4_hw.c | 97 ++++++++++++++++++++++++++++++++++++------
1 file changed, 84 insertions(+), 13 deletions(-)
diff --git a/drivers/net/cxgbe/base/t4_hw.c b/drivers/net/cxgbe/base/t4_hw.c
index 282e2e625..c3d46e021 100644
--- a/drivers/net/cxgbe/base/t4_hw.c
+++ b/drivers/net/cxgbe/base/t4_hw.c
@@ -4242,9 +4242,8 @@ struct flash_desc {
int t4_get_flash_params(struct adapter *adapter)
{
/*
- * Table for non-Numonix supported flash parts. Numonix parts are left
- * to the preexisting well-tested code. All flash parts have 64KB
- * sectors.
+ * Table for non-standard supported Flash parts. Note, all Flash
+ * parts must have 64KB sectors.
*/
static struct flash_desc supported_flash[] = {
{ 0x00150201, 4 << 20 }, /* Spansion 4MB S25FL032P */
@@ -4253,7 +4252,7 @@ int t4_get_flash_params(struct adapter *adapter)
int ret;
u32 flashid = 0;
unsigned int part, manufacturer;
- unsigned int density, size;
+ unsigned int density, size = 0;
/**
* Issue a Read ID Command to the Flash part. We decode supported
@@ -4268,6 +4267,9 @@ int t4_get_flash_params(struct adapter *adapter)
if (ret < 0)
return ret;
+ /**
+ * Check to see if it's one of our non-standard supported Flash parts.
+ */
for (part = 0; part < ARRAY_SIZE(supported_flash); part++) {
if (supported_flash[part].vendor_and_model_id == flashid) {
adapter->params.sf_size =
@@ -4278,6 +4280,15 @@ int t4_get_flash_params(struct adapter *adapter)
}
}
+ /**
+ * Decode Flash part size. The code below looks repetative with
+ * common encodings, but that's not guaranteed in the JEDEC
+ * specification for the Read JADEC ID command. The only thing that
+ * we're guaranteed by the JADEC specification is where the
+ * Manufacturer ID is in the returned result. After that each
+ * Manufacturer ~could~ encode things completely differently.
+ * Note, all Flash parts must have 64KB sectors.
+ */
manufacturer = flashid & 0xff;
switch (manufacturer) {
case 0x20: { /* Micron/Numonix */
@@ -4314,20 +4325,80 @@ int t4_get_flash_params(struct adapter *adapter)
case 0x22:
size = 1 << 28; /* 256MB */
break;
- default:
- dev_err(adapter, "Micron Flash Part has bad size, ID = %#x, Density code = %#x\n",
- flashid, density);
- return -EINVAL;
}
+ break;
+ }
- adapter->params.sf_size = size;
- adapter->params.sf_nsec = size / SF_SEC_SIZE;
+ case 0x9d: { /* ISSI -- Integrated Silicon Solution, Inc. */
+ /**
+ * This Density -> Size decoding table is taken from ISSI
+ * Data Sheets.
+ */
+ density = (flashid >> 16) & 0xff;
+ switch (density) {
+ case 0x16:
+ size = 1 << 25; /* 32MB */
+ break;
+ case 0x17:
+ size = 1 << 26; /* 64MB */
+ break;
+ }
break;
}
- default:
- dev_err(adapter, "Unsupported Flash Part, ID = %#x\n", flashid);
- return -EINVAL;
+
+ case 0xc2: { /* Macronix */
+ /**
+ * This Density -> Size decoding table is taken from Macronix
+ * Data Sheets.
+ */
+ density = (flashid >> 16) & 0xff;
+ switch (density) {
+ case 0x17:
+ size = 1 << 23; /* 8MB */
+ break;
+ case 0x18:
+ size = 1 << 24; /* 16MB */
+ break;
+ }
+ break;
+ }
+
+ case 0xef: { /* Winbond */
+ /**
+ * This Density -> Size decoding table is taken from Winbond
+ * Data Sheets.
+ */
+ density = (flashid >> 16) & 0xff;
+ switch (density) {
+ case 0x17:
+ size = 1 << 23; /* 8MB */
+ break;
+ case 0x18:
+ size = 1 << 24; /* 16MB */
+ break;
+ }
+ break;
}
+ }
+
+ /* If we didn't recognize the FLASH part, that's no real issue: the
+ * Hardware/Software contract says that Hardware will _*ALWAYS*_
+ * use a FLASH part which is at least 4MB in size and has 64KB
+ * sectors. The unrecognized FLASH part is likely to be much larger
+ * than 4MB, but that's all we really need.
+ */
+ if (size == 0) {
+ dev_warn(adapter,
+ "Unknown Flash Part, ID = %#x, assuming 4MB\n",
+ flashid);
+ size = 1 << 22;
+ }
+
+ /**
+ * Store decoded Flash size and fall through into vetting code.
+ */
+ adapter->params.sf_size = size;
+ adapter->params.sf_nsec = size / SF_SEC_SIZE;
found:
/*
--
2.11.0
^ permalink raw reply [flat|nested] 10+ messages in thread
* [dpdk-stable] patch 'net/thunderx: avoid sq door bell write on zero packet' has been queued to LTS release 17.11.4
2018-07-27 2:30 [dpdk-stable] patch 'net/cxgbe: fix init failure due to new flash parts' has been queued to LTS release 17.11.4 Yongseok Koh
@ 2018-07-27 2:31 ` Yongseok Koh
2018-07-27 2:31 ` [dpdk-stable] patch 'net/sfc: fix assert in set multicast address list' " Yongseok Koh
` (7 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Yongseok Koh @ 2018-07-27 2:31 UTC (permalink / raw)
To: Kiran Kumar; +Cc: Jerin Jacob, dpdk stable
Hi,
FYI, your patch has been queued to LTS release 17.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/18. So please
shout if anyone has objections.
Thanks.
Yongseok
---
>From 998da59e9e3cc06f565c648e9e870a93d0a7ad37 Mon Sep 17 00:00:00 2001
From: Kiran Kumar <kkokkilagadda@caviumnetworks.com>
Date: Wed, 11 Jul 2018 13:54:36 +0530
Subject: [PATCH] net/thunderx: avoid sq door bell write on zero packet
[ upstream commit 47636efe878dd8885bb47b142765c9ccae6babe3 ]
Avoid sq door bell write on zero packet case to reduce additional
traffic on register bus.
Fixes: 1c421f18e0 ("net/thunderx: add single and multi-segment Tx")
Signed-off-by: Kiran Kumar <kkokkilagadda@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
---
drivers/net/thunderx/nicvf_rxtx.c | 24 ++++++++++++++----------
1 file changed, 14 insertions(+), 10 deletions(-)
diff --git a/drivers/net/thunderx/nicvf_rxtx.c b/drivers/net/thunderx/nicvf_rxtx.c
index 9d69cf4e2..06cbc4635 100644
--- a/drivers/net/thunderx/nicvf_rxtx.c
+++ b/drivers/net/thunderx/nicvf_rxtx.c
@@ -190,12 +190,14 @@ nicvf_xmit_pkts(void *tx_queue, struct rte_mbuf **tx_pkts, uint16_t nb_pkts)
free_desc -= TX_DESC_PER_PKT;
}
- sq->tail = tail;
- sq->xmit_bufs += i;
- rte_wmb();
+ if (likely(i)) {
+ sq->tail = tail;
+ sq->xmit_bufs += i;
+ rte_wmb();
- /* Inform HW to xmit the packets */
- nicvf_addr_write(sq->sq_door, i * TX_DESC_PER_PKT);
+ /* Inform HW to xmit the packets */
+ nicvf_addr_write(sq->sq_door, i * TX_DESC_PER_PKT);
+ }
return i;
}
@@ -246,12 +248,14 @@ nicvf_xmit_pkts_multiseg(void *tx_queue, struct rte_mbuf **tx_pkts,
}
}
- sq->tail = tail;
- sq->xmit_bufs += used_bufs;
- rte_wmb();
+ if (likely(used_desc)) {
+ sq->tail = tail;
+ sq->xmit_bufs += used_bufs;
+ rte_wmb();
- /* Inform HW to xmit the packets */
- nicvf_addr_write(sq->sq_door, used_desc);
+ /* Inform HW to xmit the packets */
+ nicvf_addr_write(sq->sq_door, used_desc);
+ }
return i;
}
--
2.11.0
^ permalink raw reply [flat|nested] 10+ messages in thread
* [dpdk-stable] patch 'net/sfc: fix assert in set multicast address list' has been queued to LTS release 17.11.4
2018-07-27 2:30 [dpdk-stable] patch 'net/cxgbe: fix init failure due to new flash parts' has been queued to LTS release 17.11.4 Yongseok Koh
2018-07-27 2:31 ` [dpdk-stable] patch 'net/thunderx: avoid sq door bell write on zero packet' " Yongseok Koh
@ 2018-07-27 2:31 ` Yongseok Koh
2018-07-27 2:31 ` [dpdk-stable] patch 'net/mlx5: fix TCI mask filter' " Yongseok Koh
` (6 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Yongseok Koh @ 2018-07-27 2:31 UTC (permalink / raw)
To: Andrew Rybchenko; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to LTS release 17.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/18. So please
shout if anyone has objections.
Thanks.
Yongseok
---
>From ef2211c0c3b931b953c12f1ca5cd588ceb14faac Mon Sep 17 00:00:00 2001
From: Andrew Rybchenko <arybchenko@solarflare.com>
Date: Wed, 18 Jul 2018 08:40:06 +0100
Subject: [PATCH] net/sfc: fix assert in set multicast address list
[ upstream commit d0dcfe9824bb3386608834a1595f9154487ef24f ]
Return value equal to zero means success and really expected.
Fixes: 0fa0070e4391 ("net/sfc: support multicast addresses list controls")
Signed-off-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
drivers/net/sfc/sfc_ethdev.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
index fabcc3293..1b160b5e9 100644
--- a/drivers/net/sfc/sfc_ethdev.c
+++ b/drivers/net/sfc/sfc_ethdev.c
@@ -1030,7 +1030,7 @@ sfc_set_mc_addr_list(struct rte_eth_dev *dev, struct ether_addr *mc_addr_set,
if (rc != 0)
sfc_err(sa, "cannot set multicast address list (rc = %u)", rc);
- SFC_ASSERT(rc > 0);
+ SFC_ASSERT(rc >= 0);
return -rc;
}
--
2.11.0
^ permalink raw reply [flat|nested] 10+ messages in thread
* [dpdk-stable] patch 'net/mlx5: fix TCI mask filter' has been queued to LTS release 17.11.4
2018-07-27 2:30 [dpdk-stable] patch 'net/cxgbe: fix init failure due to new flash parts' has been queued to LTS release 17.11.4 Yongseok Koh
2018-07-27 2:31 ` [dpdk-stable] patch 'net/thunderx: avoid sq door bell write on zero packet' " Yongseok Koh
2018-07-27 2:31 ` [dpdk-stable] patch 'net/sfc: fix assert in set multicast address list' " Yongseok Koh
@ 2018-07-27 2:31 ` Yongseok Koh
2018-07-27 2:31 ` [dpdk-stable] patch 'ring: fix sign conversion warning' " Yongseok Koh
` (5 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Yongseok Koh @ 2018-07-27 2:31 UTC (permalink / raw)
To: Nelio Laranjeiro; +Cc: Yongseok Koh, Ori Kam, dpdk stable
Hi,
FYI, your patch has been queued to LTS release 17.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/18. So please
shout if anyone has objections.
Thanks.
Yongseok
---
>From 7ec0f5e413a8fc8526d2790c1c8889a0c881bc1e Mon Sep 17 00:00:00 2001
From: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Date: Mon, 23 Jul 2018 09:18:40 +0200
Subject: [PATCH] net/mlx5: fix TCI mask filter
[ upstream commit 2bc98393ac3ab980557187257369ec436a8f9eeb ]
In mlx5_traffic_enable() the TCI mask for the VLAN is wrong causing the
sub flow engine to reject the rule.
Fixes: 272733b5ebfd ("net/mlx5: use flow to enable unicast traffic")
Signed-off-by: Nelio Laranjeiro <nelio.laranjeiro@6wind.com>
Acked-by: Yongseok Koh <yskoh@mellanox.com>
Acked-by: Ori Kam <orika@mellanox.com>
---
drivers/net/mlx5/mlx5_trigger.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/drivers/net/mlx5/mlx5_trigger.c b/drivers/net/mlx5/mlx5_trigger.c
index 214543f84..49f1c1331 100644
--- a/drivers/net/mlx5/mlx5_trigger.c
+++ b/drivers/net/mlx5/mlx5_trigger.c
@@ -336,9 +336,8 @@ mlx5_traffic_enable(struct rte_eth_dev *dev)
struct rte_flow_item_vlan vlan_spec = {
.tci = rte_cpu_to_be_16(vlan),
};
- struct rte_flow_item_vlan vlan_mask = {
- .tci = 0xffff,
- };
+ struct rte_flow_item_vlan vlan_mask =
+ rte_flow_item_vlan_mask;
ret = mlx5_ctrl_flow_vlan(dev, &bcast, &bcast,
&vlan_spec, &vlan_mask);
@@ -375,9 +374,8 @@ mlx5_traffic_enable(struct rte_eth_dev *dev)
struct rte_flow_item_vlan vlan_spec = {
.tci = rte_cpu_to_be_16(vlan),
};
- struct rte_flow_item_vlan vlan_mask = {
- .tci = 0xffff,
- };
+ struct rte_flow_item_vlan vlan_mask =
+ rte_flow_item_vlan_mask;
ret = mlx5_ctrl_flow_vlan(dev, &unicast,
&unicast_mask,
--
2.11.0
^ permalink raw reply [flat|nested] 10+ messages in thread
* [dpdk-stable] patch 'ring: fix sign conversion warning' has been queued to LTS release 17.11.4
2018-07-27 2:30 [dpdk-stable] patch 'net/cxgbe: fix init failure due to new flash parts' has been queued to LTS release 17.11.4 Yongseok Koh
` (2 preceding siblings ...)
2018-07-27 2:31 ` [dpdk-stable] patch 'net/mlx5: fix TCI mask filter' " Yongseok Koh
@ 2018-07-27 2:31 ` Yongseok Koh
2018-07-27 2:31 ` [dpdk-stable] patch 'event/octeontx: remove unnecessary port start and stop' " Yongseok Koh
` (4 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Yongseok Koh @ 2018-07-27 2:31 UTC (permalink / raw)
To: Andy Green; +Cc: Olivier Matz, dpdk stable
Hi,
FYI, your patch has been queued to LTS release 17.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/18. So please
shout if anyone has objections.
Thanks.
Yongseok
---
>From 7e14077f261462bb2798f025f32738e8bbf5526a Mon Sep 17 00:00:00 2001
From: Andy Green <andy@warmcat.com>
Date: Mon, 28 May 2018 17:03:43 +0800
Subject: [PATCH] ring: fix sign conversion warning
[ upstream commit ea771bc2a96dd67102656ad81c68edeed5974179 ]
On gcc 5.4.0 / native aarch64 from Ubuntu 16.04:
In function '__rte_ring_do_dequeue':
rte_ring.h: 385:35: warning:
conversion to 'int' from 'unsigned int' may change
the sign of the result [-Wsign-conversion]
n = __rte_ring_move_cons_head(r, is_sc, n, behavior,
^
Fixes: e8ed5056c8 ("ring: remove signed type flip-flopping")
Signed-off-by: Andy Green <andy@warmcat.com>
Acked-by: Olivier Matz <olivier.matz@6wind.com>
---
lib/librte_ring/rte_ring.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/librte_ring/rte_ring.h b/lib/librte_ring/rte_ring.h
index 7069d52e2..fc433b050 100644
--- a/lib/librte_ring/rte_ring.h
+++ b/lib/librte_ring/rte_ring.h
@@ -582,7 +582,7 @@ __rte_ring_do_dequeue(struct rte_ring *r, void **obj_table,
uint32_t cons_head, cons_next;
uint32_t entries;
- n = __rte_ring_move_cons_head(r, is_sc, n, behavior,
+ n = __rte_ring_move_cons_head(r, (int)is_sc, n, behavior,
&cons_head, &cons_next, &entries);
if (n == 0)
goto end;
--
2.11.0
^ permalink raw reply [flat|nested] 10+ messages in thread
* [dpdk-stable] patch 'event/octeontx: remove unnecessary port start and stop' has been queued to LTS release 17.11.4
2018-07-27 2:30 [dpdk-stable] patch 'net/cxgbe: fix init failure due to new flash parts' has been queued to LTS release 17.11.4 Yongseok Koh
` (3 preceding siblings ...)
2018-07-27 2:31 ` [dpdk-stable] patch 'ring: fix sign conversion warning' " Yongseok Koh
@ 2018-07-27 2:31 ` Yongseok Koh
2018-07-27 2:31 ` [dpdk-stable] patch 'app/testpmd: fix buffer leak in TM command' " Yongseok Koh
` (3 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Yongseok Koh @ 2018-07-27 2:31 UTC (permalink / raw)
To: Pavan Nikhilesh; +Cc: Jerin Jacob, dpdk stable
Hi,
FYI, your patch has been queued to LTS release 17.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/18. So please
shout if anyone has objections.
Thanks.
Yongseok
---
>From c8e8eb6ffc515b0cec8388422a403618598d15cf Mon Sep 17 00:00:00 2001
From: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Date: Thu, 19 Jul 2018 17:17:47 +0530
Subject: [PATCH] event/octeontx: remove unnecessary port start and stop
[ upstream commit 56aa489e8ea48282f830b67f36772beaa478bade ]
Modifying port state is not necessary when starting/stopping Rx adapter
as it is same as starting/stopping ethdev.
Fixes: 45a914c5bd71 ("event/octeontx: support event Rx adapter")
Signed-off-by: Pavan Nikhilesh <pbhagavatula@caviumnetworks.com>
Acked-by: Jerin Jacob <jerin.jacob@caviumnetworks.com>
---
drivers/event/octeontx/ssovf_evdev.c | 14 ++------------
1 file changed, 2 insertions(+), 12 deletions(-)
diff --git a/drivers/event/octeontx/ssovf_evdev.c b/drivers/event/octeontx/ssovf_evdev.c
index 117b1453e..9a4689482 100644
--- a/drivers/event/octeontx/ssovf_evdev.c
+++ b/drivers/event/octeontx/ssovf_evdev.c
@@ -485,14 +485,9 @@ static int
ssovf_eth_rx_adapter_start(const struct rte_eventdev *dev,
const struct rte_eth_dev *eth_dev)
{
- int ret;
- const struct octeontx_nic *nic = eth_dev->data->dev_private;
RTE_SET_USED(dev);
+ RTE_SET_USED(eth_dev);
- ret = strncmp(eth_dev->data->name, "eth_octeontx", 12);
- if (ret)
- return 0;
- octeontx_pki_port_start(nic->port_id);
return 0;
}
@@ -501,14 +496,9 @@ static int
ssovf_eth_rx_adapter_stop(const struct rte_eventdev *dev,
const struct rte_eth_dev *eth_dev)
{
- int ret;
- const struct octeontx_nic *nic = eth_dev->data->dev_private;
RTE_SET_USED(dev);
+ RTE_SET_USED(eth_dev);
- ret = strncmp(eth_dev->data->name, "eth_octeontx", 12);
- if (ret)
- return 0;
- octeontx_pki_port_stop(nic->port_id);
return 0;
}
--
2.11.0
^ permalink raw reply [flat|nested] 10+ messages in thread
* [dpdk-stable] patch 'app/testpmd: fix buffer leak in TM command' has been queued to LTS release 17.11.4
2018-07-27 2:30 [dpdk-stable] patch 'net/cxgbe: fix init failure due to new flash parts' has been queued to LTS release 17.11.4 Yongseok Koh
` (4 preceding siblings ...)
2018-07-27 2:31 ` [dpdk-stable] patch 'event/octeontx: remove unnecessary port start and stop' " Yongseok Koh
@ 2018-07-27 2:31 ` Yongseok Koh
2018-07-27 2:31 ` [dpdk-stable] patch 'examples/exception_path: fix out-of-bounds read' " Yongseok Koh
` (2 subsequent siblings)
8 siblings, 0 replies; 10+ messages in thread
From: Yongseok Koh @ 2018-07-27 2:31 UTC (permalink / raw)
To: Nithin Dabilpuram; +Cc: Jasvinder Singh, dpdk stable
Hi,
FYI, your patch has been queued to LTS release 17.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/18. So please
shout if anyone has objections.
Thanks.
Yongseok
---
>From fd417e1a22343c69844cc70417e7a6e3cf6228c4 Mon Sep 17 00:00:00 2001
From: Nithin Dabilpuram <nithin.dabilpuram@caviumnetworks.com>
Date: Thu, 5 Jul 2018 11:15:46 +0530
Subject: [PATCH] app/testpmd: fix buffer leak in TM command
[ upstream commit b23ee8f2ac5de4a52573f844ba3c4f3261c3f7e7 ]
Free the buffer allocated for shared_shaper_id array in
case of configuration without shared shapers.
Fixes: 996cb153af06 ("app/testpmd: add commands for TM nodes and hierarchy commit")
Signed-off-by: Nithin Dabilpuram <nithin.dabilpuram@caviumnetworks.com>
Acked-by: Jasvinder Singh <jasvinder.singh@intel.com>
---
app/test-pmd/cmdline_tm.c | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/app/test-pmd/cmdline_tm.c b/app/test-pmd/cmdline_tm.c
index 803fae444..d40a427d8 100644
--- a/app/test-pmd/cmdline_tm.c
+++ b/app/test-pmd/cmdline_tm.c
@@ -1624,10 +1624,12 @@ static void cmd_add_port_tm_nonleaf_node_parsed(void *parsed_result,
np.shaper_profile_id = res->shaper_profile_id;
np.n_shared_shapers = n_shared_shapers;
- if (np.n_shared_shapers)
+ if (np.n_shared_shapers) {
np.shared_shaper_id = &shared_shaper_id[0];
- else
- np.shared_shaper_id = NULL;
+ } else {
+ free(shared_shaper_id);
+ shared_shaper_id = NULL;
+ }
np.nonleaf.n_sp_priorities = res->n_sp_priorities;
np.stats_mask = res->stats_mask;
@@ -1779,10 +1781,12 @@ static void cmd_add_port_tm_leaf_node_parsed(void *parsed_result,
np.shaper_profile_id = res->shaper_profile_id;
np.n_shared_shapers = n_shared_shapers;
- if (np.n_shared_shapers)
+ if (np.n_shared_shapers) {
np.shared_shaper_id = &shared_shaper_id[0];
- else
- np.shared_shaper_id = NULL;
+ } else {
+ free(shared_shaper_id);
+ shared_shaper_id = NULL;
+ }
np.leaf.cman = res->cman_mode;
np.leaf.wred.wred_profile_id = res->wred_profile_id;
--
2.11.0
^ permalink raw reply [flat|nested] 10+ messages in thread
* [dpdk-stable] patch 'examples/exception_path: fix out-of-bounds read' has been queued to LTS release 17.11.4
2018-07-27 2:30 [dpdk-stable] patch 'net/cxgbe: fix init failure due to new flash parts' has been queued to LTS release 17.11.4 Yongseok Koh
` (5 preceding siblings ...)
2018-07-27 2:31 ` [dpdk-stable] patch 'app/testpmd: fix buffer leak in TM command' " Yongseok Koh
@ 2018-07-27 2:31 ` Yongseok Koh
2018-07-27 2:31 ` [dpdk-stable] patch 'examples/l3fwd: remove useless include' " Yongseok Koh
2018-07-27 2:31 ` [dpdk-stable] patch 'bitrate: add sanity check on parameters' " Yongseok Koh
8 siblings, 0 replies; 10+ messages in thread
From: Yongseok Koh @ 2018-07-27 2:31 UTC (permalink / raw)
To: Bruce Richardson; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to LTS release 17.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/18. So please
shout if anyone has objections.
Thanks.
Yongseok
---
>From 9dad10ed6f2b99a79cdd2017431967171a718ce3 Mon Sep 17 00:00:00 2001
From: Bruce Richardson <bruce.richardson@intel.com>
Date: Mon, 16 Jul 2018 17:03:47 +0100
Subject: [PATCH] examples/exception_path: fix out-of-bounds read
[ upstream commit 4341adf272144689540a8e0f615f12eef7e21109 ]
When printing out stats from the exception_path app, all possible
lcore_ids are iterated. However, the app only supports up to 64 cores.
To prevent possible errors, and to remove coverity warnings,
explicitly check for out-of-range lcore ids before printing.
Coverity issue: 268335
Fixes: af75078fece3 ("first public release")
Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
---
examples/exception_path/main.c | 3 +++
1 file changed, 3 insertions(+)
diff --git a/examples/exception_path/main.c b/examples/exception_path/main.c
index dc1d9641d..ba081e332 100644
--- a/examples/exception_path/main.c
+++ b/examples/exception_path/main.c
@@ -164,6 +164,9 @@ print_stats(void)
" Lcore Port RX TX Dropped on TX\n"
"------- ------ ------------ ------------ ---------------\n");
RTE_LCORE_FOREACH(i) {
+ /* limit ourselves to application supported cores only */
+ if (i >= APP_MAX_LCORE)
+ break;
printf("%6u %7u %13"PRIu64" %13"PRIu64" %16"PRIu64"\n",
i, (unsigned)port_ids[i],
lcore_stats[i].rx, lcore_stats[i].tx,
--
2.11.0
^ permalink raw reply [flat|nested] 10+ messages in thread
* [dpdk-stable] patch 'examples/l3fwd: remove useless include' has been queued to LTS release 17.11.4
2018-07-27 2:30 [dpdk-stable] patch 'net/cxgbe: fix init failure due to new flash parts' has been queued to LTS release 17.11.4 Yongseok Koh
` (6 preceding siblings ...)
2018-07-27 2:31 ` [dpdk-stable] patch 'examples/exception_path: fix out-of-bounds read' " Yongseok Koh
@ 2018-07-27 2:31 ` Yongseok Koh
2018-07-27 2:31 ` [dpdk-stable] patch 'bitrate: add sanity check on parameters' " Yongseok Koh
8 siblings, 0 replies; 10+ messages in thread
From: Yongseok Koh @ 2018-07-27 2:31 UTC (permalink / raw)
To: Rami Rosen; +Cc: dpdk stable
Hi,
FYI, your patch has been queued to LTS release 17.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/18. So please
shout if anyone has objections.
Thanks.
Yongseok
---
>From bb32dc5b3909ca1ad8b67e3c4a8a2c0405c7f7c5 Mon Sep 17 00:00:00 2001
From: Rami Rosen <rami.rosen@intel.com>
Date: Mon, 2 Jul 2018 20:55:23 +0300
Subject: [PATCH] examples/l3fwd: remove useless include
[ upstream commit 8dedd737452fe2c8d74cce786aa6cc0ea91ed5c0 ]
This patch removes unneeded include of rte_mempool.h in
two modules in examples/l3fwd.
Fixes: 268888b5b020 ("examples/l3fwd: modularize")
Signed-off-by: Rami Rosen <rami.rosen@intel.com>
---
examples/l3fwd/l3fwd_em.c | 1 -
examples/l3fwd/l3fwd_lpm.c | 1 -
2 files changed, 2 deletions(-)
diff --git a/examples/l3fwd/l3fwd_em.c b/examples/l3fwd/l3fwd_em.c
index 2b7c173b1..cc7a8354d 100644
--- a/examples/l3fwd/l3fwd_em.c
+++ b/examples/l3fwd/l3fwd_em.c
@@ -47,7 +47,6 @@
#include <rte_debug.h>
#include <rte_ether.h>
#include <rte_ethdev.h>
-#include <rte_mempool.h>
#include <rte_cycles.h>
#include <rte_mbuf.h>
#include <rte_ip.h>
diff --git a/examples/l3fwd/l3fwd_lpm.c b/examples/l3fwd/l3fwd_lpm.c
index 2d0e17248..c185e5e13 100644
--- a/examples/l3fwd/l3fwd_lpm.c
+++ b/examples/l3fwd/l3fwd_lpm.c
@@ -46,7 +46,6 @@
#include <rte_debug.h>
#include <rte_ether.h>
#include <rte_ethdev.h>
-#include <rte_mempool.h>
#include <rte_cycles.h>
#include <rte_mbuf.h>
#include <rte_ip.h>
--
2.11.0
^ permalink raw reply [flat|nested] 10+ messages in thread
* [dpdk-stable] patch 'bitrate: add sanity check on parameters' has been queued to LTS release 17.11.4
2018-07-27 2:30 [dpdk-stable] patch 'net/cxgbe: fix init failure due to new flash parts' has been queued to LTS release 17.11.4 Yongseok Koh
` (7 preceding siblings ...)
2018-07-27 2:31 ` [dpdk-stable] patch 'examples/l3fwd: remove useless include' " Yongseok Koh
@ 2018-07-27 2:31 ` Yongseok Koh
8 siblings, 0 replies; 10+ messages in thread
From: Yongseok Koh @ 2018-07-27 2:31 UTC (permalink / raw)
To: Remy Horton; +Cc: Ferruh Yigit, dpdk stable
Hi,
FYI, your patch has been queued to LTS release 17.11.4
Note it hasn't been pushed to http://dpdk.org/browse/dpdk-stable yet.
It will be pushed if I get no objections before 07/28/18. So please
shout if anyone has objections.
Thanks.
Yongseok
---
>From 1c3504e59136e150e014a7cde1c31f2dbaeb7fa5 Mon Sep 17 00:00:00 2001
From: Remy Horton <remy.horton@intel.com>
Date: Thu, 12 Jul 2018 11:49:48 +0100
Subject: [PATCH] bitrate: add sanity check on parameters
[ upstream commit 90b0e5aaf4e3a56a4dac57aceb425930450cec85 ]
If rte_stats_bitrate_reg() or rte_stats_bitrate_calc() are
passed NULL as the parameter for the stats structure, the
result is a crash. Fixed by adding a sanity check that makes
sure the passed-in pointer is not NULL.
Fixes: 2ad7ba9a6567 ("bitrate: add bitrate statistics library")
Signed-off-by: Remy Horton <remy.horton@intel.com>
Acked-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
lib/librte_bitratestats/rte_bitrate.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/lib/librte_bitratestats/rte_bitrate.c b/lib/librte_bitratestats/rte_bitrate.c
index f373697a7..d39edbf62 100644
--- a/lib/librte_bitratestats/rte_bitrate.c
+++ b/lib/librte_bitratestats/rte_bitrate.c
@@ -76,6 +76,9 @@ rte_stats_bitrate_reg(struct rte_stats_bitrates *bitrate_data)
};
int return_value;
+ if (bitrate_data == NULL)
+ return -EINVAL;
+
return_value = rte_metrics_reg_names(&names[0], ARRAY_SIZE(names));
if (return_value >= 0)
bitrate_data->id_stats_set = return_value;
@@ -94,6 +97,9 @@ rte_stats_bitrate_calc(struct rte_stats_bitrates *bitrate_data,
const int64_t alpha_percent = 20;
uint64_t values[6];
+ if (bitrate_data == NULL)
+ return -EINVAL;
+
ret_code = rte_eth_stats_get(port_id, ð_stats);
if (ret_code != 0)
return ret_code;
--
2.11.0
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2018-07-27 2:31 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-07-27 2:30 [dpdk-stable] patch 'net/cxgbe: fix init failure due to new flash parts' has been queued to LTS release 17.11.4 Yongseok Koh
2018-07-27 2:31 ` [dpdk-stable] patch 'net/thunderx: avoid sq door bell write on zero packet' " Yongseok Koh
2018-07-27 2:31 ` [dpdk-stable] patch 'net/sfc: fix assert in set multicast address list' " Yongseok Koh
2018-07-27 2:31 ` [dpdk-stable] patch 'net/mlx5: fix TCI mask filter' " Yongseok Koh
2018-07-27 2:31 ` [dpdk-stable] patch 'ring: fix sign conversion warning' " Yongseok Koh
2018-07-27 2:31 ` [dpdk-stable] patch 'event/octeontx: remove unnecessary port start and stop' " Yongseok Koh
2018-07-27 2:31 ` [dpdk-stable] patch 'app/testpmd: fix buffer leak in TM command' " Yongseok Koh
2018-07-27 2:31 ` [dpdk-stable] patch 'examples/exception_path: fix out-of-bounds read' " Yongseok Koh
2018-07-27 2:31 ` [dpdk-stable] patch 'examples/l3fwd: remove useless include' " Yongseok Koh
2018-07-27 2:31 ` [dpdk-stable] patch 'bitrate: add sanity check on parameters' " Yongseok Koh
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).