patches for DPDK stable branches
 help / color / mirror / Atom feed
* [dpdk-stable] please help backporting some patches to LTS release 16.11.7
@ 2018-05-01 10:49 luca.boccassi
  2018-05-07  2:08 ` Chen, Junjie J
  2018-05-18  9:47 ` luca.boccassi
  0 siblings, 2 replies; 13+ messages in thread
From: luca.boccassi @ 2018-05-01 10:49 UTC (permalink / raw)
  To: dpdk stable
  Cc: Adrien Mazarguil, Ajit Khaparde, Anatoly Burakov, David Marchand,
	Didier Pallard, Ferruh Yigit, Fiona Trahe, Hemant Agrawal,
	Jens Freimann, Jianfeng Tan, Junjie Chen, Maxime Coquelin,
	Nelio Laranjeiro, Pablo de Lara, Pawel Wodkowski, Rasesh Mody,
	Santosh Shukla, Shahaf Shuler, Tomasz Kulasek, Tonghao Zhang,
	Yongseok Koh, Yong Wang, Zhiyong Yang

Hi commit authors (and maintainers),

I didn't manage to apply following commits from upstream to stable branch
16.11: conflict happens. I'm wondering can the authors check the following
list and see if they are applicable to the 16.11 LTS tree, and if so
backport those patches belong to you?

FYI, branch 16.11 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 LTS in the subject line, as we have more than one
at the same time, for example:

    [PATCH 16.11] foo/bar: fix baz

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

    --subject-prefix='16.11'

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

---
1b533790f  Ajit Khaparde    net/bnxt: avoid invalid vnic id in set L2 Rx mask
f4253e97e  Ajit Khaparde    net/bnxt: set padding flags in Rx descriptor
634d549c9  Anatoly Burakov  bus/fslmc: do not needlessly check for IOVA mode
bef5a2d62  Anatoly Burakov  vfio: do not needlessly check for IOVA mode
d08e3c90d  Didier Pallard   net/vmxnet3: fix Rx offload information in multiseg packets
30a701a53  Junjie Chen      net/vhost: fix crash when creating vdev dynamically
e6722dee5  Junjie Chen      net/vhost: fix invalid state
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
17c36a674  Pablo de Lara    crypto/zuc: batch ops with same transform
83ade1ebd  Rasesh Mody      net/qede: fix device stop to remove primary MAC
ecc3fa6d3  Santosh Shukla   net/octeontx: remove redundant driver name update
a1572312f  Shahaf Shuler    net/mlx5: enforce RSS key length limitation
a85a606ca  Shahaf Shuler    net/mlx5: fix link status initialization
90bb22a19  Tomasz Kulasek   vhost: fix ring index returned to master on stop
b9c0dea24  Tonghao Zhang    net/bonding: free mempool used in mode 6

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

* Re: [dpdk-stable] please help backporting some patches to LTS release 16.11.7
  2018-05-01 10:49 [dpdk-stable] please help backporting some patches to LTS release 16.11.7 luca.boccassi
