patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] please help backporting some patches to stable release 18.02.2
@ 2018-04-30 15:23 luca.boccassi
  2018-04-30 15:30 ` Maxime Coquelin
                   ` (4 more replies)
  0 siblings, 5 replies; 23+ messages in thread
From: luca.boccassi @ 2018-04-30 15:23 UTC (permalink / raw)
  To: dpdk stable
  Cc: Adrien Mazarguil, Anatoly Burakov, Andrew Rybchenko,
	Cristian Dumitrescu, Didier Pallard, Ferruh Yigit,
	Hemant Agrawal, Hyong Youb Kim, Jasvinder Singh, Jianfeng Tan,
	John Daley, Maxime Coquelin, Nelio Laranjeiro, Shahaf Shuler,
	Thomas Monjalon, Yongseok Koh, Yong Wang

Hi commit authors (and maintainers),

I didn't manage to apply following commits from upstream to stable branch
18.02: conflict happens. I'm wondering can the authors check the following
list and backport those patches belong to you?

FYI, branch 18.02 is located at tree:
   git://dpdk.org/dpdk-stable

It'd be great if you could do that before Friday, if necessary. Also, please add a
heading line like below before the commit log body:
    [ backported from upstream commit xxx ]

Example: http://dpdk.org/browse/dpdk-stable/commit/?h=16.07&id=c4831394c7d1944d8ec27d52c22997f20d19718e

Also please mention the target stable in the subject line, as we have more than one
at the same time, for example:

    [PATCH 18.02] foo/bar: fix baz

With git send-email, this can be achieved by appending the parameter:

    --subject-prefix='18.02'

Please let me know if you have any comments, say, need more time, or it's
worthless to packport it. And please send it to "stable@dpdk.org", but not
"dev@dpdk.org".

Thanks.

Luca Boccassi

---
39b8dda70  Adrien Mazarguil ethdev: fix behavior of VF/PF in flow API
19b3bc47c  Adrien Mazarguil ethdev: fix C99 flexible arrays from flow API
0730ab674  Adrien Mazarguil ethdev: fix default VLAN TCI mask in flow API
e58638c32  Adrien Mazarguil ethdev: fix TPID handling in flow API
505721e17  Anatoly Burakov  ipc: use strlcpy where applicable
d08e3c90d  Didier Pallard   net/vmxnet3: fix Rx offload information in multiseg packets
11c5d3411  Ferruh Yigit     ethdev: fix port id storage
085c3d8c4  Jasvinder Singh  examples/ip_pipeline: fix load balance table action
05e856826  John Daley       net/enic: fix uninitialized variable
c6ae7de0d  Maxime Coquelin  vhost: fix indirect descriptors table translation size
3c0db1ab5  Nélio Laranjeiro net/mlx5: fix flow director mask
7ba5320ba  Nélio Laranjeiro net/mlx5: fix link status behavior
cfee94752  Nélio Laranjeiro net/mlx5: fix link status to use wait to complete
af4f09f28  Nélio Laranjeiro net/mlx5: prefix all functions with mlx5
a85a606ca  Shahaf Shuler    net/mlx5: fix link status initialization

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

* Re: [dpdk-stable] please help backporting some patches to stable release 18.02.2
  2018-04-30 15:23 [dpdk-stable] please help backporting some patches to stable release 18.02.2 luca.boccassi
@ 2018-04-30 15:30 ` Maxime Coquelin
  2018-04-30 15:44   ` Luca Boccassi
  2018-04-30 16:06 ` Burakov, Anatoly
                   ` (3 subsequent siblings)
  4 siblings, 1 reply; 23+ messages in thread
From: Maxime Coquelin @ 2018-04-30 15:30 UTC (permalink / raw)
  To: luca.boccassi, dpdk stable
  Cc: Adrien Mazarguil, Anatoly Burakov, Andrew Rybchenko,
	Cristian Dumitrescu, Didier Pallard, Ferruh Yigit,
	Hemant Agrawal, Hyong Youb Kim, Jasvinder Singh, Jianfeng Tan,
	John Daley, Nelio Laranjeiro, Shahaf Shuler, Thomas Monjalon,
	Yongseok Koh, Yong Wang



On 04/30/2018 05:23 PM, luca.boccassi@gmail.com wrote:
> Hi commit authors (and maintainers),
> 
> I didn't manage to apply following commits from upstream to stable branch
> 18.02: conflict happens. I'm wondering can the authors check the following
> list and backport those patches belong to you?
> 
> FYI, branch 18.02 is located at tree:
>     git://dpdk.org/dpdk-stable
> 
> It'd be great if you could do that before Friday, if necessary. Also, please add a
> heading line like below before the commit log body:
>      [ backported from upstream commit xxx ]
> 
> Example:http://dpdk.org/browse/dpdk-stable/commit/?h=16.07&id=c4831394c7d1944d8ec27d52c22997f20d19718e
> 
> Also please mention the target stable in the subject line, as we have more than one
> at the same time, for example:
> 
>      [PATCH 18.02] foo/bar: fix baz
> 
> With git send-email, this can be achieved by appending the parameter:
> 
>      --subject-prefix='18.02'
> 
> Please let me know if you have any comments, say, need more time, or it's
> worthless to packport it. And please send it to"stable@dpdk.org", but not
> "dev@dpdk.org".
> 
> Thanks.
> 
> Luca Boccassi
> 
> ---
...
> c6ae7de0d  Maxime Coquelin  vhost: fix indirect descriptors table translation size

This one is already backported in v18.02.1, as it was part of the CVE
series:

commit 92f155720d5911850898bac1526ba36d493cc666
Author: Maxime Coquelin <maxime.coquelin@redhat.com>
Date:   Thu Apr 19 15:28:35 2018 +0200

     vhost: fix indirect descriptors table translation size

     This patch fixes the size passed at the indirect descriptor
     table translation time, which is the len field of the descriptor,
     and not a single descriptor.

     This issue has been assigned CVE-2018-1059.

     Fixes: 62fdb8255ae7 ("vhost: use the guest IOVA to host VA helper")

     Signed-off-by: Maxime Coquelin <maxime.coquelin@redhat.com>

Cheers,
Maxime

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

* Re: [dpdk-stable] please help backporting some patches to stable release 18.02.2
  2018-04-30 15:30 ` Maxime Coquelin
@ 2018-04-30 15:44   ` Luca Boccassi
  0 siblings, 0 replies; 23+ messages in thread
From: Luca Boccassi @ 2018-04-30 15:44 UTC (permalink / raw)
  To: Maxime Coquelin, dpdk stable

On Mon, 2018-04-30 at 17:30 +0200, Maxime Coquelin wrote:
> 
> On 04/30/2018 05:23 PM, luca.boccassi@gmail.com wrote:
> > Hi commit authors (and maintainers),
> > 
> > I didn't manage to apply following commits from upstream to stable
> > branch
> > 18.02: conflict happens. I'm wondering can the authors check the
> > following
> > list and backport those patches belong to you?
> > 
> > FYI, branch 18.02 is located at tree:
> >     git://dpdk.org/dpdk-stable
> > 
> > It'd be great if you could do that before Friday, if necessary.
> > Also, please add a
> > heading line like below before the commit log body:
> >      [ backported from upstream commit xxx ]
> > 
> > Example:http://dpdk.org/browse/dpdk-stable/commit/?h=16.07&id=c4831
> > 394c7d1944d8ec27d52c22997f20d19718e
> > 
> > Also please mention the target stable in the subject line, as we
> > have more than one
> > at the same time, for example:
> > 
> >      [PATCH 18.02] foo/bar: fix baz
> > 
> > With git send-email, this can be achieved by appending the
> > parameter:
> > 
> >      --subject-prefix='18.02'
> > 
> > Please let me know if you have any comments, say, need more time,
> > or it's
> > worthless to packport it. And please send it to"stable@dpdk.org",
> > but not
> > "dev@dpdk.org".
> > 
> > Thanks.
> > 
> > Luca Boccassi
> > 
> > ---
> 
> ...
> > c6ae7de0d  Maxime Coquelin  vhost: fix indirect descriptors table
> > translation size
> 
> This one is already backported in v18.02.1, as it was part of the CVE
> series:

Sorry, forgot there was a reason I skipped that one :-)

-- 
Kind regards,
Luca Boccassi

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

