* [dpdk-dev] [PATCH] app/testpmd: fix possible uninitialized variable usage
@ 2018-10-28 2:16 Ferruh Yigit
2018-10-30 10:59 ` Iremonger, Bernard
0 siblings, 1 reply; 3+ messages in thread
From: Ferruh Yigit @ 2018-10-28 2:16 UTC (permalink / raw)
To: Wenzhuo Lu, Jingjing Wu, Bernard Iremonger; +Cc: dev, Ferruh Yigit, stable
ol_flags can be wrong if DEV_TX_OFFLOAD_VLAN_INSERT is not set in
tx_offloads
Fixes: 3eecba267cd6 ("app/testpmd: cleanup internal Tx offloads flags field")
Cc: stable@dpdk.org
Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
app/test-pmd/flowgen.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/app/test-pmd/flowgen.c b/app/test-pmd/flowgen.c
index 0531b5d27..3214e3c95 100644
--- a/app/test-pmd/flowgen.c
+++ b/app/test-pmd/flowgen.c
@@ -123,7 +123,7 @@ pkt_burst_flow_gen(struct fwd_stream *fs)
struct ipv4_hdr *ip_hdr;
struct udp_hdr *udp_hdr;
uint16_t vlan_tci, vlan_tci_outer;
- uint64_t ol_flags;
+ uint64_t ol_flags = 0;
uint16_t nb_rx;
uint16_t nb_tx;
uint16_t nb_pkt;
@@ -155,7 +155,7 @@ pkt_burst_flow_gen(struct fwd_stream *fs)
tx_offloads = ports[fs->tx_port].dev_conf.txmode.offloads;
if (tx_offloads & DEV_TX_OFFLOAD_VLAN_INSERT)
- ol_flags = PKT_TX_VLAN_PKT;
+ ol_flags |= PKT_TX_VLAN_PKT;
if (tx_offloads & DEV_TX_OFFLOAD_QINQ_INSERT)
ol_flags |= PKT_TX_QINQ_PKT;
if (tx_offloads & DEV_TX_OFFLOAD_MACSEC_INSERT)
--
2.17.2
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] app/testpmd: fix possible uninitialized variable usage
2018-10-28 2:16 [dpdk-dev] [PATCH] app/testpmd: fix possible uninitialized variable usage Ferruh Yigit
@ 2018-10-30 10:59 ` Iremonger, Bernard
2018-11-02 20:35 ` Ferruh Yigit
0 siblings, 1 reply; 3+ messages in thread
From: Iremonger, Bernard @ 2018-10-30 10:59 UTC (permalink / raw)
To: Yigit, Ferruh, Lu, Wenzhuo, Wu, Jingjing; +Cc: dev, stable
> -----Original Message-----
> From: Yigit, Ferruh
> Sent: Sunday, October 28, 2018 2:17 AM
> To: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Wu, Jingjing
> <jingjing.wu@intel.com>; Iremonger, Bernard <bernard.iremonger@intel.com>
> Cc: dev@dpdk.org; Yigit, Ferruh <ferruh.yigit@intel.com>; stable@dpdk.org
> Subject: [PATCH] app/testpmd: fix possible uninitialized variable usage
>
> ol_flags can be wrong if DEV_TX_OFFLOAD_VLAN_INSERT is not set in
> tx_offloads
>
> Fixes: 3eecba267cd6 ("app/testpmd: cleanup internal Tx offloads flags field")
> Cc: stable@dpdk.org
>
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [dpdk-dev] [PATCH] app/testpmd: fix possible uninitialized variable usage
2018-10-30 10:59 ` Iremonger, Bernard
@ 2018-11-02 20:35 ` Ferruh Yigit
0 siblings, 0 replies; 3+ messages in thread
From: Ferruh Yigit @ 2018-11-02 20:35 UTC (permalink / raw)
To: Iremonger, Bernard, Lu, Wenzhuo, Wu, Jingjing; +Cc: dev, stable
On 10/30/2018 10:59 AM, Iremonger, Bernard wrote:
>> -----Original Message-----
>> From: Yigit, Ferruh
>> Sent: Sunday, October 28, 2018 2:17 AM
>> To: Lu, Wenzhuo <wenzhuo.lu@intel.com>; Wu, Jingjing
>> <jingjing.wu@intel.com>; Iremonger, Bernard <bernard.iremonger@intel.com>
>> Cc: dev@dpdk.org; Yigit, Ferruh <ferruh.yigit@intel.com>; stable@dpdk.org
>> Subject: [PATCH] app/testpmd: fix possible uninitialized variable usage
>>
>> ol_flags can be wrong if DEV_TX_OFFLOAD_VLAN_INSERT is not set in
>> tx_offloads
>>
>> Fixes: 3eecba267cd6 ("app/testpmd: cleanup internal Tx offloads flags field")
>> Cc: stable@dpdk.org
>>
>> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
>
> Acked-by: Bernard Iremonger <bernard.iremonger@intel.com>
Applied to dpdk-next-net/master, thanks.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2018-11-02 20:35 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-28 2:16 [dpdk-dev] [PATCH] app/testpmd: fix possible uninitialized variable usage Ferruh Yigit
2018-10-30 10:59 ` Iremonger, Bernard
2018-11-02 20:35 ` Ferruh Yigit
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).