DPDK patches and discussions
 help / color / mirror / Atom feed
* [dpdk-dev] [PATCH 1/2] kni: add config option for KNI ethtool
@ 2017-01-17 18:01 Ferruh Yigit
  2017-01-17 18:01 ` [dpdk-dev] [PATCH 2/2] config: disable KNI ethtool by default Ferruh Yigit
  0 siblings, 1 reply; 7+ messages in thread
From: Ferruh Yigit @ 2017-01-17 18:01 UTC (permalink / raw)
  To: dev; +Cc: Ferruh Yigit

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 config/common_base                     |  1 +
 config/common_linuxapp                 |  1 +
 lib/librte_eal/linuxapp/kni/Makefile   | 50 +++++++++++++++++-----------------
 lib/librte_eal/linuxapp/kni/kni_misc.c | 11 ++++++--
 4 files changed, 35 insertions(+), 28 deletions(-)

diff --git a/config/common_base b/config/common_base
index 8e9dcfa..4c5439c 100644
--- a/config/common_base
+++ b/config/common_base
@@ -553,6 +553,7 @@ CONFIG_RTE_PIPELINE_STATS_COLLECT=n
 #
 CONFIG_RTE_LIBRTE_KNI=n
 CONFIG_RTE_KNI_KMOD=n
+CONFIG_RTE_KNI_KMOD_ETHTOOL=n
 CONFIG_RTE_KNI_PREEMPT_DEFAULT=y
 CONFIG_RTE_KNI_VHOST=n
 CONFIG_RTE_KNI_VHOST_MAX_CACHE_SIZE=1024
diff --git a/config/common_linuxapp b/config/common_linuxapp
index 2483dfa..d4c4f0c 100644
--- a/config/common_linuxapp
+++ b/config/common_linuxapp
@@ -38,6 +38,7 @@ CONFIG_RTE_EXEC_ENV_LINUXAPP=y
 CONFIG_RTE_EAL_IGB_UIO=y
 CONFIG_RTE_EAL_VFIO=y
 CONFIG_RTE_KNI_KMOD=y
+CONFIG_RTE_KNI_KMOD_ETHTOOL=y
 CONFIG_RTE_LIBRTE_KNI=y
 CONFIG_RTE_LIBRTE_VHOST=y
 CONFIG_RTE_LIBRTE_PMD_VHOST=y
diff --git a/lib/librte_eal/linuxapp/kni/Makefile b/lib/librte_eal/linuxapp/kni/Makefile
index 1e47561..3c22b63 100644
--- a/lib/librte_eal/linuxapp/kni/Makefile
+++ b/lib/librte_eal/linuxapp/kni/Makefile
@@ -59,32 +59,32 @@ DEPDIRS-y += lib/librte_eal/linuxapp/eal
 #
 # all source are stored in SRCS-y
 #
-SRCS-y := ethtool/ixgbe/ixgbe_main.c
-SRCS-y += ethtool/ixgbe/ixgbe_api.c
-SRCS-y += ethtool/ixgbe/ixgbe_common.c
-SRCS-y += ethtool/ixgbe/ixgbe_ethtool.c
-SRCS-y += ethtool/ixgbe/ixgbe_82599.c
-SRCS-y += ethtool/ixgbe/ixgbe_82598.c
-SRCS-y += ethtool/ixgbe/ixgbe_x540.c
-SRCS-y += ethtool/ixgbe/ixgbe_phy.c
-SRCS-y += ethtool/ixgbe/kcompat.c
-
-SRCS-y += ethtool/igb/e1000_82575.c
-SRCS-y += ethtool/igb/e1000_i210.c
-SRCS-y += ethtool/igb/e1000_api.c
-SRCS-y += ethtool/igb/e1000_mac.c
-SRCS-y += ethtool/igb/e1000_manage.c
-SRCS-y += ethtool/igb/e1000_mbx.c
-SRCS-y += ethtool/igb/e1000_nvm.c
-SRCS-y += ethtool/igb/e1000_phy.c
-SRCS-y += ethtool/igb/igb_ethtool.c
-SRCS-y += ethtool/igb/igb_main.c
-SRCS-y += ethtool/igb/igb_param.c
-SRCS-y += ethtool/igb/igb_vmdq.c
-
-SRCS-y += kni_misc.c
+SRCS-y := kni_misc.c
 SRCS-y += kni_net.c
-SRCS-y += kni_ethtool.c
 SRCS-$(CONFIG_RTE_KNI_VHOST) += kni_vhost.c
+SRCS-$(CONFIG_RTE_KNI_KMOD_ETHTOOL) += kni_ethtool.c
+
+SRCS-$(CONFIG_RTE_KNI_KMOD_ETHTOOL) += ethtool/ixgbe/ixgbe_main.c
+SRCS-$(CONFIG_RTE_KNI_KMOD_ETHTOOL) += ethtool/ixgbe/ixgbe_api.c
+SRCS-$(CONFIG_RTE_KNI_KMOD_ETHTOOL) += ethtool/ixgbe/ixgbe_common.c
+SRCS-$(CONFIG_RTE_KNI_KMOD_ETHTOOL) += ethtool/ixgbe/ixgbe_ethtool.c
+SRCS-$(CONFIG_RTE_KNI_KMOD_ETHTOOL) += ethtool/ixgbe/ixgbe_82599.c
+SRCS-$(CONFIG_RTE_KNI_KMOD_ETHTOOL) += ethtool/ixgbe/ixgbe_82598.c
+SRCS-$(CONFIG_RTE_KNI_KMOD_ETHTOOL) += ethtool/ixgbe/ixgbe_x540.c
+SRCS-$(CONFIG_RTE_KNI_KMOD_ETHTOOL) += ethtool/ixgbe/ixgbe_phy.c
+SRCS-$(CONFIG_RTE_KNI_KMOD_ETHTOOL) += ethtool/ixgbe/kcompat.c
+
+SRCS-$(CONFIG_RTE_KNI_KMOD_ETHTOOL) += ethtool/igb/e1000_82575.c
+SRCS-$(CONFIG_RTE_KNI_KMOD_ETHTOOL) += ethtool/igb/e1000_i210.c
+SRCS-$(CONFIG_RTE_KNI_KMOD_ETHTOOL) += ethtool/igb/e1000_api.c
+SRCS-$(CONFIG_RTE_KNI_KMOD_ETHTOOL) += ethtool/igb/e1000_mac.c
+SRCS-$(CONFIG_RTE_KNI_KMOD_ETHTOOL) += ethtool/igb/e1000_manage.c
+SRCS-$(CONFIG_RTE_KNI_KMOD_ETHTOOL) += ethtool/igb/e1000_mbx.c
+SRCS-$(CONFIG_RTE_KNI_KMOD_ETHTOOL) += ethtool/igb/e1000_nvm.c
+SRCS-$(CONFIG_RTE_KNI_KMOD_ETHTOOL) += ethtool/igb/e1000_phy.c
+SRCS-$(CONFIG_RTE_KNI_KMOD_ETHTOOL) += ethtool/igb/igb_ethtool.c
+SRCS-$(CONFIG_RTE_KNI_KMOD_ETHTOOL) += ethtool/igb/igb_main.c
+SRCS-$(CONFIG_RTE_KNI_KMOD_ETHTOOL) += ethtool/igb/igb_param.c
+SRCS-$(CONFIG_RTE_KNI_KMOD_ETHTOOL) += ethtool/igb/igb_vmdq.c
 
 include $(RTE_SDK)/mk/rte.module.mk
diff --git a/lib/librte_eal/linuxapp/kni/kni_misc.c b/lib/librte_eal/linuxapp/kni/kni_misc.c
index 497db9b..b56914e 100644
--- a/lib/librte_eal/linuxapp/kni/kni_misc.c
+++ b/lib/librte_eal/linuxapp/kni/kni_misc.c
@@ -205,12 +205,14 @@ kni_dev_remove(struct kni_dev *dev)
 	if (!dev)
 		return -ENODEV;
 
+#ifdef CONFIG_RTE_KNI_KMOD_ETHTOOL
 	if (dev->pci_dev) {
 		if (pci_match_id(ixgbe_pci_tbl, dev->pci_dev))
 			ixgbe_kni_remove(dev->pci_dev);
 		else if (pci_match_id(igb_pci_tbl, dev->pci_dev))
 			igb_kni_remove(dev->pci_dev);
 	}
+#endif
 
 	if (dev->net_dev) {
 		unregister_netdev(dev->net_dev);
@@ -326,10 +328,7 @@ kni_ioctl_create(struct net *net, uint32_t ioctl_num,
 	struct kni_net *knet = net_generic(net, kni_net_id);
 	int ret;
 	struct rte_kni_device_info dev_info;
-	struct pci_dev *pci = NULL;
-	struct pci_dev *found_pci = NULL;
 	struct net_device *net_dev = NULL;
-	struct net_device *lad_dev = NULL;
 	struct kni_dev *kni, *dev, *n;
 
 	pr_info("Creating kni...\n");
@@ -419,6 +418,11 @@ kni_ioctl_create(struct net *net, uint32_t ioctl_num,
 					dev_info.vendor_id,
 					dev_info.device_id);
 
+#ifdef CONFIG_RTE_KNI_KMOD_ETHTOOL
+	struct pci_dev *found_pci = NULL;
+	struct net_device *lad_dev = NULL;
+	struct pci_dev *pci = NULL;
+
 	pci = pci_get_device(dev_info.vendor_id, dev_info.device_id, NULL);
 
 	/* Support Ethtool */
@@ -459,6 +463,7 @@ kni_ioctl_create(struct net *net, uint32_t ioctl_num,
 	}
 	if (pci)
 		pci_dev_put(pci);
+#endif
 
 	if (kni->lad_dev)
 		ether_addr_copy(net_dev->dev_addr, kni->lad_dev->dev_addr);
-- 
2.9.3

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

* [dpdk-dev] [PATCH 2/2] config: disable KNI ethtool by default
  2017-01-17 18:01 [dpdk-dev] [PATCH 1/2] kni: add config option for KNI ethtool Ferruh Yigit
@ 2017-01-17 18:01 ` Ferruh Yigit
  2017-01-17 18:35   ` Thomas Monjalon
  2017-01-17 18:44   ` Jay Rolette
  0 siblings, 2 replies; 7+ messages in thread