* Re: [dpdk-stable] please help backporting some patches to stable release 18.02.2
  2018-04-30 15:23 [dpdk-stable] please help backporting some patches to stable release 18.02.2 luca.boccassi
  2018-04-30 15:30 ` Maxime Coquelin
@ 2018-04-30 16:06 ` Burakov, Anatoly
  2018-04-30 16:33   ` Luca Boccassi
  2018-05-02  6:04 ` Hyong Youb Kim
                   ` (2 subsequent siblings)
  4 siblings, 1 reply; 23+ messages in thread
From: Burakov, Anatoly @ 2018-04-30 16:06 UTC (permalink / raw)
  To: luca.boccassi, dpdk stable
  Cc: Adrien Mazarguil, Andrew Rybchenko, Dumitrescu, Cristian,
	Didier Pallard, Yigit, Ferruh, Hemant Agrawal, Hyong Youb Kim,
	Singh, Jasvinder, Tan, Jianfeng, John Daley, Maxime Coquelin,
	Nelio Laranjeiro, Shahaf Shuler, Thomas Monjalon, Yongseok Koh,
	Yong Wang

505721e17  

This one should be dropped, strlcpy patchset is not on stable.

Thanks,
Anatoly

> -----Original Message-----
> From: luca.boccassi@gmail.com [mailto:luca.boccassi@gmail.com]
> Sent: Monday, April 30, 2018 4:23 PM
> To: dpdk stable <stable@dpdk.org>
> Cc: Adrien Mazarguil <adrien.mazarguil@6wind.com>; Burakov, Anatoly
> <anatoly.burakov@intel.com>; Andrew Rybchenko
> <arybchenko@solarflare.com>; Dumitrescu, Cristian
> <cristian.dumitrescu@intel.com>; Didier Pallard
> <didier.pallard@6wind.com>; Yigit, Ferruh <ferruh.yigit@intel.com>; Hemant
> Agrawal <hemant.agrawal@nxp.com>; Hyong Youb Kim
> <hyonkim@cisco.com>; Singh, Jasvinder <jasvinder.singh@intel.com>; Tan,
> Jianfeng <jianfeng.tan@intel.com>; John Daley <johndale@cisco.com>;
> Maxime Coquelin <maxime.coquelin@redhat.com>; Nelio Laranjeiro
> <nelio.laranjeiro@6wind.com>; Shahaf Shuler <shahafs@mellanox.com>;
> Thomas Monjalon <thomas@monjalon.net>; Yongseok Koh
> <yskoh@mellanox.com>; Yong Wang <yongwang@vmware.com>
> Subject: please help backporting some patches to stable release 18.02.2
> 
> Hi commit authors (and maintainers),
> 
> I didn't manage to apply following commits from upstream to stable branch
> 18.02: conflict happens. I'm wondering can the authors check the following
> list and backport those patches belong to you?
> 
> FYI, branch 18.02 is located at tree:
>    git://dpdk.org/dpdk-stable
> 
> It'd be great if you could do that before Friday, if necessary. Also, please add
> a heading line like below before the commit log body:
>     [ backported from upstream commit xxx ]
> 
> Example: http://dpdk.org/browse/dpdk-
> stable/commit/?h=16.07&id=c4831394c7d1944d8ec27d52c22997f20d19718e
> 
> Also please mention the target stable in the subject line, as we have more
> than one at the same time, for example:
> 
>     [PATCH 18.02] foo/bar: fix baz
> 
> With git send-email, this can be achieved by appending the parameter:
> 
>     --subject-prefix='18.02'
> 
> Please let me know if you have any comments, say, need more time, or it's
> worthless to packport it. And please send it to "stable@dpdk.org", but not
> "dev@dpdk.org".
> 
> Thanks.
> 
> Luca Boccassi
> 
> ---
> 39b8dda70  Adrien Mazarguil ethdev: fix behavior of VF/PF in flow API
> 19b3bc47c  Adrien Mazarguil ethdev: fix C99 flexible arrays from flow API
> 0730ab674  Adrien Mazarguil ethdev: fix default VLAN TCI mask in flow API
> e58638c32  Adrien Mazarguil ethdev: fix TPID handling in flow API
> 505721e17  Anatoly Burakov  ipc: use strlcpy where applicable
> d08e3c90d  Didier Pallard   net/vmxnet3: fix Rx offload information in
> multiseg packets
> 11c5d3411  Ferruh Yigit     ethdev: fix port id storage
> 085c3d8c4  Jasvinder Singh  examples/ip_pipeline: fix load balance table
> action
> 05e856826  John Daley       net/enic: fix uninitialized variable
> c6ae7de0d  Maxime Coquelin  vhost: fix indirect descriptors table translation
> size
> 3c0db1ab5  Nélio Laranjeiro net/mlx5: fix flow director mask 7ba5320ba  Nélio
> Laranjeiro net/mlx5: fix link status behavior
> cfee94752  Nélio Laranjeiro net/mlx5: fix link status to use wait to complete
> af4f09f28  Nélio Laranjeiro net/mlx5: prefix all functions with mlx5
> a85a606ca  Shahaf Shuler    net/mlx5: fix link status initialization

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

* Re: [dpdk-stable] please help backporting some patches to stable release 18.02.2
  2018-04-30 16:06 ` Burakov, Anatoly