@ 2018-05-07  2:08 ` Chen, Junjie J
  2018-05-08  9:50   ` Luca Boccassi
  2018-05-18  9:47 ` luca.boccassi
  1 sibling, 1 reply; 13+ messages in thread
From: Chen, Junjie J @ 2018-05-07  2:08 UTC (permalink / raw)
  To: stable

The following two patches should be not applicable to 16.11 LTS due to lots of rebase work needed.

30a701a53  Junjie Chen      net/vhost: fix crash when creating vdev dynamically
e6722dee5  Junjie Chen      net/vhost: fix invalid state

Cheers
JJ

> -----Original Message-----
> From: luca.boccassi@gmail.com [mailto:luca.boccassi@gmail.com]
> Sent: Tuesday, May 1, 2018 6:49 PM
> To: dpdk stable <stable@dpdk.org>
> Cc: Adrien Mazarguil <adrien.mazarguil@6wind.com>; Ajit Khaparde
> <ajit.khaparde@broadcom.com>; Burakov, Anatoly
> <anatoly.burakov@intel.com>; David Marchand <david.marchand@6wind.com>;
> Didier Pallard <didier.pallard@6wind.com>; Yigit, Ferruh
> <ferruh.yigit@intel.com>; Trahe, Fiona <fiona.trahe@intel.com>; Hemant
> Agrawal <hemant.agrawal@nxp.com>; Jens Freimann <jfreimann@redhat.com>;
> Tan, Jianfeng <jianfeng.tan@intel.com>; Chen, Junjie J
> <junjie.j.chen@intel.com>; Maxime Coquelin <maxime.coquelin@redhat.com>;
> Nelio Laranjeiro <nelio.laranjeiro@6wind.com>; De Lara Guarch, Pablo
> <pablo.de.lara.guarch@intel.com>; Wodkowski, PawelX
> <pawelx.wodkowski@intel.com>; Rasesh Mody <rasesh.mody@cavium.com>;
> Santosh Shukla <santosh.shukla@caviumnetworks.com>; Shahaf Shuler
> <shahafs@mellanox.com>; Kulasek, TomaszX <tomaszx.kulasek@intel.com>;
> Tonghao Zhang <xiangxia.m.yue@gmail.com>; Yongseok Koh
> <yskoh@mellanox.com>; Yong Wang <yongwang@vmware.com>; Yang,
> Zhiyong <zhiyong.yang@intel.com>
> Subject: please help backporting some patches to LTS release 16.11.7
> 
> Hi commit authors (and maintainers),
> 
> I didn't manage to apply following commits from upstream to stable branch
> 16.11: conflict happens. I'm wondering can the authors check the following list
> and see if they are applicable to the 16.11 LTS tree, and if so backport those
> patches belong to you?
> 
> FYI, branch 16.11 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=c4831394c7d1944d
> 8ec27d52c22997f20d19718e
> 
> Also please mention the target LTS in the subject line, as we have more than
> one at the same time, for example:
> 
>     [PATCH 16.11] foo/bar: fix baz
> 
> With git send-email, this can be achieved by appending the parameter:
> 
>     --subject-prefix='16.11'
> 
> 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
> 
> ---
> 1b533790f  Ajit Khaparde    net/bnxt: avoid invalid vnic id in set L2 Rx mask
> f4253e97e  Ajit Khaparde    net/bnxt: set padding flags in Rx descriptor
> 634d549c9  Anatoly Burakov  bus/fslmc: do not needlessly check for IOVA
> mode
> bef5a2d62  Anatoly Burakov  vfio: do not needlessly check for IOVA mode
> d08e3c90d  Didier Pallard   net/vmxnet3: fix Rx offload information in
> multiseg packets
> 30a701a53  Junjie Chen      net/vhost: fix crash when creating vdev
> dynamically
> e6722dee5  Junjie Chen      net/vhost: fix invalid state
> 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
> 17c36a674  Pablo de Lara    crypto/zuc: batch ops with same transform
> 83ade1ebd  Rasesh Mody      net/qede: fix device stop to remove primary
> MAC
> ecc3fa6d3  Santosh Shukla   net/octeontx: remove redundant driver name
> update
> a1572312f  Shahaf Shuler    net/mlx5: enforce RSS key length limitation
> a85a606ca  Shahaf Shuler    net/mlx5: fix link status initialization
> 90bb22a19  Tomasz Kulasek   vhost: fix ring index returned to master on
> stop
> b9c0dea24  Tonghao Zhang    net/bonding: free mempool used in mode 6

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

* Re: [dpdk-stable] please help backporting some patches to LTS release 16.11.7
  2018-05-07  2:08 ` Chen, Junjie J