From: Ferruh Yigit @ 2017-01-17 18:01 UTC (permalink / raw)
  To: dev; +Cc: Ferruh Yigit

KNI ethtool support (KNI control path) is not commonly used,
and it tends to break the build with new version of the Linux kernel.

KNI ethtool feature is disabled by default. KNI datapath is not effected
from this update.

It is possible to enable feature explicitly with config option:
"CONFIG_RTE_KNI_KMOD_ETHTOOL=y"

Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
---
 config/common_linuxapp | 1 -
 1 file changed, 1 deletion(-)

diff --git a/config/common_linuxapp b/config/common_linuxapp
index d4c4f0c..2483dfa 100644
--- a/config/common_linuxapp
+++ b/config/common_linuxapp
@@ -38,7 +38,6 @@ CONFIG_RTE_EXEC_ENV_LINUXAPP=y
 CONFIG_RTE_EAL_IGB_UIO=y
 CONFIG_RTE_EAL_VFIO=y
 CONFIG_RTE_KNI_KMOD=y
-CONFIG_RTE_KNI_KMOD_ETHTOOL=y
 CONFIG_RTE_LIBRTE_KNI=y
 CONFIG_RTE_LIBRTE_VHOST=y
 CONFIG_RTE_LIBRTE_PMD_VHOST=y