@ 2018-04-30 16:33   ` Luca Boccassi
  0 siblings, 0 replies; 23+ messages in thread
From: Luca Boccassi @ 2018-04-30 16:33 UTC (permalink / raw)
  To: Burakov, Anatoly, dpdk stable

On Mon, 2018-04-30 at 16:06 +0000, Burakov, Anatoly wrote:
> 505721e17  
> 
> This one should be dropped, strlcpy patchset is not on stable.
> 
> Thanks,
> Anatoly

Ok, thank you

> > -----Original Message-----
> > From: luca.boccassi@gmail.com [mailto:luca.boccassi@gmail.com]
> > Sent: Monday, April 30, 2018 4:23 PM
> > To: dpdk stable <stable@dpdk.org>
> > Cc: Adrien Mazarguil <adrien.mazarguil@6wind.com>; Burakov, Anatoly
> > <anatoly.burakov@intel.com>; Andrew Rybchenko
> > <arybchenko@solarflare.com>; Dumitrescu, Cristian
> > <cristian.dumitrescu@intel.com>; Didier Pallard
> > <didier.pallard@6wind.com>; Yigit, Ferruh <ferruh.yigit@intel.com>;
> > Hemant
> > Agrawal <hemant.agrawal@nxp.com>; Hyong Youb Kim
> > <hyonkim@cisco.com>; Singh, Jasvinder <jasvinder.singh@intel.com>;
> > Tan,
> > Jianfeng <jianfeng.tan@intel.com>; John Daley <johndale@cisco.com>;
> > Maxime Coquelin <maxime.coquelin@redhat.com>; Nelio Laranjeiro
> > <nelio.laranjeiro@6wind.com>; Shahaf Shuler <shahafs@mellanox.com>;
> > Thomas Monjalon <thomas@monjalon.net>; Yongseok Koh
> > <yskoh@mellanox.com>; Yong Wang <yongwang@vmware.com>
> > Subject: please help backporting some patches to stable release
> > 18.02.2
> > 
> > Hi commit authors (and maintainers),
> > 
> > I didn't manage to apply following commits from upstream to stable
> > branch
> > 18.02: conflict happens. I'm wondering can the authors check the
> > following
> > list and backport those patches belong to you?
> > 
> > FYI, branch 18.02 is located at tree:
> >    git://dpdk.org/dpdk-stable
> > 
> > It'd be great if you could do that before Friday, if necessary.
> > Also, please add
> > a heading line like below before the commit log body:
> >     [ backported from upstream commit xxx ]
> > 
> > Example: http://dpdk.org/browse/dpdk-
> > stable/commit/?h=16.07&id=c4831394c7d1944d8ec27d52c22997f20d19718e
> > 
> > Also please mention the target stable in the subject line, as we
> > have more
> > than one at the same time, for example:
> > 
> >     [PATCH 18.02] foo/bar: fix baz
> > 
> > With git send-email, this can be achieved by appending the
> > parameter:
> > 
> >     --subject-prefix='18.02'
> > 
> > Please let me know if you have any comments, say, need more time,
> > or it's
> > worthless to packport it. And please send it to "stable@dpdk.org",
> > but not
> > "dev@dpdk.org".
> > 
> > Thanks.
> > 
> > Luca Boccassi
> > 
> > ---
> > 39b8dda70  Adrien Mazarguil ethdev: fix behavior of VF/PF in flow
> > API
> > 19b3bc47c  Adrien Mazarguil ethdev: fix C99 flexible arrays from
> > flow API
> > 0730ab674  Adrien Mazarguil ethdev: fix default VLAN TCI mask in
> > flow API
> > e58638c32  Adrien Mazarguil ethdev: fix TPID handling in flow API
> > 505721e17  Anatoly Burakov  ipc: use strlcpy where applicable
> > d08e3c90d  Didier Pallard   net/vmxnet3: fix Rx offload information
> > in
> > multiseg packets
> > 11c5d3411  Ferruh Yigit     ethdev: fix port id storage
> > 085c3d8c4  Jasvinder Singh  examples/ip_pipeline: fix load balance
> > table
> > action
> > 05e856826  John Daley       net/enic: fix uninitialized variable
> > c6ae7de0d  Maxime Coquelin  vhost: fix indirect descriptors table
> > translation
> > size
> > 3c0db1ab5  Nélio Laranjeiro net/mlx5: fix flow director mask
> > 7ba5320ba  Nélio
> > Laranjeiro net/mlx5: fix link status behavior
> > cfee94752  Nélio Laranjeiro net/mlx5: fix link status to use wait
> > to complete
> > af4f09f28  Nélio Laranjeiro net/mlx5: prefix all functions with
> > mlx5
> > a85a606ca  Shahaf Shuler    net/mlx5: fix link status
> > initialization

-- 
Kind regards,
Luca Boccassi

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

* Re: [dpdk-stable] please help backporting some patches to stable release 18.02.2
  2018-04-30 15:23 [dpdk-stable] please help backporting some patches to stable release 18.02.2 luca.boccassi
  2018-04-30 15:30 ` Maxime Coquelin
  2018-04-30 16:06 ` Burakov, Anatoly
@ 2018-05-02  6:04 ` Hyong Youb Kim
  2018-05-02 10:43   ` Luca Boccassi
  2018-05-02  8:27 ` Nélio Laranjeiro
  2018-05-18  9:46 ` luca.boccassi
  4 siblings, 1 reply; 23+ messages in thread
From: Hyong Youb Kim @ 2018-05-02  6:04 UTC (permalink / raw)
  To: luca.boccassi
  Cc: dpdk stable, Adrien Mazarguil, Anatoly Burakov, Andrew Rybchenko,
	Cristian Dumitrescu, Didier Pallard, Ferruh Yigit,
	Hemant Agrawal, Jasvinder Singh, Jianfeng Tan, John Daley,
	Maxime Coquelin, Nelio Laranjeiro, Shahaf Shuler,
	Thomas Monjalon, Yongseok Koh, Yong Wang

On Mon, Apr 30, 2018 at 04:23:07PM +0100, luca.boccassi@gmail.com wrote:
> Hi commit authors (and maintainers),
> 
> I didn't manage to apply following commits from upstream to stable branch
> 18.02: conflict happens. I'm wondering can the authors check the following
> list and backport those patches belong to you?
[...]
> 05e856826  John Daley       net/enic: fix uninitialized variable

You can drop this patch, as it depends on another patch that is not in
18.02.

Thanks.
-Hyong

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

* Re: [dpdk-stable] please help backporting some patches to stable release 18.02.2
  2018-04-30 15:23 [dpdk-stable] please help backporting some patches to stable release 18.02.2 luca.boccassi
                   ` (2 preceding siblings ...)
  2018-05-02  6:04 ` Hyong Youb Kim
@ 2018-05-02  8:27 ` Nélio Laranjeiro
  2018-05-02 10:42   ` Luca Boccassi
  2018-05-18  9:46 ` luca.boccassi
  4 siblings, 1 reply; 23+ messages in thread
From: Nélio Laranjeiro @ 2018-05-02  8:27 UTC (permalink / raw)
  To: luca.boccassi
  Cc: dpdk stable, Adrien Mazarguil, Shahaf Shuler, Thomas Monjalon,
	Yongseok Koh

Hi Luca,

On Mon, Apr 30, 2018 at 04:23:07PM +0100, luca.boccassi@gmail.com wrote:
> [...]
> af4f09f28  Nélio Laranjeiro net/mlx5: prefix all functions with mlx5

This patch makes part of a full cleanup of MLX5 PMD, which does not
brings any functionality only fixes and API compliances [1].
It has been done to fix some issues found by Olivier Matz [2] in 18.02.

Do you think it is possible to bring the full series into stable branch?

Thanks,

[1] https://dpdk.org/ml/archives/dev/2018-March/091878.html
[2] https://dpdk.org/ml/archives/dev/2018-January/087993.html

-- 
Nélio Laranjeiro
6WIND

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

* Re: [dpdk-stable] please help backporting some patches to stable release 18.02.2
  2018-05-02  8:27 ` Nélio Laranjeiro
@ 2018-05-02 10:42   ` Luca Boccassi
  0 siblings, 0 replies; 23+ messages in thread
From: Luca Boccassi @ 2018-05-02 10:42 UTC (permalink / raw)
  To: Nélio Laranjeiro
  Cc: dpdk stable, Adrien Mazarguil, Shahaf Shuler, Thomas Monjalon,
	Yongseok Koh

On Wed, 2018-05-02 at 10:27 +0200, Nélio Laranjeiro wrote:
> Hi Luca,
> 
> On Mon, Apr 30, 2018 at 04:23:07PM +0100, luca.boccassi@gmail.com
> wrote:
> > [...]
> > af4f09f28  Nélio Laranjeiro net/mlx5: prefix all functions with
> > mlx5
> 
> This patch makes part of a full cleanup of MLX5 PMD, which does not
> brings any functionality only fixes and API compliances [1].
> It has been done to fix some issues found by Olivier Matz [2] in
> 18.02.
> 
> Do you think it is possible to bring the full series into stable
> branch?
> 
> Thanks,
> 
> [1] https://dpdk.org/ml/archives/dev/2018-March/091878.html
> [2] https://dpdk.org/ml/archives/dev/2018-January/087993.html

If it doesn't break API/ABI it's fine, feel free to send a series to
stable@ only using --prefix 18.02

-- 
Kind regards,
Luca Boccassi

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

* Re: [dpdk-stable] please help backporting some patches to stable release 18.02.2
  2018-05-02  6:04 ` Hyong Youb Kim
@ 2018-05-02 10:43   ` Luca Boccassi
  0 siblings, 0 replies; 23+ messages in thread
From: Luca Boccassi @ 2018-05-02 10:43 UTC (permalink / raw)
  To: Hyong Youb Kim; +Cc: stable

On Wed, 2018-05-02 at 15:04 +0900, Hyong Youb Kim wrote:
> On Mon, Apr 30, 2018 at 04:23:07PM +0100, luca.boccassi@gmail.com
> wrote:
> > Hi commit authors (and maintainers),
> > 
> > I didn't manage to apply following commits from upstream to stable
> > branch
> > 18.02: conflict happens. I'm wondering can the authors check the
> > following
> > list and backport those patches belong to you?
> 
> [...]
> > 05e856826  John Daley       net/enic: fix uninitialized variable
> 
> You can drop this patch, as it depends on another patch that is not
> in
> 18.02.
> 
> Thanks.
> -Hyong

Ok, thank you

-- 
Kind regards,
Luca Boccassi

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

* [dpdk-stable] please help backporting some patches to stable release 18.02.2
  2018-04-30 15:23 [dpdk-stable] please help backporting some patches to stable release 18.02.2 luca.boccassi
                   ` (3 preceding siblings ...)
  2018-05-02  8:27 ` Nélio Laranjeiro