@ 2018-05-08  9:50   ` Luca Boccassi
  0 siblings, 0 replies; 13+ messages in thread
From: Luca Boccassi @ 2018-05-08  9:50 UTC (permalink / raw)
  To: Chen, Junjie J, stable

On Mon, 2018-05-07 at 02:08 +0000, Chen, Junjie J wrote:
> The following two patches should be not applicable to 16.11 LTS due
> to lots of rebase work needed.
> 
> 30a701a53  Junjie Chen      net/vhost: fix crash when creating vdev
> dynamically
> e6722dee5  Junjie Chen      net/vhost: fix invalid state
> 
> Cheers
> JJ

Ok, thanks for the heads-up.

-- 
Kind regards,
Luca Boccassi

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

* [dpdk-stable] please help backporting some patches to LTS release 16.11.7
  2018-05-01 10:49 [dpdk-stable] please help backporting some patches to LTS release 16.11.7 luca.boccassi
  2018-05-07  2:08 ` Chen, Junjie J
@ 2018-05-18  9:47 ` luca.boccassi
  2018-05-18 12:15   ` [dpdk-stable] [PATCH 0/4] 16.11 Requested backports Andy Green
  2018-05-25 17:24   ` [dpdk-stable] please help backporting some patches to LTS release 16.11.7 luca.boccassi
  1 sibling, 2 replies; 13+ messages in thread
From: luca.boccassi @ 2018-05-18  9:47 UTC (permalink / raw)
  To: dpdk stable
  Cc: Andrew Rybchenko, Andy Green, Cristian Dumitrescu,
	Declan Doherty, Ferruh Yigit, Kirill Rybalchenko, Matan Azrad,
	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
16.11: conflict happens. I'm wondering can the authors check the following
list and backport those patches belong to you?

FYI, branch 16.11 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 LTS in the subject line, as we have more than one
at the same time, for example:

    [PATCH 16.11] foo/bar: fix baz

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

    --subject-prefix='16.11'

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

---
52f711f7b  Andy Green       bus/pci: fix size of driver name buffer
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
1bdea6110  Kirill Rybalchenko examples/ipsec-secgw: fix IP address parsing
bafa9aa0d  Matan Azrad      ethdev: fix port removal notification timing
59056833c  Matan Azrad      net/bonding: fix slave activation simultaneously
ae943ebe1  Reshma Pattan    examples/ipsec-secgw: replace strncpy with strlcpy

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

* [dpdk-stable] [PATCH 0/4] 16.11 Requested backports
  2018-05-18  9:47 ` luca.boccassi
@ 2018-05-18 12:15   ` Andy Green
  2018-05-18 12:16     ` [dpdk-stable] [PATCH 1/4] eal: support strlcpy function Andy Green
                       ` (4 more replies)
  2018-05-25 17:24   ` [dpdk-stable] please help backporting some patches to LTS release 16.11.7 luca.boccassi
  1 sibling, 5 replies; 13+ messages in thread
From: Andy Green @ 2018-05-18 12:15 UTC (permalink / raw)
  To: stable

The following series are the requested patches including
the BR patch introducing strlcpy and excluding a patch
that in not needed, same as on 18.02.

I am unable to build test it, since even on trusty 16.11 build spews
errors even without any changes.

However it probably builds since it's based on 18.02 with
the removal of some stuff caught in the diff for those patches
that doesn't exist on 16.11.

---

Andy Green (3):
      bus/pci: fix size of driver name buffer
      net/qede: fix strncpy
      net/qede: replace strncpy by strlcpy

Bruce Richardson (1):
      eal: support strlcpy function


 config/common_base                             |    1 +
 devtools/cocci/strlcpy.cocci                   |    8 ++++++
 drivers/net/qede/base/ecore_int.c              |    9 +++++--
 drivers/net/qede/qede_main.c                   |    6 ++---
 lib/librte_eal/common/include/rte_string_fns.h |   31 ++++++++++++++++++++++++
 lib/librte_eal/linuxapp/eal/eal_pci.c          |    7 +++--
 mk/rte.app.mk                                  |    3 ++
 7 files changed, 56 insertions(+), 9 deletions(-)
 create mode 100644 devtools/cocci/strlcpy.cocci