-- 
2.9.3

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

* Re: [dpdk-dev] [PATCH 2/2] config: disable KNI ethtool by default
  2017-01-17 18:01 ` [dpdk-dev] [PATCH 2/2] config: disable KNI ethtool by default Ferruh Yigit
@ 2017-01-17 18:35   ` Thomas Monjalon
  2017-01-29 21:38     ` Thomas Monjalon
  2017-01-17 18:44   ` Jay Rolette
  1 sibling, 1 reply; 7+ messages in thread
From: Thomas Monjalon @ 2017-01-17 18:35 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dev

2017-01-17 18:01, Ferruh Yigit:
> KNI ethtool support (KNI control path) is not commonly used,
> and it tends to break the build with new version of the Linux kernel.
> 
> KNI ethtool feature is disabled by default. KNI datapath is not effected
> from this update.
> 
> It is possible to enable feature explicitly with config option:
> "CONFIG_RTE_KNI_KMOD_ETHTOOL=y"
> 
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>

Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>

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

* Re: [dpdk-dev] [PATCH 2/2] config: disable KNI ethtool by default
  2017-01-17 18:01 ` [dpdk-dev] [PATCH 2/2] config: disable KNI ethtool by default Ferruh Yigit
  2017-01-17 18:35   ` Thomas Monjalon
@ 2017-01-17 18:44   ` Jay Rolette
  2017-01-17 19:00     ` Ferruh Yigit
  1 sibling, 1 reply; 7+ messages in thread
From: Jay Rolette @ 2017-01-17 18:44 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: DPDK

On Tue, Jan 17, 2017 at 12:01 PM, Ferruh Yigit <ferruh.yigit@intel.com>
wrote:

> KNI ethtool support (KNI control path) is not commonly used,
> and it tends to break the build with new version of the Linux kernel.
>
> KNI ethtool feature is disabled by default. KNI datapath is not effected
> from this update.
>
> It is possible to enable feature explicitly with config option:
> "CONFIG_RTE_KNI_KMOD_ETHTOOL=y"
>
> Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
>

Is there a test case somewhere to detect when it gets broken or is the
intent to let it bit-rot unless someone enables that option and
subsequently discovers it broken?

I know we don't do this for every config option, but given the fact that
this tends to get broken frequently, it seems riskier.

Jay


> ---
>  config/common_linuxapp | 1 -
>  1 file changed, 1 deletion(-)
>
> diff --git a/config/common_linuxapp b/config/common_linuxapp
> index d4c4f0c..2483dfa 100644
> --- a/config/common_linuxapp
> +++ b/config/common_linuxapp
> @@ -38,7 +38,6 @@ CONFIG_RTE_EXEC_ENV_LINUXAPP=y
>  CONFIG_RTE_EAL_IGB_UIO=y
>  CONFIG_RTE_EAL_VFIO=y
>  CONFIG_RTE_KNI_KMOD=y
> -CONFIG_RTE_KNI_KMOD_ETHTOOL=y
>  CONFIG_RTE_LIBRTE_KNI=y
>  CONFIG_RTE_LIBRTE_VHOST=y
>  CONFIG_RTE_LIBRTE_PMD_VHOST=y
> --
> 2.9.3
>
>

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

* Re: [dpdk-dev] [PATCH 2/2] config: disable KNI ethtool by default
  2017-01-17 18:44   ` Jay Rolette
@ 2017-01-17 19:00     ` Ferruh Yigit
  2017-01-17 19:25       ` Ferruh Yigit
  0 siblings, 1 reply; 7+ messages in thread
From: Ferruh Yigit @ 2017-01-17 19:00 UTC (permalink / raw)
  To: Jay Rolette; +Cc: DPDK

On 1/17/2017 6:44 PM, Jay Rolette wrote:
> 
> On Tue, Jan 17, 2017 at 12:01 PM, Ferruh Yigit <ferruh.yigit@intel.com
> <mailto:ferruh.yigit@intel.com>> wrote:
> 
>     KNI ethtool support (KNI control path) is not commonly used,
>     and it tends to break the build with new version of the Linux kernel.
> 
>     KNI ethtool feature is disabled by default. KNI datapath is not effected
>     from this update.
> 
>     It is possible to enable feature explicitly with config option:
>     "CONFIG_RTE_KNI_KMOD_ETHTOOL=y"
> 
>     Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com
>     <mailto:ferruh.yigit@intel.com>>
> 
> 
> Is there a test case somewhere to detect when it gets broken or is the
> intent to let it bit-rot unless someone enables that option and
> subsequently discovers it broken?
> 
> I know we don't do this for every config option, but given the fact that
> this tends to get broken frequently, it seems riskier.

Agree this has risk to be forgotten/badly broken, I am sharing same concern.

But what happening was, even we fix DPDK for latest kernel, after DPDK
released, DPDK compilation sometimes broken with new coming kernels.
Since DPDK already released there is way to fix this, and this sometimes
hit people who won't use KNI ethtool at all.

KNI ethtool needs to be taken care by its users.

> 
> Jay
>  
> 
>     ---
>      config/common_linuxapp | 1 -
>      1 file changed, 1 deletion(-)
> 
>     diff --git a/config/common_linuxapp b/config/common_linuxapp
>     index d4c4f0c..2483dfa 100644
>     --- a/config/common_linuxapp
>     +++ b/config/common_linuxapp
>     @@ -38,7 +38,6 @@ CONFIG_RTE_EXEC_ENV_LINUXAPP=y
>      CONFIG_RTE_EAL_IGB_UIO=y
>      CONFIG_RTE_EAL_VFIO=y
>      CONFIG_RTE_KNI_KMOD=y
>     -CONFIG_RTE_KNI_KMOD_ETHTOOL=y
>      CONFIG_RTE_LIBRTE_KNI=y
>      CONFIG_RTE_LIBRTE_VHOST=y
>      CONFIG_RTE_LIBRTE_PMD_VHOST=y
>     --
>     2.9.3
> 
> 

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

* Re: [dpdk-dev] [PATCH 2/2] config: disable KNI ethtool by default
  2017-01-17 19:00     ` Ferruh Yigit