@ 2018-05-18  9:46 ` luca.boccassi
  2018-05-18 10:11   ` Richardson, Bruce
                     ` (3 more replies)
  4 siblings, 4 replies; 23+ messages in thread
From: luca.boccassi @ 2018-05-18  9:46 UTC (permalink / raw)
  To: dpdk stable
  Cc: Adrien Mazarguil, Andrew Rybchenko, Andy Green, Bruce Richardson,
	Cristian Dumitrescu, Ferruh Yigit, Kirill Rybalchenko,
	Luca Boccassi, Matan Azrad, Nelio Laranjeiro, Pablo de Lara,
	Reshma Pattan, Stephen Hemminger, Thomas Monjalon

Hi commit authors (and maintainers),

I didn't manage to apply following commits from upstream to stable branch
18.02: conflict happens. I'm wondering can the authors check the following
list and backport those patches belong to you?

FYI, branch 18.02 is located at tree:
   git://dpdk.org/dpdk-stable

It'd be great if you could do that in one or two weeks. Also, please add a
heading line like below before the commit log body:
    [ backported from upstream commit xxx ]

Example: http://dpdk.org/browse/dpdk-stable/commit/?h=16.07&id=c4831394c7d1944d8ec27d52c22997f20d19718e

Also please mention the target stable in the subject line, as we have more than one
at the same time, for example:

    [PATCH 18.02] foo/bar: fix baz

With git send-email, this can be achieved by appending the parameter:

    --subject-prefix='18.02'

Please let me know if you have any comments, say, need more time, or it's
worthless to packport it. And please send it to "stable@dpdk.org", but not
"dev@dpdk.org".

NOTE: for the patches using strlcpy, the issue is that strlcpy is not available
in 18.02, so it would have to be backported as well.

Thanks.

Luca Boccassi

---
52f711f7b  Andy Green       bus/pci: fix size of driver name buffer
7ee230e88  Adrien Mazarguil app/testpmd: fix weak RSS hash key for flow
fe5f777b5  Andy Green       bus/pci: replace strncpy by strlcpy
f28742ba0  Andy Green       net/qede: fix strncpy
0fa4f3eee  Andy Green       net/qede: replace strncpy by strlcpy
ed5b98483  Andy Green       net/sfc: make sure that stats name is nul-terminated
89200580e  Bruce Richardson kernel: fix cross-build of Linux modules with meson
1bdea6110  Kirill Rybalchenko examples/ipsec-secgw: fix IP address parsing
b7a7c97a4  Nélio Laranjeiro net/mlx5: fix flow validation
ae943ebe1  Reshma Pattan    examples/ipsec-secgw: replace strncpy with strlcpy
21ce8e44b  Reshma Pattan    examples/vhost_scsi: replace strncpy with strlcpy
be8cd2103  Thomas Monjalon  ethdev: fix port probing notification
e06227e2f  Thomas Monjalon  ethdev: fix port visibility before initialization

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

* Re: [dpdk-stable] please help backporting some patches to stable release 18.02.2
  2018-05-18  9:46 ` luca.boccassi
@ 2018-05-18 10:11   ` Richardson, Bruce
  2018-05-18 10:21     ` Luca Boccassi
  2018-05-18 10:25   ` Andy Green
                     ` (2 subsequent siblings)
  3 siblings, 1 reply; 23+ messages in thread
From: Richardson, Bruce @ 2018-05-18 10:11 UTC (permalink / raw)
  To: luca.boccassi, dpdk stable
  Cc: Adrien Mazarguil, Andrew Rybchenko, Andy Green, Dumitrescu,
	Cristian, Yigit, Ferruh, Rybalchenko, Kirill, Luca Boccassi,
	Matan Azrad, Nelio Laranjeiro, De Lara Guarch, Pablo, Pattan,
	Reshma, Stephen Hemminger, Thomas Monjalon

Hi Luca,

my patch: "89200580e  Bruce Richardson kernel: fix cross-build of Linux modules with meson" depends on the patches moving the drivers to the kernel folder. As it's for meson build which was only in beta in that release, I don't think it's worth backporting.

/Bruce

> -----Original Message-----
> From: luca.boccassi@gmail.com [mailto:luca.boccassi@gmail.com]
> Sent: Friday, May 18, 2018 10:47 AM
> To: dpdk stable <stable@dpdk.org>
> Cc: Adrien Mazarguil <adrien.mazarguil@6wind.com>; Andrew Rybchenko
> <arybchenko@solarflare.com>; Andy Green <andy@warmcat.com>; Richardson,
> Bruce <bruce.richardson@intel.com>; Dumitrescu, Cristian
> <cristian.dumitrescu@intel.com>; Yigit, Ferruh <ferruh.yigit@intel.com>;
> Rybalchenko, Kirill <kirill.rybalchenko@intel.com>; Luca Boccassi
> <bluca@debian.org>; Matan Azrad <matan@mellanox.com>; Nelio Laranjeiro
> <nelio.laranjeiro@6wind.com>; De Lara Guarch, Pablo
> <pablo.de.lara.guarch@intel.com>; Pattan, Reshma
> <reshma.pattan@intel.com>; Stephen Hemminger <stephen@networkplumber.org>;
> Thomas Monjalon <thomas@monjalon.net>
> Subject: please help backporting some patches to stable release 18.02.2
> 
> Hi commit authors (and maintainers),
> 
> I didn't manage to apply following commits from upstream to stable branch
> 18.02: conflict happens. I'm wondering can the authors check the following
> list and backport those patches belong to you?
> 
> FYI, branch 18.02 is located at tree:
>    git://dpdk.org/dpdk-stable
> 
> It'd be great if you could do that in one or two weeks. Also, please add a
> heading line like below before the commit log body:
>     [ backported from upstream commit xxx ]
> 
> Example: http://dpdk.org/browse/dpdk-
> stable/commit/?h=16.07&id=c4831394c7d1944d8ec27d52c22997f20d19718e
> 
> Also please mention the target stable in the subject line, as we have more
> than one at the same time, for example:
> 
>     [PATCH 18.02] foo/bar: fix baz
> 
> With git send-email, this can be achieved by appending the parameter:
> 
>     --subject-prefix='18.02'
> 
> Please let me know if you have any comments, say, need more time, or it's
> worthless to packport it. And please send it to "stable@dpdk.org", but not
> "dev@dpdk.org".
> 
> NOTE: for the patches using strlcpy, the issue is that strlcpy is not
> available in 18.02, so it would have to be backported as well.
> 
> Thanks.
> 
> Luca Boccassi
> 
> ---
> 52f711f7b  Andy Green       bus/pci: fix size of driver name buffer
> 7ee230e88  Adrien Mazarguil app/testpmd: fix weak RSS hash key for flow
> fe5f777b5  Andy Green       bus/pci: replace strncpy by strlcpy
> f28742ba0  Andy Green       net/qede: fix strncpy
> 0fa4f3eee  Andy Green       net/qede: replace strncpy by strlcpy
> ed5b98483  Andy Green       net/sfc: make sure that stats name is nul-
> terminated
> 89200580e  Bruce Richardson kernel: fix cross-build of Linux modules with
> meson
> 1bdea6110  Kirill Rybalchenko examples/ipsec-secgw: fix IP address parsing
> b7a7c97a4  Nélio Laranjeiro net/mlx5: fix flow validation
> ae943ebe1  Reshma Pattan    examples/ipsec-secgw: replace strncpy with
> strlcpy
> 21ce8e44b  Reshma Pattan    examples/vhost_scsi: replace strncpy with
> strlcpy
> be8cd2103  Thomas Monjalon  ethdev: fix port probing notification
> e06227e2f  Thomas Monjalon  ethdev: fix port visibility before
> initialization

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

* Re: [dpdk-stable] please help backporting some patches to stable release 18.02.2
  2018-05-18 10:11   ` Richardson, Bruce
@ 2018-05-18 10:21     ` Luca Boccassi
  0 siblings, 0 replies; 23+ messages in thread
From: Luca Boccassi @ 2018-05-18 10:21 UTC (permalink / raw)
  To: Richardson, Bruce, dpdk stable

On Fri, 2018-05-18 at 10:11 +0000, Richardson, Bruce wrote:
> Hi Luca,
> 
> my patch: "89200580e  Bruce Richardson kernel: fix cross-build of
> Linux modules with meson" depends on the patches moving the drivers
> to the kernel folder. As it's for meson build which was only in beta
> in that release, I don't think it's worth backporting.
> 
> /Bruce

Hi, makes sense, thanks for checking.