--
Signature

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

* [dpdk-stable] [PATCH 1/4] eal: support strlcpy function
  2018-05-18 12:15   ` [dpdk-stable] [PATCH 0/4] 16.11 Requested backports Andy Green
@ 2018-05-18 12:16     ` Andy Green
  2018-05-18 12:16     ` [dpdk-stable] [PATCH 2/4] bus/pci: fix size of driver name buffer Andy Green
                       ` (3 subsequent siblings)
  4 siblings, 0 replies; 13+ messages in thread
From: Andy Green @ 2018-05-18 12:16 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 4bff83af7..75136a2e4 100644
--- a/config/common_base
+++ b/config/common_base
@@ -96,6 +96,7 @@ CONFIG_RTE_EAL_ALWAYS_PANIC_ON_ERROR=n
 CONFIG_RTE_EAL_IGB_UIO=n
 CONFIG_RTE_EAL_VFIO=n
 CONFIG_RTE_MALLOC_DEBUG=n
+CONFIG_RTE_USE_LIBBSD=n
 
 # Default driver path (or "" to disable)
 CONFIG_RTE_EAL_PMD_PATH=""
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 f75f0e24d..feaa7ec8d 100644
--- a/mk/rte.app.mk
+++ b/mk/rte.app.mk
@@ -155,6 +155,9 @@ ifeq ($(CONFIG_RTE_BUILD_SHARED_LIB),n)
 # The static libraries do not know their dependencies.
 # So linking with static library requires explicit dependencies.
 _LDLIBS-$(CONFIG_RTE_LIBRTE_EAL)            += -lrt
+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_METER)          += -lm

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

* [dpdk-stable] [PATCH 2/4] bus/pci: fix size of driver name buffer
  2018-05-18 12:15   ` [dpdk-stable] [PATCH 0/4] 16.11 Requested backports Andy Green
  2018-05-18 12:16     ` [dpdk-stable] [PATCH 1/4] eal: support strlcpy function Andy Green
@ 2018-05-18 12:16     ` Andy Green
  2018-05-18 12:16     ` [dpdk-stable] [PATCH 3/4] net/qede: fix strncpy Andy Green
                       ` (2 subsequent siblings)
  4 siblings, 0 replies; 13+ messages in thread
From: Andy Green @ 2018-05-18 12:16 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>
---
 lib/librte_eal/linuxapp/eal/eal_pci.c |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/lib/librte_eal/linuxapp/eal/eal_pci.c b/lib/librte_eal/linuxapp/eal/eal_pci.c
index 876ba3819..f9fde3f07 100644
--- a/lib/librte_eal/linuxapp/eal/eal_pci.c
+++ b/lib/librte_eal/linuxapp/eal/eal_pci.c
@@ -94,7 +94,8 @@ pci_unbind_kernel_driver(struct rte_pci_device *dev)
 }
 
 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];
@@ -115,7 +116,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;
 	}
 
@@ -369,7 +370,7 @@ pci_scan_one(const char *dirname, uint16_t domain, uint8_t bus,
 
 	/* 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] 13+ messages in thread

* [dpdk-stable] [PATCH 3/4] net/qede: fix strncpy
  2018-05-18 12:15   ` [dpdk-stable] [PATCH 0/4] 16.11 Requested backports Andy Green
  2018-05-18 12:16     ` [dpdk-stable] [PATCH 1/4] eal: support strlcpy function Andy Green
  2018-05-18 12:16     ` [dpdk-stable] [PATCH 2/4] bus/pci: fix size of driver name buffer Andy Green
