kni: add config option for KNI ethtool
PATCH 1/2 kni: add config option for KNI ethtool
--- 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(-)
config/common_base +1 -0
@@ -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
config/common_linuxapp +1 -0
@@ -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
lib/librte_eal/linuxapp/kni/Makefile +25 -25
57 lines not on this page · raw message
lib/librte_eal/linuxapp/kni/kni_misc.c +8 -3
@@ -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);
Signature · 1 line
2.9.3
PATCH 2/2 config: disable KNI ethtool by default
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"
--- config/common_linuxapp | 1 - 1 file changed, 1 deletion(-)
config/common_linuxapp +0 -1
@@ -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
Signature · 1 line
2.9.3
Re: [PATCH 2/2] config: disable KNI ethtool by default
2017-01-17 18:01, Ferruh Yigit:
Quoted 10 lines
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 <[email protected]>
Re: [PATCH 2/2] config: disable KNI ethtool by default
In reply to Ferruh YigitQuoted 11 lines · 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 <[email protected]>
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
Quoted 20 lines
--- config/common_linuxapp | 1 - 1 file changed, 1 deletion(-)config/common_linuxapp +0
-2@@ -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
Re: [PATCH 2/2] config: disable KNI ethtool by default
Quoted 17 lines · Jay Rolette
On Tue, Jan 17, 2017 at 12:01 PM, Ferruh Yigit <[email protected] <mailto:[email protected]>> 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 <[email protected]<mailto:[email protected]>>
Quoted 6 lines
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.
Quoted 24 lines
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
Re: [PATCH 2/2] config: disable KNI ethtool by default
Quoted 22 lines · Ferruh Yigit
Quoted 21 lines · Jay Rolette
On Tue, Jan 17, 2017 at 12:01 PM, Ferruh Yigit <[email protected] <mailto:[email protected]>> 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 <[email protected]<mailto:[email protected]>>
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?
Quoted 8 lines
Quoted 2 lines
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 ...
Quoted 29 lines
hit people who won't use KNI ethtool at all.
KNI ethtool needs to be taken care by its users.
Quoted 24 lines
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
Thomas Monjalon
AppliedRe: [PATCH 2/2] config: disable KNI ethtool by default
In reply to Thomas Monjalon2017-01-17 19:35, Thomas Monjalon:
Quoted 7 lines
2017-01-17 18:01, Ferruh Yigit:
Quoted 6 lines
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.
Quoted 6 lines
Quoted 4 lines
It is possible to enable feature explicitly with config option:
"CONFIG_RTE_KNI_KMOD_ETHTOOL=y"Signed-off-by Ferruh Yigit <[email protected]>Acked-by Thomas Monjalon <[email protected]>
Applied, thanks