> > -----Original Message-----
> > From: luca.boccassi@gmail.com [mailto:luca.boccassi@gmail.com]
> > Sent: Friday, May 18, 2018 10:47 AM
> > To: dpdk stable <stable@dpdk.org>
> > Cc: Adrien Mazarguil <adrien.mazarguil@6wind.com>; Andrew Rybchenko
> > <arybchenko@solarflare.com>; Andy Green <andy@warmcat.com>;
> > Richardson,
> > Bruce <bruce.richardson@intel.com>; Dumitrescu, Cristian
> > <cristian.dumitrescu@intel.com>; Yigit, Ferruh <ferruh.yigit@intel.
> > com>;
> > Rybalchenko, Kirill <kirill.rybalchenko@intel.com>; Luca Boccassi
> > <bluca@debian.org>; Matan Azrad <matan@mellanox.com>; Nelio
> > Laranjeiro
> > <nelio.laranjeiro@6wind.com>; De Lara Guarch, Pablo
> > <pablo.de.lara.guarch@intel.com>; Pattan, Reshma
> > <reshma.pattan@intel.com>; Stephen Hemminger <stephen@networkplumbe
> > r.org>;
> > Thomas Monjalon <thomas@monjalon.net>
> > Subject: please help backporting some patches to stable release
> > 18.02.2
> > 
> > Hi commit authors (and maintainers),
> > 
> > I didn't manage to apply following commits from upstream to stable
> > branch
> > 18.02: conflict happens. I'm wondering can the authors check the
> > following
> > list and backport those patches belong to you?
> > 
> > FYI, branch 18.02 is located at tree:
> >    git://dpdk.org/dpdk-stable
> > 
> > It'd be great if you could do that in one or two weeks. Also,
> > please add a
> > heading line like below before the commit log body:
> >     [ backported from upstream commit xxx ]
> > 
> > Example: http://dpdk.org/browse/dpdk-
> > stable/commit/?h=16.07&id=c4831394c7d1944d8ec27d52c22997f20d19718e
> > 
> > Also please mention the target stable in the subject line, as we
> > have more
> > than one at the same time, for example:
> > 
> >     [PATCH 18.02] foo/bar: fix baz
> > 
> > With git send-email, this can be achieved by appending the
> > parameter:
> > 
> >     --subject-prefix='18.02'
> > 
> > Please let me know if you have any comments, say, need more time,
> > or it's
> > worthless to packport it. And please send it to "stable@dpdk.org",
> > but not
> > "dev@dpdk.org".
> > 
> > NOTE: for the patches using strlcpy, the issue is that strlcpy is
> > not
> > available in 18.02, so it would have to be backported as well.
> > 
> > Thanks.
> > 
> > Luca Boccassi
> > 
> > ---
> > 52f711f7b  Andy Green       bus/pci: fix size of driver name buffer
> > 7ee230e88  Adrien Mazarguil app/testpmd: fix weak RSS hash key for
> > flow
> > fe5f777b5  Andy Green       bus/pci: replace strncpy by strlcpy
> > f28742ba0  Andy Green       net/qede: fix strncpy
> > 0fa4f3eee  Andy Green       net/qede: replace strncpy by strlcpy
> > ed5b98483  Andy Green       net/sfc: make sure that stats name is
> > nul-
> > terminated
> > 89200580e  Bruce Richardson kernel: fix cross-build of Linux
> > modules with
> > meson
> > 1bdea6110  Kirill Rybalchenko examples/ipsec-secgw: fix IP address
> > parsing
> > b7a7c97a4  Nélio Laranjeiro net/mlx5: fix flow validation
> > ae943ebe1  Reshma Pattan    examples/ipsec-secgw: replace strncpy
> > with
> > strlcpy
> > 21ce8e44b  Reshma Pattan    examples/vhost_scsi: replace strncpy
> > with
> > strlcpy
> > be8cd2103  Thomas Monjalon  ethdev: fix port probing notification
> > e06227e2f  Thomas Monjalon  ethdev: fix port visibility before
> > initialization

-- 
Kind regards,
Luca Boccassi

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

* Re: [dpdk-stable] please help backporting some patches to stable release 18.02.2
  2018-05-18  9:46 ` luca.boccassi
  2018-05-18 10:11   ` Richardson, Bruce
@ 2018-05-18 10:25   ` Andy Green
  2018-05-18 10:33     ` Pattan, Reshma
  2018-05-18 11:37   ` [dpdk-stable] [PATCH 0/5] 18.02 Requested backports Andy Green
  2018-05-25 17:23   ` [dpdk-stable] please help backporting some patches to stable release 18.02.2 luca.boccassi
  3 siblings, 1 reply; 23+ messages in thread
From: Andy Green @ 2018-05-18 10:25 UTC (permalink / raw)
  To: luca.boccassi, dpdk stable
  Cc: Adrien Mazarguil, Andrew Rybchenko, Bruce Richardson,
	Cristian Dumitrescu, Ferruh Yigit, Kirill Rybalchenko,
	Luca Boccassi, Matan Azrad, Nelio Laranjeiro, Pablo de Lara,
	Reshma Pattan, Stephen Hemminger, Thomas Monjalon



On 05/18/2018 05:46 PM, luca.boccassi@gmail.com wrote:
> Hi commit authors (and maintainers),
> 
> I didn't manage to apply following commits from upstream to stable branch
> 18.02: conflict happens. I'm wondering can the authors check the following
> list and backport those patches belong to you?
> 
> FYI, branch 18.02 is located at tree:
>     git://dpdk.org/dpdk-stable
> 
> It'd be great if you could do that in one or two weeks. Also, please add a
> heading line like below before the commit log body:
>      [ backported from upstream commit xxx ]
> 
> Example: http://dpdk.org/browse/dpdk-stable/commit/?h=16.07&id=c4831394c7d1944d8ec27d52c22997f20d19718e
> 
> Also please mention the target stable in the subject line, as we have more than one
> at the same time, for example:
> 
>      [PATCH 18.02] foo/bar: fix baz
> 
> With git send-email, this can be achieved by appending the parameter:
> 
>      --subject-prefix='18.02'
> 
> Please let me know if you have any comments, say, need more time, or it's
> worthless to packport it. And please send it to "stable@dpdk.org", but not
> "dev@dpdk.org".
> 
> NOTE: for the patches using strlcpy, the issue is that strlcpy is not available
> in 18.02, so it would have to be backported as well.

uh... OK.

I dunno yet the value of, or reason for, or the solution of, any of the 
conflicts, I will look at them; same for 16.11.7.

But obviously, I had no idea I was signing up for this kind of time 
travel work.  Please cut me some slack accordingly back in the future 
for getting my other patches in :-)  (so I can enjoy more time travel 
beatings later).

-Andy

> Thanks.
> 
> Luca Boccassi
> 
> ---
> 52f711f7b  Andy Green       bus/pci: fix size of driver name buffer
> 7ee230e88  Adrien Mazarguil app/testpmd: fix weak RSS hash key for flow
> fe5f777b5  Andy Green       bus/pci: replace strncpy by strlcpy
> f28742ba0  Andy Green       net/qede: fix strncpy
> 0fa4f3eee  Andy Green       net/qede: replace strncpy by strlcpy
> ed5b98483  Andy Green       net/sfc: make sure that stats name is nul-terminated
> 89200580e  Bruce Richardson kernel: fix cross-build of Linux modules with meson
> 1bdea6110  Kirill Rybalchenko examples/ipsec-secgw: fix IP address parsing
> b7a7c97a4  Nélio Laranjeiro net/mlx5: fix flow validation
> ae943ebe1  Reshma Pattan    examples/ipsec-secgw: replace strncpy with strlcpy
> 21ce8e44b  Reshma Pattan    examples/vhost_scsi: replace strncpy with strlcpy
> be8cd2103  Thomas Monjalon  ethdev: fix port probing notification
> e06227e2f  Thomas Monjalon  ethdev: fix port visibility before initialization
> 

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

* Re: [dpdk-stable] please help backporting some patches to stable release 18.02.2
  2018-05-18 10:25   ` Andy Green
@ 2018-05-18 10:33     ` Pattan, Reshma
  2018-05-18 10:36       ` Andy Green
  0 siblings, 1 reply; 23+ messages in thread
From: Pattan, Reshma @ 2018-05-18 10:33 UTC (permalink / raw)
  To: luca.boccassi, dpdk stable
  Cc: Adrien Mazarguil, Andrew Rybchenko, Richardson, Bruce,
	Dumitrescu, Cristian, Yigit, Ferruh, Rybalchenko, Kirill,
	Luca Boccassi, Matan Azrad, Nelio Laranjeiro, De Lara Guarch,
	Pablo, Stephen Hemminger, Thomas Monjalon, Andy Green

Hi,

> >
> > NOTE: for the patches using strlcpy, the issue is that strlcpy is not
> > available in 18.02, so it would have to be backported as well.
> 

Ok, Then I would wait for the strlcpy work to be back ported first then I can port my patches in future.
Any comments let me know.

> ae943ebe1  Reshma Pattan    examples/ipsec-secgw: replace strncpy with strlcpy
> 21ce8e44b  Reshma Pattan    examples/vhost_scsi: replace strncpy with strlcpy

Thanks,
Reshma

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

* Re: [dpdk-stable] please help backporting some patches to stable release 18.02.2
  2018-05-18 10:33     ` Pattan, Reshma