@ 2018-05-18 12:16     ` Andy Green
  2018-05-18 12:16     ` [dpdk-stable] [PATCH 4/4] net/qede: replace strncpy by strlcpy Andy Green
  2018-05-18 12:48     ` [dpdk-stable] [PATCH 0/4] 16.11 Requested backports Luca Boccassi
  4 siblings, 0 replies; 13+ messages in thread
From: Andy Green @ 2018-05-18 12:16 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 ab22409a1..fef7003ea 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"
 
@@ -299,9 +300,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] 13+ messages in thread

* [dpdk-stable] [PATCH 4/4] net/qede: replace strncpy by strlcpy
  2018-05-18 12:15   ` [dpdk-stable] [PATCH 0/4] 16.11 Requested backports Andy Green
                       ` (2 preceding siblings ...)
  2018-05-18 12:16     ` [dpdk-stable] [PATCH 3/4] net/qede: fix strncpy Andy Green
@ 2018-05-18 12:16     ` Andy Green
  2018-05-18 12:48     ` [dpdk-stable] [PATCH 0/4] 16.11 Requested backports Luca Boccassi
  4 siblings, 0 replies; 13+ messages in thread
From: Andy Green @ 2018-05-18 12:16 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 |    9 ++++++---
 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/drivers/net/qede/base/ecore_int.c b/drivers/net/qede/base/ecore_int.c
index 6fb037dfd..207b01b9a 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"
@@ -938,9 +940,10 @@ static enum _ecore_status_t ecore_int_deassertion(struct ecore_hwfn *p_hwfn,
 							      p_aeu->bit_name,
 							      bit);
 					else
