kni: remove KNI vhost support
PATCH 1/1 kni: remove KNI vhost support
--- config/common_base | 3 - devtools/test-build.sh | 1 - doc/guides/prog_guide/index.rst | 4 - doc/guides/prog_guide/kernel_nic_interface.rst | 113 ---- doc/guides/rel_notes/deprecation.rst | 6 - lib/librte_eal/linuxapp/kni/Makefile | 1 - lib/librte_eal/linuxapp/kni/kni_dev.h | 33 - lib/librte_eal/linuxapp/kni/kni_fifo.h | 14 - lib/librte_eal/linuxapp/kni/kni_misc.c | 22 - lib/librte_eal/linuxapp/kni/kni_net.c | 13 - lib/librte_eal/linuxapp/kni/kni_vhost.c | 842 ------------------------- 11 files changed, 1052 deletions(-) delete mode 100644 lib/librte_eal/linuxapp/kni/kni_vhost.c
config/common_base +0 -3
@@ -584,9 +584,6 @@ 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_RTE_KNI_VHOST_VNET_HDR_EN=n # # Compile the pdump library
devtools/test-build.sh +0 -1
@@ -194,7 +194,6 @@ config () # <directory> <target> <options> sed -ri 's,(PMD_OPENSSL=)n,\1y,' $1/.config test "$DPDK_DEP_SSL" != y || \ sed -ri 's,(PMD_QAT=)n,\1y,' $1/.config - sed -ri 's,(KNI_VHOST.*=)n,\1y,' $1/.config sed -ri 's,(SCHED_.*=)n,\1y,' $1/.config build_config_hook $1 $2 $3
doc/guides/prog_guide/index.rst +0 -4
@@ -127,10 +127,6 @@ Programmer's Guide :numref:`figure_pkt_flow_kni` :ref:`figure_pkt_flow_kni` -:numref:`figure_vhost_net_arch2` :ref:`figure_vhost_net_arch2` - -:numref:`figure_kni_traffic_flow` :ref:`figure_kni_traffic_flow` - :numref:`figure_pkt_proc_pipeline_qos` :ref:`figure_pkt_proc_pipeline_qos`
doc/guides/prog_guide/kernel_nic_interface.rst +0 -113
116 lines not on this page · raw message
doc/guides/rel_notes/deprecation.rst +0 -6
@@ -113,12 +113,6 @@ Deprecation Notices has different feature set, meaning functions like ``rte_vhost_feature_disable`` need be changed. Last, file rte_virtio_net.h will be renamed to rte_vhost.h. -* kni: Remove :ref:`kni_vhost_backend-label` feature (KNI_VHOST) in 17.05 release. - :doc:`Vhost Library </prog_guide/vhost_lib>` is currently preferred method for - guest - host communication. Just for clarification, this is not to remove KNI - or VHOST feature, but KNI_VHOST which is a KNI feature enabled via a compile - time option, and disabled by default. - * ABI changes are planned for 17.05 in the ``rte_cryptodev_ops`` structure. A pointer to a rte_cryptodev_config structure will be added to the function prototype ``cryptodev_configure_t``, as a new parameter.
lib/librte_eal/linuxapp/kni/Makefile +0 -1
@@ -61,7 +61,6 @@ DEPDIRS-y += lib/librte_eal/linuxapp/eal # SRCS-y := kni_misc.c SRCS-y += kni_net.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
lib/librte_eal/linuxapp/kni/kni_dev.h +0 -33
@@ -37,10 +37,6 @@#include <linux/spinlock.h> #include <linux/list.h> -#ifdef RTE_KNI_VHOST -#include <net/sock.h> -#endif -#include <exec-env/rte_kni_common.h> #define KNI_KTHREAD_RESCHEDULE_INTERVAL 5/* us */
@@ -102,15 +98,6 @@ struct kni_dev {/* synchro for request processing */ unsigned long synchro; -#ifdef RTE_KNI_VHOST -struct kni_vhost_queue *vhost_queue; - -volatile enum { -BE_STOP =0x1 , -BE_START =0x2 , -BE_FINISH =0x4 , - } vq_status; -#endif /* buffers */ void *pa[MBUF_BURST_SZ ];void *va[MBUF_BURST_SZ ];
@@ -118,26 +105,6 @@ struct kni_dev {void *alloc_va[MBUF_BURST_SZ ]; }; -#ifdef RTE_KNI_VHOST -uint32_t -kni_poll (struct file *file,struct socket *sock,poll_table * wait); -int kni_chk_vhost_rx (struct kni_dev *kni); -int kni_vhost_init (struct kni_dev *kni); -int kni_vhost_backend_release (struct kni_dev *kni); - -struct kni_vhost_queue { -struct sock sk; -struct socket *sock; -int vnet_hdr_sz; -struct kni_dev *kni; -int sockfd; -uint32_t flags; -struct sk_buff *cache; -struct rte_kni_fifo *fifo; -}; - -#endif -void kni_net_rx (struct kni_dev *kni);void kni_net_init (struct net_device *dev);void kni_net_config_lo_mode (char *lo_str);
lib/librte_eal/linuxapp/kni/kni_fifo.h +0 -14
@@ -91,18 +91,4 @@ kni_fifo_free_count(struct rte_kni_fifo *fifo) return (fifo->read - fifo->write - 1) & (fifo->len - 1); } -#ifdef RTE_KNI_VHOST -/** -* Initializes the kni fifo structure -*/ -static inline void -kni_fifo_init (struct rte_kni_fifo *fifo,uint32_t size) -{ - fifo->write =0 ; - fifo->read =0 ; - fifo->len = size; - fifo->elem_size =sizeof (void *); -} -#endif -#endif /* _KNI_FIFO_H_ */
lib/librte_eal/linuxapp/kni/kni_misc.c +0 -22
@@ -140,11 +140,7 @@ kni_thread_single(void *data)down_read (&knet->kni_list_lock);for (j =0 ; j <KNI_RX_LOOP_NUM ; j++) {list_for_each_entry (dev, &knet->kni_list_head, list) { -#ifdef RTE_KNI_VHOST -kni_chk_vhost_rx (dev); -#else kni_net_rx (dev); -#endif kni_net_poll_resp (dev); } }
@@ -167,11 +163,7 @@ kni_thread_multiple(void *param)while (!kthread_should_stop ()) {for (j =0 ; j <KNI_RX_LOOP_NUM ; j++) { -#ifdef RTE_KNI_VHOST -kni_chk_vhost_rx (dev); -#else kni_net_rx (dev); -#endif kni_net_poll_resp (dev); }#ifdef RTE_KNI_PREEMPT_DEFAULT
@@ -248,9 +240,6 @@ kni_release(struct inode *inode, struct file *file) dev->pthread =NULL ; } -#ifdef RTE_KNI_VHOST -kni_vhost_backend_release (dev); -#endif kni_dev_remove (dev);list_del (&dev->list); }
@@ -397,10 +386,6 @@ kni_ioctl_create(struct net *net, uint32_t ioctl_num, kni->sync_va = dev_info.sync_va; kni->sync_kva =phys_to_virt (dev_info.sync_phys); -#ifdef RTE_KNI_VHOST - kni->vhost_queue =NULL ; - kni->vq_status =BE_STOP ; -#endif kni->mbuf_size = dev_info.mbuf_size; pr_debug("tx_phys: 0x%016llx, tx_q addr: 0x%p\n",
@@ -490,10 +475,6 @@ kni_ioctl_create(struct net *net, uint32_t ioctl_num,return -ENODEV ; } -#ifdef RTE_KNI_VHOST -kni_vhost_init (kni); -#endif - ret =kni_run_thread (knet, kni, dev_info.force_bind);if (ret !=0 )return ret;
@@ -537,9 +518,6 @@ kni_ioctl_release(struct net *net, uint32_t ioctl_num, dev->pthread =NULL ; } -#ifdef RTE_KNI_VHOST -kni_vhost_backend_release (dev); -#endif kni_dev_remove (dev);list_del (&dev->list); ret =0 ;
lib/librte_eal/linuxapp/kni/kni_net.c +0 -13
@@ -198,18 +198,6 @@ kni_net_config(struct net_device *dev, struct ifmap *map)/* * Transmit a packet (called by the kernel) */ -#ifdef RTE_KNI_VHOST -static int -kni_net_tx (struct sk_buff *skb,struct net_device *dev) -{ -struct kni_dev *kni =netdev_priv (dev); - -dev_kfree_skb (skb); - kni->stats.tx_dropped++; - -return NETDEV_TX_OK ; -} -#else static int kni_net_tx (struct sk_buff *skb,struct net_device *dev) {
@@ -289,7 +277,6 @@ kni_net_tx(struct sk_buff *skb, struct net_device *dev)return NETDEV_TX_OK ; } -#endif /* * RX: normal working mode
lib/librte_eal/linuxapp/kni/kni_vhost.c deleted +0 -842
842 lines not on this page · raw message
Signature · 1 line
2.9.3
Quoted 16 lines · Ferruh Yigit
Signed-off-by Ferruh Yigit <[email protected]>--- config/common_base | 3 - devtools/test-build.sh | 1 - doc/guides/prog_guide/index.rst | 4 - doc/guides/prog_guide/kernel_nic_interface.rst | 113 ---- doc/guides/rel_notes/deprecation.rst | 6 - lib/librte_eal/linuxapp/kni/Makefile | 1 - lib/librte_eal/linuxapp/kni/kni_dev.h | 33 - lib/librte_eal/linuxapp/kni/kni_fifo.h | 14 - lib/librte_eal/linuxapp/kni/kni_misc.c | 22 - lib/librte_eal/linuxapp/kni/kni_net.c | 13 - lib/librte_eal/linuxapp/kni/kni_vhost.c | 842 ------------------------- 11 files changed, 1052 deletions(-) delete mode 100644 lib/librte_eal/linuxapp/kni/kni_vhost.c
Missing a release note entry for the removal itself from the 17.05 RN - which John has proposed starting.
With that added:
PATCH v2 1/2 doc: add removed items section to release notes
In reply to Ferruh Yigit--- doc/guides/rel_notes/release_17_05.rst | 12 ++++++++++++ 1 file changed, 12 insertions(+)
doc/guides/rel_notes/release_17_05.rst +12 -0
@@ -125,6 +125,18 @@ ABI Changes ========================================================= +Removed Items +------------- + +.. This section should contain removed items in this release. Sample format: + + * Add a short 1-2 sentence description of the removed item in the past + tense. + + This section is a comment. do not overwrite or remove it. + Also, make sure to start the actual text at the margin. + ========================================================= + Shared Library Versions -----------------------
Signature · 1 line
2.9.3
PATCH v2 2/2 kni: remove KNI vhost support
--- config/common_base | 3 - devtools/test-build.sh | 1 - doc/guides/prog_guide/index.rst | 4 - doc/guides/prog_guide/kernel_nic_interface.rst | 113 ---- doc/guides/rel_notes/deprecation.rst | 6 - doc/guides/rel_notes/release_17_05.rst | 2 + lib/librte_eal/linuxapp/kni/Makefile | 1 - lib/librte_eal/linuxapp/kni/kni_dev.h | 33 - lib/librte_eal/linuxapp/kni/kni_fifo.h | 14 - lib/librte_eal/linuxapp/kni/kni_misc.c | 22 - lib/librte_eal/linuxapp/kni/kni_net.c | 13 - lib/librte_eal/linuxapp/kni/kni_vhost.c | 842 ------------------------- 12 files changed, 2 insertions(+), 1052 deletions(-) delete mode 100644 lib/librte_eal/linuxapp/kni/kni_vhost.c
config/common_base +0 -3
@@ -584,9 +584,6 @@ 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_RTE_KNI_VHOST_VNET_HDR_EN=n # # Compile the pdump library
devtools/test-build.sh +0 -1
@@ -194,7 +194,6 @@ config () # <directory> <target> <options> sed -ri 's,(PMD_OPENSSL=)n,\1y,' $1/.config test "$DPDK_DEP_SSL" != y || \ sed -ri 's,(PMD_QAT=)n,\1y,' $1/.config - sed -ri 's,(KNI_VHOST.*=)n,\1y,' $1/.config sed -ri 's,(SCHED_.*=)n,\1y,' $1/.config build_config_hook $1 $2 $3
doc/guides/prog_guide/index.rst +0 -4
@@ -127,10 +127,6 @@ Programmer's Guide :numref:`figure_pkt_flow_kni` :ref:`figure_pkt_flow_kni` -:numref:`figure_vhost_net_arch2` :ref:`figure_vhost_net_arch2` - -:numref:`figure_kni_traffic_flow` :ref:`figure_kni_traffic_flow` - :numref:`figure_pkt_proc_pipeline_qos` :ref:`figure_pkt_proc_pipeline_qos`
doc/guides/prog_guide/kernel_nic_interface.rst +0 -113
116 lines not on this page · raw message
doc/guides/rel_notes/deprecation.rst +0 -6
@@ -113,12 +113,6 @@ Deprecation Notices has different feature set, meaning functions like ``rte_vhost_feature_disable`` need be changed. Last, file rte_virtio_net.h will be renamed to rte_vhost.h. -* kni: Remove :ref:`kni_vhost_backend-label` feature (KNI_VHOST) in 17.05 release. - :doc:`Vhost Library </prog_guide/vhost_lib>` is currently preferred method for - guest - host communication. Just for clarification, this is not to remove KNI - or VHOST feature, but KNI_VHOST which is a KNI feature enabled via a compile - time option, and disabled by default. - * ABI changes are planned for 17.05 in the ``rte_cryptodev_ops`` structure. A pointer to a rte_cryptodev_config structure will be added to the function prototype ``cryptodev_configure_t``, as a new parameter.
doc/guides/rel_notes/release_17_05.rst +2 -0
@@ -137,6 +137,8 @@ Removed Items Also, make sure to start the actual text at the margin. ========================================================= +* KNI vhost support removed. + Shared Library Versions -----------------------
lib/librte_eal/linuxapp/kni/Makefile +0 -1
@@ -61,7 +61,6 @@ DEPDIRS-y += lib/librte_eal/linuxapp/eal # SRCS-y := kni_misc.c SRCS-y += kni_net.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
lib/librte_eal/linuxapp/kni/kni_dev.h +0 -33
@@ -37,10 +37,6 @@#include <linux/spinlock.h> #include <linux/list.h> -#ifdef RTE_KNI_VHOST -#include <net/sock.h> -#endif -#include <exec-env/rte_kni_common.h> #define KNI_KTHREAD_RESCHEDULE_INTERVAL 5/* us */
@@ -102,15 +98,6 @@ struct kni_dev {/* synchro for request processing */ unsigned long synchro; -#ifdef RTE_KNI_VHOST -struct kni_vhost_queue *vhost_queue; - -volatile enum { -BE_STOP =0x1 , -BE_START =0x2 , -BE_FINISH =0x4 , - } vq_status; -#endif /* buffers */ void *pa[MBUF_BURST_SZ ];void *va[MBUF_BURST_SZ ];
@@ -118,26 +105,6 @@ struct kni_dev {void *alloc_va[MBUF_BURST_SZ ]; }; -#ifdef RTE_KNI_VHOST -uint32_t -kni_poll (struct file *file,struct socket *sock,poll_table * wait); -int kni_chk_vhost_rx (struct kni_dev *kni); -int kni_vhost_init (struct kni_dev *kni); -int kni_vhost_backend_release (struct kni_dev *kni); - -struct kni_vhost_queue { -struct sock sk; -struct socket *sock; -int vnet_hdr_sz; -struct kni_dev *kni; -int sockfd; -uint32_t flags; -struct sk_buff *cache; -struct rte_kni_fifo *fifo; -}; - -#endif -void kni_net_rx (struct kni_dev *kni);void kni_net_init (struct net_device *dev);void kni_net_config_lo_mode (char *lo_str);
lib/librte_eal/linuxapp/kni/kni_fifo.h +0 -14
@@ -91,18 +91,4 @@ kni_fifo_free_count(struct rte_kni_fifo *fifo) return (fifo->read - fifo->write - 1) & (fifo->len - 1); } -#ifdef RTE_KNI_VHOST -/** -* Initializes the kni fifo structure -*/ -static inline void -kni_fifo_init (struct rte_kni_fifo *fifo,uint32_t size) -{ - fifo->write =0 ; - fifo->read =0 ; - fifo->len = size; - fifo->elem_size =sizeof (void *); -} -#endif -#endif /* _KNI_FIFO_H_ */
lib/librte_eal/linuxapp/kni/kni_misc.c +0 -22
@@ -140,11 +140,7 @@ kni_thread_single(void *data)down_read (&knet->kni_list_lock);for (j =0 ; j <KNI_RX_LOOP_NUM ; j++) {list_for_each_entry (dev, &knet->kni_list_head, list) { -#ifdef RTE_KNI_VHOST -kni_chk_vhost_rx (dev); -#else kni_net_rx (dev); -#endif kni_net_poll_resp (dev); } }
@@ -167,11 +163,7 @@ kni_thread_multiple(void *param)while (!kthread_should_stop ()) {for (j =0 ; j <KNI_RX_LOOP_NUM ; j++) { -#ifdef RTE_KNI_VHOST -kni_chk_vhost_rx (dev); -#else kni_net_rx (dev); -#endif kni_net_poll_resp (dev); }#ifdef RTE_KNI_PREEMPT_DEFAULT
@@ -248,9 +240,6 @@ kni_release(struct inode *inode, struct file *file) dev->pthread =NULL ; } -#ifdef RTE_KNI_VHOST -kni_vhost_backend_release (dev); -#endif kni_dev_remove (dev);list_del (&dev->list); }
@@ -397,10 +386,6 @@ kni_ioctl_create(struct net *net, uint32_t ioctl_num, kni->sync_va = dev_info.sync_va; kni->sync_kva =phys_to_virt (dev_info.sync_phys); -#ifdef RTE_KNI_VHOST - kni->vhost_queue =NULL ; - kni->vq_status =BE_STOP ; -#endif kni->mbuf_size = dev_info.mbuf_size; pr_debug("tx_phys: 0x%016llx, tx_q addr: 0x%p\n",
@@ -490,10 +475,6 @@ kni_ioctl_create(struct net *net, uint32_t ioctl_num,return -ENODEV ; } -#ifdef RTE_KNI_VHOST -kni_vhost_init (kni); -#endif - ret =kni_run_thread (knet, kni, dev_info.force_bind);if (ret !=0 )return ret;
@@ -537,9 +518,6 @@ kni_ioctl_release(struct net *net, uint32_t ioctl_num, dev->pthread =NULL ; } -#ifdef RTE_KNI_VHOST -kni_vhost_backend_release (dev); -#endif kni_dev_remove (dev);list_del (&dev->list); ret =0 ;
lib/librte_eal/linuxapp/kni/kni_net.c +0 -13
@@ -198,18 +198,6 @@ kni_net_config(struct net_device *dev, struct ifmap *map)/* * Transmit a packet (called by the kernel) */ -#ifdef RTE_KNI_VHOST -static int -kni_net_tx (struct sk_buff *skb,struct net_device *dev) -{ -struct kni_dev *kni =netdev_priv (dev); - -dev_kfree_skb (skb); - kni->stats.tx_dropped++; - -return NETDEV_TX_OK ; -} -#else static int kni_net_tx (struct sk_buff *skb,struct net_device *dev) {
@@ -289,7 +277,6 @@ kni_net_tx(struct sk_buff *skb, struct net_device *dev)return NETDEV_TX_OK ; } -#endif /* * RX: normal working mode
lib/librte_eal/linuxapp/kni/kni_vhost.c deleted +0 -842
842 lines not on this page · raw message
Signature · 1 line
2.9.3
Re: [PATCH v2 1/2] doc: add removed items section to release notes
In reply to Ferruh YigitQuoted 11 lines
-----Original Message-----
From: Yigit, Ferruh
Sent: Monday, February 20, 2017 2:30 PM
To: Thomas Monjalon <[email protected]>; Mcnamara, John <[email protected]>
Cc: [email protected]; Richardson, Bruce <[email protected]>; Yigit, Ferruh <[email protected]>
Subject: [PATCH v2 1/2] doc: add removed items section to release notes
Quoted 1 line
Signed-off-by Ferruh Yigit <[email protected]>
Thomas Monjalon
AppliedRe: [PATCH v2 1/2] doc: add removed items section to release notes
Quoted 3 lines
Quoted 1 line
Signed-off-by Ferruh Yigit <[email protected]>Acked-by John McNamara <[email protected]>
Applied, thanks