@ 2018-05-18 10:36       ` Andy Green
  0 siblings, 0 replies; 23+ messages in thread
From: Andy Green @ 2018-05-18 10:36 UTC (permalink / raw)
  To: Pattan, Reshma, luca.boccassi, dpdk stable
  Cc: Adrien Mazarguil, Andrew Rybchenko, Richardson, Bruce,
	Dumitrescu, Cristian, Yigit, Ferruh, Rybalchenko, Kirill,
	Luca Boccassi, Matan Azrad, Nelio Laranjeiro, De Lara Guarch,
	Pablo, Stephen Hemminger, Thomas Monjalon



On 05/18/2018 06:33 PM, Pattan, Reshma wrote:
> Hi,
> 
>>>
>>> NOTE: for the patches using strlcpy, the issue is that strlcpy is not
>>> available in 18.02, so it would have to be backported as well.
>>
> 
> Ok, Then I would wait for the strlcpy work to be back ported first then I can port my patches in future.
> Any comments let me know.
> 
>> ae943ebe1  Reshma Pattan    examples/ipsec-secgw: replace strncpy with strlcpy
>> 21ce8e44b  Reshma Pattan    examples/vhost_scsi: replace strncpy with strlcpy

I am studying 18.02 stuff now... actually most of it is not conflict but 
I assume just missing strlcpy.  I did not import that in the first place 
but I will try to dig out and add whatever patch did add it... in other 
projects this is entirely the work of the stable branch maintainer... 
but no worries...

-Andy

> Thanks,
> Reshma
> 

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

* [dpdk-stable] [PATCH 0/5] 18.02 Requested backports
  2018-05-18  9:46 ` luca.boccassi
  2018-05-18 10:11   ` Richardson, Bruce
  2018-05-18 10:25   ` Andy Green
@ 2018-05-18 11:37   ` Andy Green
  2018-05-18 11:37     ` [dpdk-stable] [PATCH 1/5] eal: support strlcpy function Andy Green
                       ` (5 more replies)
  2018-05-25 17:23   ` [dpdk-stable] please help backporting some patches to stable release 18.02.2 luca.boccassi
  3 siblings, 6 replies; 23+ messages in thread
From: Andy Green @ 2018-05-18 11:37 UTC (permalink / raw)
  To: stable

The following series backports the requested stuff.

One patch is dropped because the first patch does the right thing
already.

BR's original strlcpy patch that added it in 18.05 is added to the
series.

Build-tested on trusty.

---

Andy Green (4):
      bus/pci: fix size of driver name buffer
      net/qede: fix strncpy
      net/qede: replace strncpy by strlcpy
      net/sfc: make sure that stats name is nul-terminated

Bruce Richardson (1):
      eal: support strlcpy function


 config/common_base                             |    1 +
 devtools/cocci/strlcpy.cocci                   |    8 ++++++
 drivers/bus/pci/linux/pci.c                    |    7 +++--
 drivers/net/qede/base/ecore_int.c              |    8 ++++--
 drivers/net/qede/qede_main.c                   |    6 ++---
 drivers/net/sfc/sfc_ethdev.c                   |    6 ++---
 lib/librte_eal/common/include/rte_string_fns.h |   31 ++++++++++++++++++++++++
 mk/rte.app.mk                                  |    3 ++
 8 files changed, 58 insertions(+), 12 deletions(-)
 create mode 100644 devtools/cocci/strlcpy.cocci

--
Signature

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

* [dpdk-stable] [PATCH 1/5] eal: support strlcpy function
  2018-05-18 11:37   ` [dpdk-stable] [PATCH 0/5] 18.02 Requested backports Andy Green
@ 2018-05-18 11:37     ` Andy Green
  2018-05-18 11:37     ` [dpdk-stable] [PATCH 2/5] bus/pci: fix size of driver name buffer Andy Green
                       ` (4 subsequent siblings)
  5 siblings, 0 replies; 23+ messages in thread
From: Andy Green @ 2018-05-18 11:37 UTC (permalink / raw)
  To: stable

From: Bruce Richardson <bruce.richardson@intel.com>

The strncpy function is error prone for doing "safe" string copies, so
we generally try to use "snprintf" instead in the code. The function
"strlcpy" is a better alternative, since it better conveys the
intention of the programmer, and doesn't suffer from the non-null
terminating behaviour of it's n'ed brethern.

The downside of this function is that it is not available by default
on linux, though standard in the BSD's. It is available on most
distros by installing "libbsd" package.

This patch therefore provides the following in rte_string_fns.h to ensure
that strlcpy is available there:
* for BSD, include string.h as normal
* if RTE_USE_LIBBSD is set, include <bsd/string.h>
* if not set, fallback to snprintf for strlcpy

Using make build system, the RTE_USE_LIBBSD is a hard-coded value to "n",
but when using meson, it's automatically set based on what is available
on the platform.

Signed-off-by: Bruce Richardson <bruce.richardson@intel.com>
Reviewed-by: Stephen Hemminger <stephen@networkplumber.org>
---
 config/common_base                             |    1 +
 devtools/cocci/strlcpy.cocci                   |    8 ++++++
 lib/librte_eal/common/include/rte_string_fns.h |   31 ++++++++++++++++++++++++
 mk/rte.app.mk                                  |    3 ++
 4 files changed, 43 insertions(+)
 create mode 100644 devtools/cocci/strlcpy.cocci

diff --git a/config/common_base b/config/common_base
index e74febef4..4241e6f10 100644
--- a/config/common_base
+++ b/config/common_base
@@ -105,6 +105,7 @@ CONFIG_RTE_EAL_IGB_UIO=n
 CONFIG_RTE_EAL_VFIO=n
 CONFIG_RTE_MALLOC_DEBUG=n
 CONFIG_RTE_EAL_NUMA_AWARE_HUGEPAGES=n
+CONFIG_RTE_USE_LIBBSD=n
 
 #
 # Recognize/ignore the AVX/AVX512 CPU flags for performance/power testing.
diff --git a/devtools/cocci/strlcpy.cocci b/devtools/cocci/strlcpy.cocci
new file mode 100644
index 000000000..335e27128
--- /dev/null
+++ b/devtools/cocci/strlcpy.cocci
@@ -0,0 +1,8 @@
+@use_strlcpy@
+identifier src, dst;
+expression size;
+@@
+(
+- snprintf(dst, size, "%s", src)
++ strlcpy(dst, src, size)
+)
diff --git a/lib/librte_eal/common/include/rte_string_fns.h b/lib/librte_eal/common/include/rte_string_fns.h
index cfca2f8df..7c0ab15a3 100644
--- a/lib/librte_eal/common/include/rte_string_fns.h
+++ b/lib/librte_eal/common/include/rte_string_fns.h
@@ -44,6 +44,8 @@
 extern "C" {
 #endif
 
+#include <stdio.h>
+
 /**
  * Takes string "string" parameter and splits it at character "delim"
  * up to maxtokens-1 times - to give "maxtokens" resulting tokens. Like
@@ -74,6 +76,35 @@ int
 rte_strsplit(char *string, int stringlen,
              char **tokens, int maxtokens, char delim);
 
+/**
+ * @internal
+ * DPDK-specific version of strlcpy for systems without
+ * libc or libbsd copies of the function
+ */
+static inline size_t
+rte_strlcpy(char *dst, const char *src, size_t size)
+{
+	return snprintf(dst, size, "%s", src);
+}
+
+/* pull in a strlcpy function */
+#ifdef RTE_EXEC_ENV_BSDAPP
+#include <string.h>
+#ifndef __BSD_VISIBLE /* non-standard functions are hidden */
+#define strlcpy(dst, src, size) rte_strlcpy(dst, src, size)
+#endif
+
+
+#else /* non-BSD platforms */
+#ifdef RTE_USE_LIBBSD
+#include <bsd/string.h>
+
+#else /* no BSD header files, create own */
+#define strlcpy(dst, src, size) rte_strlcpy(dst, src, size)
+
+#endif /* RTE_USE_LIBBSD */
+#endif /* BSDAPP */
+
 #ifdef __cplusplus
 }
 #endif
diff --git a/mk/rte.app.mk b/mk/rte.app.mk
index 6a6a7452e..98ab58de0 100644
--- a/mk/rte.app.mk
+++ b/mk/rte.app.mk
@@ -218,6 +218,9 @@ _LDLIBS-$(CONFIG_RTE_LIBRTE_EAL)            += -lrt
 ifeq ($(CONFIG_RTE_EXEC_ENV_LINUXAPP)$(CONFIG_RTE_EAL_NUMA_AWARE_HUGEPAGES),yy)
 _LDLIBS-$(CONFIG_RTE_LIBRTE_EAL)            += -lnuma
 endif