-						OSAL_STRNCPY(bit_name,
-							     p_aeu->bit_name,
-							     30);
+						strlcpy(bit_name,
+							p_aeu->bit_name,
+							sizeof(bit_name));
+
 					/* Handle source of the attention */
 					ecore_int_deassertion_aeu_bit(p_hwfn,
 								      p_aeu,

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

* Re: [dpdk-stable] [PATCH 0/4] 16.11 Requested backports
  2018-05-18 12:15   ` [dpdk-stable] [PATCH 0/4] 16.11 Requested backports Andy Green
                       ` (3 preceding siblings ...)
  2018-05-18 12:16     ` [dpdk-stable] [PATCH 4/4] net/qede: replace strncpy by strlcpy Andy Green
@ 2018-05-18 12:48     ` Luca Boccassi
  4 siblings, 0 replies; 13+ messages in thread
From: Luca Boccassi @ 2018-05-18 12:48 UTC (permalink / raw)
  To: Andy Green, stable

On Fri, 2018-05-18 at 20:15 +0800, Andy Green wrote:
> The following series are the requested patches including
> the BR patch introducing strlcpy and excluding a patch
> that in not needed, same as on 18.02.
> 
> I am unable to build test it, since even on trusty 16.11 build spews
> errors even without any changes.
> 
> However it probably builds since it's based on 18.02 with
> the removal of some stuff caught in the diff for those patches
> that doesn't exist on 16.11.

Thanks, applied and pushed. I verified it builds on Debian 9 both with
and without _LIBBSD.

-- 
Kind regards,
Luca Boccassi

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

* [dpdk-stable] please help backporting some patches to LTS release 16.11.7
  2018-05-18  9:47 ` luca.boccassi
  2018-05-18 12:15   ` [dpdk-stable] [PATCH 0/4] 16.11 Requested backports Andy Green
@ 2018-05-25 17:24   ` luca.boccassi
  2018-05-29 21:59     ` Shaikh, Shahed
  1 sibling, 1 reply; 13+ messages in thread
From: luca.boccassi @ 2018-05-25 17:24 UTC (permalink / raw)
  To: dpdk stable
  Cc: Ajit Khaparde, Bernard Iremonger, Harish Patil, Lei Yao,
	Michael S . Tsirkin, Qingmin Liu, Rasesh Mody, Shahed Shaikh,
	Somnath Kotur, Tiwei Bie, Zhiyong Yang

Hi commit authors (and maintainers),

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

FYI, branch 16.11 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 LTS in the subject line, as we have more than one
at the same time, for example:

    [PATCH 16.11] foo/bar: fix baz

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

    --subject-prefix='PATCH 16.11'

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

---
44cbeffe7  Ajit Khaparde    net/bnxt: fix RSS hash configuration
2b947bd29  Ajit Khaparde    net/bnxt: use first completion ring for fwd and async event
413ecf294  Harish Patil     net/qede: fix multicast filtering
124909d7e  Zhiyong Yang     app/testpmd: fix exit for virtio-user

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

* Re: [dpdk-stable] please help backporting some patches to LTS release 16.11.7
  2018-05-25 17:24   ` [dpdk-stable] please help backporting some patches to LTS release 16.11.7 luca.boccassi
@ 2018-05-29 21:59     ` Shaikh, Shahed
  2018-05-29 22:55       ` Luca Boccassi
  0 siblings, 1 reply; 13+ messages in thread
From: Shaikh, Shahed @ 2018-05-29 21:59 UTC (permalink / raw)
  To: luca.boccassi, dpdk stable
  Cc: Ajit Khaparde, Bernard Iremonger, Patil, Harish, Lei Yao,
	Michael S . Tsirkin, Qingmin Liu, Mody, Rasesh, Somnath Kotur,
	Tiwei Bie, Zhiyong Yang

Hi Luca,

> 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
> 
> ---
> 44cbeffe7  Ajit Khaparde    net/bnxt: fix RSS hash configuration
> 2b947bd29  Ajit Khaparde    net/bnxt: use first completion ring for fwd and async
> event
> 413ecf294  Harish Patil     net/qede: fix multicast filtering
This patch is not applicable for LTS release 16.11.7. Please skip it.


Thanks,
Shahed

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

* Re: [dpdk-stable] please help backporting some patches to LTS release 16.11.7
  2018-05-29 21:59     ` Shaikh, Shahed
@ 2018-05-29 22:55       ` Luca Boccassi
  0 siblings, 0 replies; 13+ messages in thread
From: Luca Boccassi @ 2018-05-29 22:55 UTC (permalink / raw)
  To: Shaikh, Shahed, dpdk stable

On Tue, 2018-05-29 at 21:59 +0000, Shaikh, Shahed wrote:
> Hi Luca,
> 
> > 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
> > 
> > ---
> > 44cbeffe7  Ajit Khaparde    net/bnxt: fix RSS hash configuration
> > 2b947bd29  Ajit Khaparde    net/bnxt: use first completion ring for
> > fwd and async
> > event
> > 413ecf294  Harish Patil     net/qede: fix multicast filtering
> 
> This patch is not applicable for LTS release 16.11.7. Please skip it.

Ok, thanks.

-- 
Kind regards,
Luca Boccassi

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

end of thread, other threads:[~2018-05-29 22:55 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-05-01 10:49 [dpdk-stable] please help backporting some patches to LTS release 16.11.7 luca.boccassi
2018-05-07  2:08 ` Chen, Junjie J
2018-05-08  9:50   ` Luca Boccassi
2018-05-18  9:47 ` luca.boccassi
2018-05-18 12:15   ` [dpdk-stable] [PATCH 0/4] 16.11 Requested backports Andy Green
2018-05-18 12:16     ` [dpdk-stable] [PATCH 1/4] eal: support strlcpy function Andy Green
2018-05-18 12:16     ` [dpdk-stable] [PATCH 2/4] bus/pci: fix size of driver name buffer Andy Green
2018-05-18 12:16     ` [dpdk-stable] [PATCH 3/4] net/qede: fix strncpy Andy Green
2018-05-18 12:16     ` [dpdk-stable] [PATCH 4/4] net/qede: replace strncpy by strlcpy Andy Green
2018-05-18 12:48     ` [dpdk-stable] [PATCH 0/4] 16.11 Requested backports Luca Boccassi
2018-05-25 17:24   ` [dpdk-stable] please help backporting some patches to LTS release 16.11.7 luca.boccassi
2018-05-29 21:59     ` Shaikh, Shahed
2018-05-29 22:55       ` 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).