@ 2017-01-17 19:25       ` Ferruh Yigit
  0 siblings, 0 replies; 7+ messages in thread
From: Ferruh Yigit @ 2017-01-17 19:25 UTC (permalink / raw)
  To: Jay Rolette; +Cc: DPDK

On 1/17/2017 7:00 PM, Ferruh Yigit wrote:
> On 1/17/2017 6:44 PM, Jay Rolette wrote:
>>
>> On Tue, Jan 17, 2017 at 12:01 PM, Ferruh Yigit <ferruh.yigit@intel.com
>> <mailto:ferruh.yigit@intel.com>> wrote:
>>
>>     KNI ethtool support (KNI control path) is not commonly used,
>>     and it tends to break the build with new version of the Linux kernel.
>>
>>     KNI ethtool feature is disabled by default. KNI datapath is not effected
>>     from this update.
>>
>>     It is possible to enable feature explicitly with config option:
>>     "CONFIG_RTE_KNI_KMOD_ETHTOOL=y"
>>
>>     Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com
>>     <mailto:ferruh.yigit@intel.com>>
>>
>>
>> Is there a test case somewhere to detect when it gets broken or is the
>> intent to let it bit-rot unless someone enables that option and
>> subsequently discovers it broken?
>>
>> I know we don't do this for every config option, but given the fact that
>> this tends to get broken frequently, it seems riskier.
> 
> Agree this has risk to be forgotten/badly broken, I am sharing same concern.
> 
> But what happening was, even we fix DPDK for latest kernel, after DPDK
> released, DPDK compilation sometimes broken with new coming kernels.
> Since DPDK already released there is way to fix this, and this sometimes

correction: ... there is _no_ way to fix this ...

> hit people who won't use KNI ethtool at all.
> 
> KNI ethtool needs to be taken care by its users.
> 
>>
>> Jay
>>  
>>
>>     ---
>>      config/common_linuxapp | 1 -
>>      1 file changed, 1 deletion(-)
>>
>>     diff --git a/config/common_linuxapp b/config/common_linuxapp
>>     index d4c4f0c..2483dfa 100644
>>     --- a/config/common_linuxapp
>>     +++ b/config/common_linuxapp
>>     @@ -38,7 +38,6 @@ CONFIG_RTE_EXEC_ENV_LINUXAPP=y
>>      CONFIG_RTE_EAL_IGB_UIO=y
>>      CONFIG_RTE_EAL_VFIO=y
>>      CONFIG_RTE_KNI_KMOD=y
>>     -CONFIG_RTE_KNI_KMOD_ETHTOOL=y
>>      CONFIG_RTE_LIBRTE_KNI=y
>>      CONFIG_RTE_LIBRTE_VHOST=y
>>      CONFIG_RTE_LIBRTE_PMD_VHOST=y
>>     --
>>     2.9.3
>>
>>
> 

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

* Re: [dpdk-dev] [PATCH 2/2] config: disable KNI ethtool by default
  2017-01-17 18:35   ` Thomas Monjalon
@ 2017-01-29 21:38     ` Thomas Monjalon
  0 siblings, 0 replies; 7+ messages in thread
From: Thomas Monjalon @ 2017-01-29 21:38 UTC (permalink / raw)
  To: Ferruh Yigit; +Cc: dev

2017-01-17 19:35, Thomas Monjalon:
> 2017-01-17 18:01, Ferruh Yigit:
> > KNI ethtool support (KNI control path) is not commonly used,
> > and it tends to break the build with new version of the Linux kernel.
> > 
> > KNI ethtool feature is disabled by default. KNI datapath is not effected
> > from this update.
> > 
> > It is possible to enable feature explicitly with config option:
> > "CONFIG_RTE_KNI_KMOD_ETHTOOL=y"
> > 
> > Signed-off-by: Ferruh Yigit <ferruh.yigit@intel.com>
> 
> Acked-by: Thomas Monjalon <thomas.monjalon@6wind.com>

Applied, thanks

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

end of thread, other threads:[~2017-01-29 21:38 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-01-17 18:01 [dpdk-dev] [PATCH 1/2] kni: add config option for KNI ethtool Ferruh Yigit
2017-01-17 18:01 ` [dpdk-dev] [PATCH 2/2] config: disable KNI ethtool by default Ferruh Yigit
2017-01-17 18:35   ` Thomas Monjalon
2017-01-29 21:38     ` Thomas Monjalon
2017-01-17 18:44   ` Jay Rolette
2017-01-17 19:00     ` Ferruh Yigit
2017-01-17 19:25       ` 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).