+ifeq ($(CONFIG_RTE_EXEC_ENV_LINUXAPP)$(CONFIG_RTE_USE_LIBBSD),yy)
+_LDLIBS-$(CONFIG_RTE_LIBRTE_EAL)            += -lbsd
+endif
 _LDLIBS-$(CONFIG_RTE_LIBRTE_SCHED)          += -lm
 _LDLIBS-$(CONFIG_RTE_LIBRTE_SCHED)          += -lrt
 _LDLIBS-$(CONFIG_RTE_LIBRTE_MEMBER)         += -lm

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

* [dpdk-stable] [PATCH 2/5] bus/pci: fix size of driver name buffer
  2018-05-18 11:37   ` [dpdk-stable] [PATCH 0/5] 18.02 Requested backports Andy Green
  2018-05-18 11:37     ` [dpdk-stable] [PATCH 1/5] eal: support strlcpy function Andy Green
@ 2018-05-18 11:37     ` Andy Green
  2018-05-18 11:38     ` [dpdk-stable] [PATCH 3/5] net/qede: fix strncpy Andy Green
                       ` (3 subsequent siblings)
  5 siblings, 0 replies; 23+ messages in thread
From: Andy Green @ 2018-05-18 11:37 UTC (permalink / raw)
  To: stable

Variable dri_name is a pointer and it is incorrect to use its
size as the buffer size. Caller knows the buffer size and
it is safer to pass it explicitly.

Fixes: fe5f777b5383 ("bus/pci: replace strncpy by strlcpy")
Cc: stable@dpdk.org

Signed-off-by: Andy Green <andy@warmcat.com>
Reviewed-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/bus/pci/linux/pci.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/bus/pci/linux/pci.c b/drivers/bus/pci/linux/pci.c
index 5da6728fb..52b3e21fe 100644
--- a/drivers/bus/pci/linux/pci.c
+++ b/drivers/bus/pci/linux/pci.c
@@ -62,7 +62,8 @@
 extern struct rte_pci_bus rte_pci_bus;
 
 static int
-pci_get_kernel_driver_by_path(const char *filename, char *dri_name)
+pci_get_kernel_driver_by_path(const char *filename, char *dri_name,
+			      size_t len)
 {
 	int count;
 	char path[PATH_MAX];
@@ -83,7 +84,7 @@ pci_get_kernel_driver_by_path(const char *filename, char *dri_name)
 
 	name = strrchr(path, '/');
 	if (name) {
-		strncpy(dri_name, name + 1, strlen(name + 1) + 1);
+		strlcpy(dri_name, name + 1, len);
 		return 0;
 	}
 
@@ -339,7 +340,7 @@ pci_scan_one(const char *dirname, const struct rte_pci_addr *addr)
 
 	/* parse driver */
 	snprintf(filename, sizeof(filename), "%s/driver", dirname);
-	ret = pci_get_kernel_driver_by_path(filename, driver);
+	ret = pci_get_kernel_driver_by_path(filename, driver, sizeof(driver));
 	if (ret < 0) {
 		RTE_LOG(ERR, EAL, "Fail to get kernel driver\n");
 		free(dev);

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

* [dpdk-stable] [PATCH 3/5] net/qede: fix strncpy
  2018-05-18 11:37   ` [dpdk-stable] [PATCH 0/5] 18.02 Requested backports Andy Green
  2018-05-18 11:37     ` [dpdk-stable] [PATCH 1/5] eal: support strlcpy function Andy Green
  2018-05-18 11:37     ` [dpdk-stable] [PATCH 2/5] bus/pci: fix size of driver name buffer Andy Green
@ 2018-05-18 11:38     ` Andy Green
  2018-05-18 11:38     ` [dpdk-stable] [PATCH 4/5] net/qede: replace strncpy by strlcpy Andy Green
                       ` (2 subsequent siblings)
  5 siblings, 0 replies; 23+ messages in thread
From: Andy Green @ 2018-05-18 11:38 UTC (permalink / raw)
  To: stable

drivers/net/qede/qede_main.c: In function ‘qed_slowpath_start’:
drivers/net/qede/qede_main.c:307:3: error:
‘strncpy’ output may be truncated copying 12 bytes from a string of length 127
[-Werror=stringop-truncation]
   strncpy((char *)drv_version.name, (const char *)params->name,
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    MCP_DRV_VER_STR_SIZE - 4);
    ~~~~~~~~~~~~~~~~~~~~~~~~~

Fixes: 86a2265e59d7 ("qede: add SRIOV support")
Cc: stable@dpdk.org

Signed-off-by: Andy Green <andy@warmcat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/qede/qede_main.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/qede/qede_main.c b/drivers/net/qede/qede_main.c
index ae1873215..04e98b758 100644
--- a/drivers/net/qede/qede_main.c
+++ b/drivers/net/qede/qede_main.c
@@ -9,6 +9,7 @@
 #include <limits.h>
 #include <time.h>
 #include <rte_alarm.h>
+#include <rte_string_fns.h>
 
 #include "qede_ethdev.h"
 
@@ -302,9 +303,8 @@ static int qed_slowpath_start(struct ecore_dev *edev,
 		drv_version.version = (params->drv_major << 24) |
 		    (params->drv_minor << 16) |
 		    (params->drv_rev << 8) | (params->drv_eng);
-		/* TBD: strlcpy() */
-		strncpy((char *)drv_version.name, (const char *)params->name,
-			MCP_DRV_VER_STR_SIZE - 4);
+		strlcpy((char *)drv_version.name, (const char *)params->name,
+			sizeof(drv_version.name));
 		rc = ecore_mcp_send_drv_version(hwfn, hwfn->p_main_ptt,
 						&drv_version);
 		if (rc) {

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

* [dpdk-stable] [PATCH 4/5] net/qede: replace strncpy by strlcpy
  2018-05-18 11:37   ` [dpdk-stable] [PATCH 0/5] 18.02 Requested backports Andy Green
                       ` (2 preceding siblings ...)
  2018-05-18 11:38     ` [dpdk-stable] [PATCH 3/5] net/qede: fix strncpy Andy Green
@ 2018-05-18 11:38     ` Andy Green
  2018-05-18 11:38     ` [dpdk-stable] [PATCH 5/5] net/sfc: make sure that stats name is nul-terminated Andy Green
  2018-05-18 13:13     ` [dpdk-stable] [PATCH 0/5] 18.02 Requested backports Luca Boccassi
  5 siblings, 0 replies; 23+ messages in thread
From: Andy Green @ 2018-05-18 11:38 UTC (permalink / raw)
  To: stable

Fixes: 8427c6647964 ("net/qede/base: add attention formatting string")
Cc: stable@dpdk.org

Signed-off-by: Andy Green <andy@warmcat.com>
Reviewed-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 drivers/net/qede/base/ecore_int.c |    8 +++++---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/drivers/net/qede/base/ecore_int.c b/drivers/net/qede/base/ecore_int.c
index e6cef85bc..87a906f9a 100644
--- a/drivers/net/qede/base/ecore_int.c
+++ b/drivers/net/qede/base/ecore_int.c
@@ -6,6 +6,8 @@
  * See LICENSE.qede_pmd for copyright and licensing details.
  */
 
+#include <rte_string_fns.h>
+
 #include "bcm_osal.h"
 #include "ecore.h"
 #include "ecore_spq.h"
@@ -1104,9 +1106,9 @@ static enum _ecore_status_t ecore_int_deassertion(struct ecore_hwfn *p_hwfn,
 							      p_aeu->bit_name,
 							      num);
 					else
-						OSAL_STRNCPY(bit_name,
-							     p_aeu->bit_name,
-							     30);
+						strlcpy(bit_name,
+							p_aeu->bit_name,
+							sizeof(bit_name));
 
 					/* We now need to pass bitmask in its
 					 * correct position.

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

* [dpdk-stable] [PATCH 5/5] net/sfc: make sure that stats name is nul-terminated
  2018-05-18 11:37   ` [dpdk-stable] [PATCH 0/5] 18.02 Requested backports Andy Green
                       ` (3 preceding siblings ...)
  2018-05-18 11:38     ` [dpdk-stable] [PATCH 4/5] net/qede: replace strncpy by strlcpy Andy Green
@ 2018-05-18 11:38     ` Andy Green
  2018-05-18 13:13     ` [dpdk-stable] [PATCH 0/5] 18.02 Requested backports Luca Boccassi
  5 siblings, 0 replies; 23+ messages in thread
From: Andy Green @ 2018-05-18 11:38 UTC (permalink / raw)
  To: stable

Fixes: 73280c1e4ff2 ("net/sfc: support xstats retrieval by ID")
Fixes: 7b9891769f4b ("net/sfc: support extended statistics")
Cc: stable@dpdk.org

Signed-off-by: Andy Green <andy@warmcat.com>
Acked-by: Andrew Rybchenko <arybchenko@solarflare.com>
---
 drivers/net/sfc/sfc_ethdev.c |    6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/net/sfc/sfc_ethdev.c b/drivers/net/sfc/sfc_ethdev.c
index 2f5f86f84..7373ebeec 100644
--- a/drivers/net/sfc/sfc_ethdev.c
+++ b/drivers/net/sfc/sfc_ethdev.c
@@ -35,6 +35,7 @@
 #include <rte_pci.h>
 #include <rte_bus_pci.h>
 #include <rte_errno.h>
+#include <rte_string_fns.h>
 
 #include "efx.h"
 
@@ -666,7 +667,7 @@ sfc_xstats_get_names(struct rte_eth_dev *dev,
 	for (i = 0; i < EFX_MAC_NSTATS; ++i) {
 		if (EFX_MAC_STAT_SUPPORTED(port->mac_stats_mask, i)) {
 			if (xstats_names != NULL && nstats < xstats_count)
-				strncpy(xstats_names[nstats].name,
+				strlcpy(xstats_names[nstats].name,
 					efx_mac_stat_name(sa->nic, i),
 					sizeof(xstats_names[0].name));
 			nstats++;
@@ -744,9 +745,8 @@ sfc_xstats_get_names_by_id(struct rte_eth_dev *dev,
 		if ((ids == NULL) || (ids[nb_written] == nb_supported)) {
 			char *name = xstats_names[nb_written++].name;
 
-			strncpy(name, efx_mac_stat_name(sa->nic, i),
+			strlcpy(name, efx_mac_stat_name(sa->nic, i),
 				sizeof(xstats_names[0].name));
-			name[sizeof(xstats_names[0].name) - 1] = '\0';
 		}
 
 		++nb_supported;

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

* Re: [dpdk-stable] [PATCH 0/5] 18.02 Requested backports
  2018-05-18 11:37   ` [dpdk-stable] [PATCH 0/5] 18.02 Requested backports Andy Green
                       ` (4 preceding siblings ...)
  2018-05-18 11:38     ` [dpdk-stable] [PATCH 5/5] net/sfc: make sure that stats name is nul-terminated Andy Green
@ 2018-05-18 13:13     ` Luca Boccassi
  5 siblings, 0 replies; 23+ messages in thread
From: Luca Boccassi @ 2018-05-18 13:13 UTC (permalink / raw)
  To: Andy Green, stable

On Fri, 2018-05-18 at 19:37 +0800, Andy Green wrote:
> The following series backports the requested stuff.
> 
> One patch is dropped because the first patch does the right thing
> already.
> 
> BR's original strlcpy patch that added it in 18.05 is added to the
> series.
> 
> Build-tested on trusty.

Thanks, applied and pushed.

> ---
> 
> Andy Green (4):
>       bus/pci: fix size of driver name buffer
>       net/qede: fix strncpy
>       net/qede: replace strncpy by strlcpy
>       net/sfc: make sure that stats name is nul-terminated
> 
> Bruce Richardson (1):
>       eal: support strlcpy function
> 
> 
>  config/common_base                             |    1 +
>  devtools/cocci/strlcpy.cocci                   |    8 ++++++
>  drivers/bus/pci/linux/pci.c                    |    7 +++--
>  drivers/net/qede/base/ecore_int.c              |    8 ++++--
>  drivers/net/qede/qede_main.c                   |    6 ++---
>  drivers/net/sfc/sfc_ethdev.c                   |    6 ++---
>  lib/librte_eal/common/include/rte_string_fns.h |   31
> ++++++++++++++++++++++++
>  mk/rte.app.mk                                  |    3 ++
>  8 files changed, 58 insertions(+), 12 deletions(-)
>  create mode 100644 devtools/cocci/strlcpy.cocci
> 
> --
> Signature

-- 
Kind regards,
Luca Boccassi

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

* [dpdk-stable] please help backporting some patches to stable release 18.02.2
  2018-05-18  9:46 ` luca.boccassi
                     ` (2 preceding siblings ...)
  2018-05-18 11:37   ` [dpdk-stable] [PATCH 0/5] 18.02 Requested backports Andy Green
@ 2018-05-25 17:23   ` luca.boccassi
  3 siblings, 0 replies; 23+ messages in thread
From: luca.boccassi @ 2018-05-25 17:23 UTC (permalink / raw)
  To: dpdk stable
  Cc: Adrien Mazarguil, Ajit Khaparde, Andrew Rybchenko, Jay Ding,
	Randy Schacher, Ray Jui, Scott Branden

Hi commit authors (and maintainers),

I didn't manage to apply following commits from upstream to stable branch
18.02: conflict happens. I'm wondering can the authors check the following
list and backport those patches belong to you?

FYI, branch 18.02 is located at tree:
   git://dpdk.org/dpdk-stable

It'd be great if you could do that in one or two weeks. Also, please add a
heading line like below before the commit log body:
    [ backported from upstream commit xxx ]

Example: http://dpdk.org/browse/dpdk-stable/commit/?h=16.07&id=c4831394c7d1944d8ec27d52c22997f20d19718e

Also please mention the target stable in the subject line, as we have more than one
at the same time, for example:

    [PATCH 18.02] foo/bar: fix baz

With git send-email, this can be achieved by appending the parameter:

    --subject-prefix='PATCH 18.02'

Please let me know if you have any comments, say, need more time, or it's
worthless to packport it. And please send it to "stable@dpdk.org", but not
"dev@dpdk.org".

Thanks.

Luca Boccassi

---
5ff6aa243  Adrien Mazarguil app/testpmd: fix copy of raw flow item - revisited
a68e95fac  Adrien Mazarguil ethdev: fix shallow copy of flow API RAW item
27bdbbef1  Adrien Mazarguil net/mlx4: fix default in RSS converter
44cbeffe7  Ajit Khaparde    net/bnxt: fix RSS hash configuration
edafb57ba  Ajit Khaparde    net/bnxt: fix VF resource allocation

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

end of thread, other threads:[~2018-05-25 17:23 UTC | newest]

Thread overview: 23+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-30 15:23 [dpdk-stable] please help backporting some patches to stable release 18.02.2 luca.boccassi
2018-04-30 15:30 ` Maxime Coquelin
2018-04-30 15:44   ` Luca Boccassi
2018-04-30 16:06 ` Burakov, Anatoly
2018-04-30 16:33   ` Luca Boccassi
2018-05-02  6:04 ` Hyong Youb Kim
2018-05-02 10:43   ` Luca Boccassi
2018-05-02  8:27 ` Nélio Laranjeiro
2018-05-02 10:42   ` Luca Boccassi
2018-05-18  9:46 ` luca.boccassi
2018-05-18 10:11   ` Richardson, Bruce
2018-05-18 10:21     ` Luca Boccassi
2018-05-18 10:25   ` Andy Green
2018-05-18 10:33     ` Pattan, Reshma
2018-05-18 10:36       ` Andy Green
2018-05-18 11:37   ` [dpdk-stable] [PATCH 0/5] 18.02 Requested backports Andy Green
2018-05-18 11:37     ` [dpdk-stable] [PATCH 1/5] eal: support strlcpy function Andy Green
2018-05-18 11:37     ` [dpdk-stable] [PATCH 2/5] bus/pci: fix size of driver name buffer Andy Green
2018-05-18 11:38     ` [dpdk-stable] [PATCH 3/5] net/qede: fix strncpy Andy Green
2018-05-18 11:38     ` [dpdk-stable] [PATCH 4/5] net/qede: replace strncpy by strlcpy Andy Green
2018-05-18 11:38     ` [dpdk-stable] [PATCH 5/5] net/sfc: make sure that stats name is nul-terminated Andy Green
2018-05-18 13:13     ` [dpdk-stable] [PATCH 0/5] 18.02 Requested backports Luca Boccassi
2018-05-25 17:23   ` [dpdk-stable] please help backporting some patches to stable release 18.02.2 luca.boccassi

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).