diff --git a/SOURCES/0001-net-enic-fix-L4-Rx-ptype-comparison.patch b/SOURCES/0001-net-enic-fix-L4-Rx-ptype-comparison.patch new file mode 100644 index 0000000..e262e3c --- /dev/null +++ b/SOURCES/0001-net-enic-fix-L4-Rx-ptype-comparison.patch @@ -0,0 +1,43 @@ +From f596cb198e65ff6839d35763d824399eb407adab Mon Sep 17 00:00:00 2001 +From: Hyong Youb Kim +Date: Wed, 10 Jan 2018 01:17:04 -0800 +Subject: [PATCH] net/enic: fix L4 Rx ptype comparison + +[ upstream commit 5dbff3af25a4a68980992f5040246e1d7f20b4cd ] + +For non-UDP/TCP packets, enic may wrongly set PKT_RX_L4_CKSUM_BAD in +ol_flags. The comparison that checks if a packet is UDP or TCP assumes +that RTE_PTYPE_L4 values are bit flags, but they are not. For example, +the following evaluates to true because NONFRAG is 0x600 and UDP is +0x200, and causes the current code to think the packet is UDP. + +!!(RTE_PTYPE_L4_NONFRAG & RTE_PTYPE_L4_UDP) + +So, fix this by comparing the packet type against UDP and TCP +individually. + +Fixes: 453d15059b58 ("net/enic: use new Rx checksum flags") + +Signed-off-by: Hyong Youb Kim +Reviewed-by: John Daley +--- + drivers/net/enic/enic_rxtx.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/dpdk-17.11/drivers/net/enic/enic_rxtx.c b/dpdk-17.11/drivers/net/enic/enic_rxtx.c +index a3663d516..831c90a1c 100644 +--- a/dpdk-17.11/drivers/net/enic/enic_rxtx.c ++++ b/dpdk-17.11/drivers/net/enic/enic_rxtx.c +@@ -285,7 +285,8 @@ enic_cq_rx_to_pkt_flags(struct cq_desc *cqd, struct rte_mbuf *mbuf) + else + pkt_flags |= PKT_RX_IP_CKSUM_BAD; + +- if (l4_flags & (RTE_PTYPE_L4_UDP | RTE_PTYPE_L4_TCP)) { ++ if (l4_flags == RTE_PTYPE_L4_UDP || ++ l4_flags == RTE_PTYPE_L4_TCP) { + if (enic_cq_rx_desc_tcp_udp_csum_ok(cqrd)) + pkt_flags |= PKT_RX_L4_CKSUM_GOOD; + else +-- +2.14.3 + diff --git a/SOURCES/0001-net-enic-fix-crash-due-to-static-max-number-of-queue.patch b/SOURCES/0001-net-enic-fix-crash-due-to-static-max-number-of-queue.patch new file mode 100644 index 0000000..2e7e31f --- /dev/null +++ b/SOURCES/0001-net-enic-fix-crash-due-to-static-max-number-of-queue.patch @@ -0,0 +1,194 @@ +From acc4c80cf3b5fb3c0f87bcb7c4eb68958f60ef15 Mon Sep 17 00:00:00 2001 +From: Hyong Youb Kim +Date: Mon, 22 Jan 2018 17:05:28 -0800 +Subject: [PATCH] net/enic: fix crash due to static max number of queues + +[ upstream commit 6c45c330589d334c4f7b729e61ae30a6acfcc119 ] + +ENIC_CQ_MAX, ENIC_WQ_MAX and others are arbitrary values that +prevent the app from using more queues when they are available on +hardware. Remove them and dynamically allocate vnic_cq and such +arrays to accommodate all available hardware queues. + +As a side effect of removing ENIC_CQ_MAX, this commit fixes a segfault +that would happen when the app requests more than 16 CQs, because +enic_set_vnic_res() does not consider ENIC_CQ_MAX. For example, the +following command causes a crash. + +testpmd -- --rxq=16 --txq=16 + +Fixes: ce93d3c36db0 ("net/enic: fix resource check failures when bonding devices") + +Signed-off-by: Hyong Youb Kim +Reviewed-by: John Daley +--- + drivers/net/enic/enic.h | 25 +++++++++--------------- + drivers/net/enic/enic_ethdev.c | 20 ++------------------ + drivers/net/enic/enic_main.c | 43 ++++++++++++++++++++++++++++++++---------- + 3 files changed, 44 insertions(+), 44 deletions(-) + +diff --git a/dpdk-17.11/drivers/net/enic/enic.h b/dpdk-17.11/drivers/net/enic/enic.h +index e36ec385c..a43fddc5f 100644 +--- a/dpdk-17.11/drivers/net/enic/enic.h ++++ b/dpdk-17.11/drivers/net/enic/enic.h +@@ -53,13 +53,6 @@ + #define DRV_DESCRIPTION "Cisco VIC Ethernet NIC Poll-mode Driver" + #define DRV_COPYRIGHT "Copyright 2008-2015 Cisco Systems, Inc" + +-#define ENIC_WQ_MAX 8 +-/* With Rx scatter support, we use two RQs on VIC per RQ used by app. Both +- * RQs use the same CQ. +- */ +-#define ENIC_RQ_MAX 16 +-#define ENIC_CQ_MAX (ENIC_WQ_MAX + (ENIC_RQ_MAX / 2)) +-#define ENIC_INTR_MAX (ENIC_CQ_MAX + 2) + #define ENIC_MAX_MAC_ADDR 64 + + #define VLAN_ETH_HLEN 18 +@@ -150,17 +143,17 @@ struct enic { + unsigned int flags; + unsigned int priv_flags; + +- /* work queue */ +- struct vnic_wq wq[ENIC_WQ_MAX]; +- unsigned int wq_count; ++ /* work queue (len = conf_wq_count) */ ++ struct vnic_wq *wq; ++ unsigned int wq_count; /* equals eth_dev nb_tx_queues */ + +- /* receive queue */ +- struct vnic_rq rq[ENIC_RQ_MAX]; +- unsigned int rq_count; ++ /* receive queue (len = conf_rq_count) */ ++ struct vnic_rq *rq; ++ unsigned int rq_count; /* equals eth_dev nb_rx_queues */ + +- /* completion queue */ +- struct vnic_cq cq[ENIC_CQ_MAX]; +- unsigned int cq_count; ++ /* completion queue (len = conf_cq_count) */ ++ struct vnic_cq *cq; ++ unsigned int cq_count; /* equals rq_count + wq_count */ + + /* interrupt resource */ + struct vnic_intr intr; +diff --git a/dpdk-17.11/drivers/net/enic/enic_ethdev.c b/dpdk-17.11/drivers/net/enic/enic_ethdev.c +index 669dbf336..98391b008 100644 +--- a/dpdk-17.11/drivers/net/enic/enic_ethdev.c ++++ b/dpdk-17.11/drivers/net/enic/enic_ethdev.c +@@ -205,13 +205,7 @@ static int enicpmd_dev_tx_queue_setup(struct rte_eth_dev *eth_dev, + return -E_RTE_SECONDARY; + + ENICPMD_FUNC_TRACE(); +- if (queue_idx >= ENIC_WQ_MAX) { +- dev_err(enic, +- "Max number of TX queues exceeded. Max is %d\n", +- ENIC_WQ_MAX); +- return -EINVAL; +- } +- ++ RTE_ASSERT(queue_idx < enic->conf_wq_count); + eth_dev->data->tx_queues[queue_idx] = (void *)&enic->wq[queue_idx]; + + ret = enic_alloc_wq(enic, queue_idx, socket_id, nb_desc); +@@ -325,17 +319,7 @@ static int enicpmd_dev_rx_queue_setup(struct rte_eth_dev *eth_dev, + + if (rte_eal_process_type() != RTE_PROC_PRIMARY) + return -E_RTE_SECONDARY; +- +- /* With Rx scatter support, two RQs are now used on VIC per RQ used +- * by the application. +- */ +- if (queue_idx * 2 >= ENIC_RQ_MAX) { +- dev_err(enic, +- "Max number of RX queues exceeded. Max is %d. This PMD uses 2 RQs on VIC per RQ used by DPDK.\n", +- ENIC_RQ_MAX); +- return -EINVAL; +- } +- ++ RTE_ASSERT(enic_rte_rq_idx_to_sop_idx(queue_idx) < enic->conf_rq_count); + eth_dev->data->rx_queues[queue_idx] = + (void *)&enic->rq[enic_rte_rq_idx_to_sop_idx(queue_idx)]; + +diff --git a/dpdk-17.11/drivers/net/enic/enic_main.c b/dpdk-17.11/drivers/net/enic/enic_main.c +index 8af0ccd3c..1694aed12 100644 +--- a/dpdk-17.11/drivers/net/enic/enic_main.c ++++ b/dpdk-17.11/drivers/net/enic/enic_main.c +@@ -1075,6 +1075,9 @@ static void enic_dev_deinit(struct enic *enic) + vnic_dev_notify_unset(enic->vdev); + + rte_free(eth_dev->data->mac_addrs); ++ rte_free(enic->cq); ++ rte_free(enic->rq); ++ rte_free(enic->wq); + } + + +@@ -1082,27 +1085,28 @@ int enic_set_vnic_res(struct enic *enic) + { + struct rte_eth_dev *eth_dev = enic->rte_dev; + int rc = 0; ++ unsigned int required_rq, required_wq, required_cq; + +- /* With Rx scatter support, two RQs are now used per RQ used by +- * the application. +- */ +- if (enic->conf_rq_count < eth_dev->data->nb_rx_queues) { ++ /* Always use two vNIC RQs per eth_dev RQ, regardless of Rx scatter. */ ++ required_rq = eth_dev->data->nb_rx_queues * 2; ++ required_wq = eth_dev->data->nb_tx_queues; ++ required_cq = eth_dev->data->nb_rx_queues + eth_dev->data->nb_tx_queues; ++ ++ if (enic->conf_rq_count < required_rq) { + dev_err(dev, "Not enough Receive queues. Requested:%u which uses %d RQs on VIC, Configured:%u\n", + eth_dev->data->nb_rx_queues, +- eth_dev->data->nb_rx_queues * 2, enic->conf_rq_count); ++ required_rq, enic->conf_rq_count); + rc = -EINVAL; + } +- if (enic->conf_wq_count < eth_dev->data->nb_tx_queues) { ++ if (enic->conf_wq_count < required_wq) { + dev_err(dev, "Not enough Transmit queues. Requested:%u, Configured:%u\n", + eth_dev->data->nb_tx_queues, enic->conf_wq_count); + rc = -EINVAL; + } + +- if (enic->conf_cq_count < (eth_dev->data->nb_rx_queues + +- eth_dev->data->nb_tx_queues)) { ++ if (enic->conf_cq_count < required_cq) { + dev_err(dev, "Not enough Completion queues. Required:%u, Configured:%u\n", +- (eth_dev->data->nb_rx_queues + +- eth_dev->data->nb_tx_queues), enic->conf_cq_count); ++ required_cq, enic->conf_cq_count); + rc = -EINVAL; + } + +@@ -1307,6 +1311,25 @@ static int enic_dev_init(struct enic *enic) + dev_err(enic, "See the ENIC PMD guide for more information.\n"); + return -EINVAL; + } ++ /* Queue counts may be zeros. rte_zmalloc returns NULL in that case. */ ++ enic->cq = rte_zmalloc("enic_vnic_cq", sizeof(struct vnic_cq) * ++ enic->conf_cq_count, 8); ++ enic->rq = rte_zmalloc("enic_vnic_rq", sizeof(struct vnic_rq) * ++ enic->conf_rq_count, 8); ++ enic->wq = rte_zmalloc("enic_vnic_wq", sizeof(struct vnic_wq) * ++ enic->conf_wq_count, 8); ++ if (enic->conf_cq_count > 0 && enic->cq == NULL) { ++ dev_err(enic, "failed to allocate vnic_cq, aborting.\n"); ++ return -1; ++ } ++ if (enic->conf_rq_count > 0 && enic->rq == NULL) { ++ dev_err(enic, "failed to allocate vnic_rq, aborting.\n"); ++ return -1; ++ } ++ if (enic->conf_wq_count > 0 && enic->wq == NULL) { ++ dev_err(enic, "failed to allocate vnic_wq, aborting.\n"); ++ return -1; ++ } + + /* Get the supported filters */ + enic_fdir_info(enic); +-- +2.14.3 + diff --git a/SOURCES/0001-ofproto-dpif-Delete-system-tunnel-interface-when-rem.patch b/SOURCES/0001-ofproto-dpif-Delete-system-tunnel-interface-when-rem.patch new file mode 100644 index 0000000..0daca36 --- /dev/null +++ b/SOURCES/0001-ofproto-dpif-Delete-system-tunnel-interface-when-rem.patch @@ -0,0 +1,50 @@ +From f6193c08c47bfb4bc2b10114bcdea7ae6581b144 Mon Sep 17 00:00:00 2001 +From: "juyan@redhat.com" +Date: Wed, 25 Oct 2017 11:41:27 +0800 +Subject: [PATCH] ofproto-dpif: Delete system tunnel interface when remove ovs + bridge + +When a user adds the first tunnel of a given type (e.g. the first VXLAN +tunnel) to an OVS bridge, OVS adds a vport of the same type to the +kernel datapath that backs the bridge. There is the corresponding +expectation that, when the last tunnel of that type is removed from the +OVS bridges, OVS would remove the vport that represents it from the +backing kernel datapath, but OVS was not doing that. This commit fixes +the problem. + +There is not any major concern about the lingering tunnel interface, but +it's cleaner to delete it. + +Fixes: 921c370a9df5 ("dpif-netlink: Probe for out-of-tree tunnels, decides used interface") +Signed-off-by: JunhanYan +Signed-off-by: Ben Pfaff +--- + ofproto/ofproto-dpif.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/ofproto/ofproto-dpif.c b/ofproto/ofproto-dpif.c +index 3365d4185..1a648c33f 100644 +--- a/ofproto/ofproto-dpif.c ++++ b/ofproto/ofproto-dpif.c +@@ -661,6 +661,8 @@ dealloc(struct ofproto *ofproto_) + static void + close_dpif_backer(struct dpif_backer *backer, bool del) + { ++ struct simap_node *node; ++ + ovs_assert(backer->refcount > 0); + + if (--backer->refcount) { +@@ -669,6 +671,9 @@ close_dpif_backer(struct dpif_backer *backer, bool del) + + udpif_destroy(backer->udpif); + ++ SIMAP_FOR_EACH (node, &backer->tnl_backers) { ++ dpif_port_del(backer->dpif, u32_to_odp(node->data), false); ++ } + simap_destroy(&backer->tnl_backers); + ovs_rwlock_destroy(&backer->odp_to_ofport_lock); + hmap_destroy(&backer->odp_to_ofport_map); +-- +2.14.3 + diff --git a/SOURCES/0001-vhost-prevent-features-to-be-changed-while-device-is.patch b/SOURCES/0001-vhost-prevent-features-to-be-changed-while-device-is.patch new file mode 100644 index 0000000..3060c98 --- /dev/null +++ b/SOURCES/0001-vhost-prevent-features-to-be-changed-while-device-is.patch @@ -0,0 +1,59 @@ +From fec618a3fdcc88fa50089edb5748a6554ac49070 Mon Sep 17 00:00:00 2001 +From: Maxime Coquelin +Date: Wed, 13 Dec 2017 09:51:06 +0100 +Subject: [PATCH 1/6] vhost: prevent features to be changed while device is + running + +As section 2.2 of the Virtio spec states about features +negotiation: +"During device initialization, the driver reads this and tells +the device the subset that it accepts. The only way to +renegotiate is to reset the device." + +This patch implements a check to prevent illegal features change +while the device is running. + +One exception is the VHOST_F_LOG_ALL feature bit, which is enabled +when live-migration is initiated. But this feature is not negotiated +with the Virtio driver, but directly with the Vhost master. + +Signed-off-by: Maxime Coquelin +Acked-by: Laszlo Ersek +Acked-by: Yuanhan Liu +(cherry picked from commit 07f8db29b8833378dd506f3e197319f8b669aed9) +Signed-off-by: Maxime Coquelin +--- + dpdk-17.11/lib/librte_vhost/vhost_user.c | 17 ++++++++++++++++- + 1 file changed, 16 insertions(+), 1 deletion(-) + +diff --git a/dpdk-17.11/lib/librte_vhost/vhost_user.c b/dpdk-17.11/lib/librte_vhost/vhost_user.c +index f4c7ce462..545dbcb2b 100644 +--- a/dpdk-17.11/lib/librte_vhost/vhost_user.c ++++ b/dpdk-17.11/lib/librte_vhost/vhost_user.c +@@ -183,7 +183,22 @@ vhost_user_set_features(struct virtio_net *dev, uint64_t features) + return -1; + } + +- if ((dev->flags & VIRTIO_DEV_RUNNING) && dev->features != features) { ++ if (dev->flags & VIRTIO_DEV_RUNNING) { ++ if (dev->features == features) ++ return 0; ++ ++ /* ++ * Error out if master tries to change features while device is ++ * in running state. The exception being VHOST_F_LOG_ALL, which ++ * is enabled when the live-migration starts. ++ */ ++ if ((dev->features ^ features) & ~(1ULL << VHOST_F_LOG_ALL)) { ++ RTE_LOG(ERR, VHOST_CONFIG, ++ "(%d) features changed while device is running.\n", ++ dev->vid); ++ return -1; ++ } ++ + if (dev->notify_ops->features_changed) + dev->notify_ops->features_changed(dev->vid, features); + } +-- +2.14.3 + diff --git a/SOURCES/0001-vhost_user_protect_active_rings_from_async_ring_changes.patch b/SOURCES/0001-vhost_user_protect_active_rings_from_async_ring_changes.patch new file mode 100644 index 0000000..64a280b --- /dev/null +++ b/SOURCES/0001-vhost_user_protect_active_rings_from_async_ring_changes.patch @@ -0,0 +1,310 @@ +From patchwork Wed Jan 17 13:49:25 2018 +Content-Type: text/plain; charset="utf-8" +MIME-Version: 1.0 +Content-Transfer-Encoding: 7bit +Subject: [dpdk-dev, + v5] vhost_user: protect active rings from async ring changes +From: Victor Kaplansky +X-Patchwork-Id: 33921 +X-Patchwork-Delegate: yuanhan.liu@linux.intel.com +List-Id: dev.dpdk.org +To: dev@dpdk.org +Cc: stable@dpdk.org, Jens Freimann , + Maxime Coquelin , + Yuanhan Liu , Tiwei Bie , + "Tan, Jianfeng" , + Stephen Hemminger , + Victor Kaplansky +Date: Wed, 17 Jan 2018 15:49:25 +0200 + +When performing live migration or memory hot-plugging, +the changes to the device and vrings made by message handler +done independently from vring usage by PMD threads. + +This causes for example segfaults during live-migration +with MQ enable, but in general virtually any request +sent by qemu changing the state of device can cause +problems. + +These patches fixes all above issues by adding a spinlock +to every vring and requiring message handler to start operation +only after ensuring that all PMD threads related to the device +are out of critical section accessing the vring data. + +Each vring has its own lock in order to not create contention +between PMD threads of different vrings and to prevent +performance degradation by scaling queue pair number. + +See https://bugzilla.redhat.com/show_bug.cgi?id=1450680 + +Signed-off-by: Victor Kaplansky +Reviewed-by: Maxime Coquelin +--- +v5: + o get rid of spinlock wrapping functions in vhost.h + +v4: + + o moved access_unlock before accessing enable flag and + access_unlock after iommu_unlock consistently. + o cosmetics: removed blank line. + o the access_lock variable moved to be in the same + cache line with enable and access_ok flags. + o dequeue path is now guarded with trylock and returning + zero if unsuccessful. + o GET_VRING_BASE operation is not guarded by access lock + to avoid deadlock with device_destroy. See the comment + in the code. + o Fixed error path exit from enqueue and dequeue carefully + unlocking access and iommu locks as appropriate. + +v3: + o Added locking to enqueue flow. + o Enqueue path guarded as well as dequeue path. + o Changed name of active_lock. + o Added initialization of guarding spinlock. + o Reworked functions skimming over all virt-queues. + o Performance measurements done by Maxime Coquelin shows + no degradation in bandwidth and throughput. + o Spelling. + o Taking lock only on set operations. + o IOMMU messages are not guarded by access lock. + +v2: + o Fixed checkpatch complains. + o Added Signed-off-by. + o Refined placement of guard to exclude IOMMU messages. + o TODO: performance degradation measurement. + + dpdk-17.11/lib/librte_vhost/vhost.h | 6 ++-- + dpdk-17.11/lib/librte_vhost/vhost.c | 1 + + dpdk-17.11/lib/librte_vhost/vhost_user.c | 70 ++++++++++++++++++++++++++++++++ + dpdk-17.11/lib/librte_vhost/virtio_net.c | 28 ++++++++++++++--- + 4 files changed, 99 insertions(+), 6 deletions(-) + +diff --git a/dpdk-17.11/lib/librte_vhost/vhost.h b/dpdk-17.11/lib/librte_vhost/vhost.h +index 1cc81c17..c8f2a817 100644 +--- a/dpdk-17.11/lib/librte_vhost/vhost.h ++++ b/dpdk-17.11/lib/librte_vhost/vhost.h +@@ -108,12 +108,14 @@ struct vhost_virtqueue { + + /* Backend value to determine if device should started/stopped */ + int backend; ++ int enabled; ++ int access_ok; ++ rte_spinlock_t access_lock; ++ + /* Used to notify the guest (trigger interrupt) */ + int callfd; + /* Currently unused as polling mode is enabled */ + int kickfd; +- int enabled; +- int access_ok; + + /* Physical address of used ring, for logging */ + uint64_t log_guest_addr; +diff --git a/dpdk-17.11/lib/librte_vhost/vhost.c b/dpdk-17.11/lib/librte_vhost/vhost.c +index 4f8b73a0..dcc42fc7 100644 +--- a/dpdk-17.11/lib/librte_vhost/vhost.c ++++ b/dpdk-17.11/lib/librte_vhost/vhost.c +@@ -259,6 +259,7 @@ alloc_vring_queue(struct virtio_net *dev, uint32_t vring_idx) + + dev->virtqueue[vring_idx] = vq; + init_vring_queue(dev, vring_idx); ++ rte_spinlock_init(&vq->access_lock); + + dev->nr_vring += 1; + +diff --git a/dpdk-17.11/lib/librte_vhost/vhost_user.c b/dpdk-17.11/lib/librte_vhost/vhost_user.c +index f4c7ce46..0685d4e7 100644 +--- a/dpdk-17.11/lib/librte_vhost/vhost_user.c ++++ b/dpdk-17.11/lib/librte_vhost/vhost_user.c +@@ -1190,12 +1190,47 @@ vhost_user_check_and_alloc_queue_pair(struct virtio_net *dev, VhostUserMsg *msg) + return alloc_vring_queue(dev, vring_idx); + } + ++static void ++vhost_user_lock_all_queue_pairs(struct virtio_net *dev) ++{ ++ unsigned int i = 0; ++ unsigned int vq_num = 0; ++ ++ while (vq_num < dev->nr_vring) { ++ struct vhost_virtqueue *vq = dev->virtqueue[i]; ++ ++ if (vq) { ++ rte_spinlock_lock(&vq->access_lock); ++ vq_num++; ++ } ++ i++; ++ } ++} ++ ++static void ++vhost_user_unlock_all_queue_pairs(struct virtio_net *dev) ++{ ++ unsigned int i = 0; ++ unsigned int vq_num = 0; ++ ++ while (vq_num < dev->nr_vring) { ++ struct vhost_virtqueue *vq = dev->virtqueue[i]; ++ ++ if (vq) { ++ rte_spinlock_unlock(&vq->access_lock); ++ vq_num++; ++ } ++ i++; ++ } ++} ++ + int + vhost_user_msg_handler(int vid, int fd) + { + struct virtio_net *dev; + struct VhostUserMsg msg; + int ret; ++ int unlock_required = 0; + + dev = get_device(vid); + if (dev == NULL) +@@ -1241,6 +1276,38 @@ vhost_user_msg_handler(int vid, int fd) + return -1; + } + ++ /* ++ * Note: we don't lock all queues on VHOST_USER_GET_VRING_BASE, ++ * since it is sent when virtio stops and device is destroyed. ++ * destroy_device waits for queues to be inactive, so it is safe. ++ * Otherwise taking the access_lock would cause a dead lock. ++ */ ++ switch (msg.request.master) { ++ case VHOST_USER_SET_FEATURES: ++ case VHOST_USER_SET_PROTOCOL_FEATURES: ++ case VHOST_USER_SET_OWNER: ++ case VHOST_USER_RESET_OWNER: ++ case VHOST_USER_SET_MEM_TABLE: ++ case VHOST_USER_SET_LOG_BASE: ++ case VHOST_USER_SET_LOG_FD: ++ case VHOST_USER_SET_VRING_NUM: ++ case VHOST_USER_SET_VRING_ADDR: ++ case VHOST_USER_SET_VRING_BASE: ++ case VHOST_USER_SET_VRING_KICK: ++ case VHOST_USER_SET_VRING_CALL: ++ case VHOST_USER_SET_VRING_ERR: ++ case VHOST_USER_SET_VRING_ENABLE: ++ case VHOST_USER_SEND_RARP: ++ case VHOST_USER_NET_SET_MTU: ++ case VHOST_USER_SET_SLAVE_REQ_FD: ++ vhost_user_lock_all_queue_pairs(dev); ++ unlock_required = 1; ++ break; ++ default: ++ break; ++ ++ } ++ + switch (msg.request.master) { + case VHOST_USER_GET_FEATURES: + msg.payload.u64 = vhost_user_get_features(dev); +@@ -1342,6 +1409,9 @@ vhost_user_msg_handler(int vid, int fd) + + } + ++ if (unlock_required) ++ vhost_user_unlock_all_queue_pairs(dev); ++ + if (msg.flags & VHOST_USER_NEED_REPLY) { + msg.payload.u64 = !!ret; + msg.size = sizeof(msg.payload.u64); +diff --git a/dpdk-17.11/lib/librte_vhost/virtio_net.c b/dpdk-17.11/lib/librte_vhost/virtio_net.c +index 6fee16e5..e09a927d 100644 +--- a/dpdk-17.11/lib/librte_vhost/virtio_net.c ++++ b/dpdk-17.11/lib/librte_vhost/virtio_net.c +@@ -44,6 +44,7 @@ + #include + #include + #include ++#include + + #include "iotlb.h" + #include "vhost.h" +@@ -326,8 +327,11 @@ virtio_dev_rx(struct virtio_net *dev, uint16_t queue_id, + } + + vq = dev->virtqueue[queue_id]; ++ ++ rte_spinlock_lock(&vq->access_lock); ++ + if (unlikely(vq->enabled == 0)) +- return 0; ++ goto out_access_unlock; + + if (dev->features & (1ULL << VIRTIO_F_IOMMU_PLATFORM)) + vhost_user_iotlb_rd_lock(vq); +@@ -419,6 +423,9 @@ virtio_dev_rx(struct virtio_net *dev, uint16_t queue_id, + if (dev->features & (1ULL << VIRTIO_F_IOMMU_PLATFORM)) + vhost_user_iotlb_rd_unlock(vq); + ++out_access_unlock: ++ rte_spinlock_unlock(&vq->access_lock); ++ + return count; + } + +@@ -651,8 +658,11 @@ virtio_dev_merge_rx(struct virtio_net *dev, uint16_t queue_id, + } + + vq = dev->virtqueue[queue_id]; ++ ++ rte_spinlock_lock(&vq->access_lock); ++ + if (unlikely(vq->enabled == 0)) +- return 0; ++ goto out_access_unlock; + + if (dev->features & (1ULL << VIRTIO_F_IOMMU_PLATFORM)) + vhost_user_iotlb_rd_lock(vq); +@@ -715,6 +725,9 @@ virtio_dev_merge_rx(struct virtio_net *dev, uint16_t queue_id, + if (dev->features & (1ULL << VIRTIO_F_IOMMU_PLATFORM)) + vhost_user_iotlb_rd_unlock(vq); + ++out_access_unlock: ++ rte_spinlock_unlock(&vq->access_lock); ++ + return pkt_idx; + } + +@@ -1180,9 +1193,13 @@ rte_vhost_dequeue_burst(int vid, uint16_t queue_id, + } + + vq = dev->virtqueue[queue_id]; +- if (unlikely(vq->enabled == 0)) ++ ++ if (unlikely(rte_spinlock_trylock(&vq->access_lock) == 0)) + return 0; + ++ if (unlikely(vq->enabled == 0)) ++ goto out_access_unlock; ++ + vq->batch_copy_nb_elems = 0; + + if (dev->features & (1ULL << VIRTIO_F_IOMMU_PLATFORM)) +@@ -1240,7 +1257,7 @@ rte_vhost_dequeue_burst(int vid, uint16_t queue_id, + if (rarp_mbuf == NULL) { + RTE_LOG(ERR, VHOST_DATA, + "Failed to allocate memory for mbuf.\n"); +- return 0; ++ goto out; + } + + if (make_rarp_packet(rarp_mbuf, &dev->mac)) { +@@ -1356,6 +1373,9 @@ rte_vhost_dequeue_burst(int vid, uint16_t queue_id, + if (dev->features & (1ULL << VIRTIO_F_IOMMU_PLATFORM)) + vhost_user_iotlb_rd_unlock(vq); + ++out_access_unlock: ++ rte_spinlock_unlock(&vq->access_lock); ++ + if (unlikely(rarp_mbuf != NULL)) { + /* + * Inject it to the head of "pkts" array, so that switch's mac diff --git a/SOURCES/0002-vhost-propagate-set-features-handling-error.patch b/SOURCES/0002-vhost-propagate-set-features-handling-error.patch new file mode 100644 index 0000000..db021de --- /dev/null +++ b/SOURCES/0002-vhost-propagate-set-features-handling-error.patch @@ -0,0 +1,40 @@ +From d7f0078e3a3d838b4ec6a87dca62771246e53db6 Mon Sep 17 00:00:00 2001 +From: Maxime Coquelin +Date: Wed, 13 Dec 2017 09:51:07 +0100 +Subject: [PATCH 2/6] vhost: propagate set features handling error + +Not propagating VHOST_USER_SET_FEATURES request handling +error may result in unpredictable behavior, as host and +guests features may no more be synchronized. + +This patch fixes this by reporting the error to the upper +layer, which would result in the device being destroyed +and the connection with the master to be closed. + +Signed-off-by: Maxime Coquelin +Acked-by: Laszlo Ersek +Acked-by: Yuanhan Liu +(cherry picked from commit 59fe5e17d9308b008ffa22ea250ddd363c84c3b5) +Signed-off-by: Maxime Coquelin +--- + dpdk-17.11/lib/librte_vhost/vhost_user.c | 4 +++- + 1 file changed, 3 insertions(+), 1 deletion(-) + +diff --git a/dpdk-17.11/lib/librte_vhost/vhost_user.c b/dpdk-17.11/lib/librte_vhost/vhost_user.c +index 545dbcb2b..471b1612c 100644 +--- a/dpdk-17.11/lib/librte_vhost/vhost_user.c ++++ b/dpdk-17.11/lib/librte_vhost/vhost_user.c +@@ -1263,7 +1263,9 @@ vhost_user_msg_handler(int vid, int fd) + send_vhost_reply(fd, &msg); + break; + case VHOST_USER_SET_FEATURES: +- vhost_user_set_features(dev, msg.payload.u64); ++ ret = vhost_user_set_features(dev, msg.payload.u64); ++ if (ret) ++ return -1; + break; + + case VHOST_USER_GET_PROTOCOL_FEATURES: +-- +2.14.3 + diff --git a/SOURCES/0003-vhost-extract-virtqueue-cleaning-and-freeing-functio.patch b/SOURCES/0003-vhost-extract-virtqueue-cleaning-and-freeing-functio.patch new file mode 100644 index 0000000..d1caace --- /dev/null +++ b/SOURCES/0003-vhost-extract-virtqueue-cleaning-and-freeing-functio.patch @@ -0,0 +1,83 @@ +From 297fcc013877e57c387e444bf7323fbfd77e4b3f Mon Sep 17 00:00:00 2001 +From: Maxime Coquelin +Date: Wed, 13 Dec 2017 09:51:08 +0100 +Subject: [PATCH 3/6] vhost: extract virtqueue cleaning and freeing functions + +This patch extracts needed code for vhost_user.c to be able +to clean and free virtqueues unitary. + +Signed-off-by: Maxime Coquelin +Acked-by: Laszlo Ersek +Acked-by: Yuanhan Liu +(cherry picked from commit 467fe22df94b85d2df67b9be3ccbfb3dd72cdd6d) +Signed-off-by: Maxime Coquelin +--- + dpdk-17.11/lib/librte_vhost/vhost.c | 22 ++++++++++++---------- + dpdk-17.11/lib/librte_vhost/vhost.h | 3 +++ + 2 files changed, 15 insertions(+), 10 deletions(-) + +diff --git a/dpdk-17.11/lib/librte_vhost/vhost.c b/dpdk-17.11/lib/librte_vhost/vhost.c +index 4f8b73a09..df528a4ea 100644 +--- a/dpdk-17.11/lib/librte_vhost/vhost.c ++++ b/dpdk-17.11/lib/librte_vhost/vhost.c +@@ -103,7 +103,7 @@ get_device(int vid) + return dev; + } + +-static void ++void + cleanup_vq(struct vhost_virtqueue *vq, int destroy) + { + if ((vq->callfd >= 0) && (destroy != 0)) +@@ -127,6 +127,15 @@ cleanup_device(struct virtio_net *dev, int destroy) + cleanup_vq(dev->virtqueue[i], destroy); + } + ++void ++free_vq(struct vhost_virtqueue *vq) ++{ ++ rte_free(vq->shadow_used_ring); ++ rte_free(vq->batch_copy_elems); ++ rte_mempool_free(vq->iotlb_pool); ++ rte_free(vq); ++} ++ + /* + * Release virtqueues and device memory. + */ +@@ -134,16 +143,9 @@ static void + free_device(struct virtio_net *dev) + { + uint32_t i; +- struct vhost_virtqueue *vq; +- +- for (i = 0; i < dev->nr_vring; i++) { +- vq = dev->virtqueue[i]; + +- rte_free(vq->shadow_used_ring); +- rte_free(vq->batch_copy_elems); +- rte_mempool_free(vq->iotlb_pool); +- rte_free(vq); +- } ++ for (i = 0; i < dev->nr_vring; i++) ++ free_vq(dev->virtqueue[i]); + + rte_free(dev); + } +diff --git a/dpdk-17.11/lib/librte_vhost/vhost.h b/dpdk-17.11/lib/librte_vhost/vhost.h +index 1cc81c17c..9cad1bb3c 100644 +--- a/dpdk-17.11/lib/librte_vhost/vhost.h ++++ b/dpdk-17.11/lib/librte_vhost/vhost.h +@@ -364,6 +364,9 @@ void cleanup_device(struct virtio_net *dev, int destroy); + void reset_device(struct virtio_net *dev); + void vhost_destroy_device(int); + ++void cleanup_vq(struct vhost_virtqueue *vq, int destroy); ++void free_vq(struct vhost_virtqueue *vq); ++ + int alloc_vring_queue(struct virtio_net *dev, uint32_t vring_idx); + + void vhost_set_ifname(int, const char *if_name, unsigned int if_len); +-- +2.14.3 + diff --git a/SOURCES/0004-vhost-destroy-unused-virtqueues-when-multiqueue-not-.patch b/SOURCES/0004-vhost-destroy-unused-virtqueues-when-multiqueue-not-.patch new file mode 100644 index 0000000..7a32bfc --- /dev/null +++ b/SOURCES/0004-vhost-destroy-unused-virtqueues-when-multiqueue-not-.patch @@ -0,0 +1,63 @@ +From eb2b3b18edc3af42f52ca5b3f30aa8bfbd08206a Mon Sep 17 00:00:00 2001 +From: Maxime Coquelin +Date: Wed, 13 Dec 2017 09:51:09 +0100 +Subject: [PATCH 4/6] vhost: destroy unused virtqueues when multiqueue not + negotiated + +QEMU sends VHOST_USER_SET_VRING_CALL requests for all queues +declared in QEMU command line before the guest is started. +It has the effect in DPDK vhost-user backend to allocate vrings +for all queues declared by QEMU. + +If the first driver being used does not support multiqueue, +the device never changes to VIRTIO_DEV_RUNNING state as only +the first queue pair is initialized. One driver impacted by +this bug is virtio-net's iPXE driver which does not support +VIRTIO_NET_F_MQ feature. + +It is safe to destroy unused virtqueues in SET_FEATURES request +handler, as it is ensured the device is not in running state +at this stage, so virtqueues aren't being processed. + +Signed-off-by: Maxime Coquelin +Acked-by: Laszlo Ersek +Acked-by: Yuanhan Liu +(cherry picked from commit e29109323595beb3884da58126ebb3b878cb66f5) +Signed-off-by: Maxime Coquelin +--- + dpdk-17.11/lib/librte_vhost/vhost_user.c | 19 +++++++++++++++++++ + 1 file changed, 19 insertions(+) + +diff --git a/dpdk-17.11/lib/librte_vhost/vhost_user.c b/dpdk-17.11/lib/librte_vhost/vhost_user.c +index 471b1612c..1848c8de9 100644 +--- a/dpdk-17.11/lib/librte_vhost/vhost_user.c ++++ b/dpdk-17.11/lib/librte_vhost/vhost_user.c +@@ -216,6 +216,25 @@ vhost_user_set_features(struct virtio_net *dev, uint64_t features) + (dev->features & (1 << VIRTIO_NET_F_MRG_RXBUF)) ? "on" : "off", + (dev->features & (1ULL << VIRTIO_F_VERSION_1)) ? "on" : "off"); + ++ if (!(dev->features & (1ULL << VIRTIO_NET_F_MQ))) { ++ /* ++ * Remove all but first queue pair if MQ hasn't been ++ * negotiated. This is safe because the device is not ++ * running at this stage. ++ */ ++ while (dev->nr_vring > 2) { ++ struct vhost_virtqueue *vq; ++ ++ vq = dev->virtqueue[--dev->nr_vring]; ++ if (!vq) ++ continue; ++ ++ dev->virtqueue[dev->nr_vring] = NULL; ++ cleanup_vq(vq, 1); ++ free_vq(vq); ++ } ++ } ++ + return 0; + } + +-- +2.14.3 + diff --git a/SOURCES/0005-vhost-add-flag-for-built-in-virtio-driver.patch b/SOURCES/0005-vhost-add-flag-for-built-in-virtio-driver.patch new file mode 100644 index 0000000..8e3d130 --- /dev/null +++ b/SOURCES/0005-vhost-add-flag-for-built-in-virtio-driver.patch @@ -0,0 +1,188 @@ +From 8db980965f3d8cde1abbdb89eaecbc829460133e Mon Sep 17 00:00:00 2001 +From: Stefan Hajnoczi +Date: Wed, 31 Jan 2018 17:46:50 +0000 +Subject: [PATCH 5/6] vhost: add flag for built-in virtio driver + +The librte_vhost API is used in two ways: +1. As a vhost net device backend via rte_vhost_enqueue/dequeue_burst(). +2. As a library for implementing vhost device backends. + +There is no distinction between the two at the API level or in the +librte_vhost implementation. For example, device state is kept in +"struct virtio_net" regardless of whether this is actually a net device +backend or whether the built-in virtio_net.c driver is in use. + +The virtio_net.c driver should be a librte_vhost API client just like +the vhost-scsi code and have no special access to vhost.h internals. +Unfortunately, fixing this requires significant librte_vhost API +changes. + +This patch takes a different approach: keep the librte_vhost API +unchanged but track whether the built-in virtio_net.c driver is in use. +See the next patch for a bug fix that requires knowledge of whether +virtio_net.c is in use. + +Signed-off-by: Stefan Hajnoczi +Reviewed-by: Maxime Coquelin +Acked-by: Yuanhan Liu +(cherry picked from commit 1c717af4c699e60081feb1d645f86189551f9a9c) +Signed-off-by: Maxime Coquelin +--- + dpdk-17.11/lib/librte_vhost/socket.c | 15 +++++++++++++++ + dpdk-17.11/lib/librte_vhost/vhost.c | 17 ++++++++++++++++- + dpdk-17.11/lib/librte_vhost/vhost.h | 3 +++ + dpdk-17.11/lib/librte_vhost/virtio_net.c | 14 ++++++++++++++ + 4 files changed, 48 insertions(+), 1 deletion(-) + +diff --git a/dpdk-17.11/lib/librte_vhost/socket.c b/dpdk-17.11/lib/librte_vhost/socket.c +index 422da002f..ceecc6149 100644 +--- a/dpdk-17.11/lib/librte_vhost/socket.c ++++ b/dpdk-17.11/lib/librte_vhost/socket.c +@@ -69,6 +69,7 @@ struct vhost_user_socket { + bool reconnect; + bool dequeue_zero_copy; + bool iommu_support; ++ bool use_builtin_virtio_net; + + /* + * The "supported_features" indicates the feature bits the +@@ -224,6 +225,8 @@ vhost_user_add_connection(int fd, struct vhost_user_socket *vsocket) + size = strnlen(vsocket->path, PATH_MAX); + vhost_set_ifname(vid, vsocket->path, size); + ++ vhost_set_builtin_virtio_net(vid, vsocket->use_builtin_virtio_net); ++ + if (vsocket->dequeue_zero_copy) + vhost_enable_dequeue_zero_copy(vid); + +@@ -547,6 +550,12 @@ rte_vhost_driver_disable_features(const char *path, uint64_t features) + + pthread_mutex_lock(&vhost_user.mutex); + vsocket = find_vhost_user_socket(path); ++ ++ /* Note that use_builtin_virtio_net is not affected by this function ++ * since callers may want to selectively disable features of the ++ * built-in vhost net device backend. ++ */ ++ + if (vsocket) + vsocket->features &= ~features; + pthread_mutex_unlock(&vhost_user.mutex); +@@ -587,6 +596,11 @@ rte_vhost_driver_set_features(const char *path, uint64_t features) + if (vsocket) { + vsocket->supported_features = features; + vsocket->features = features; ++ ++ /* Anyone setting feature bits is implementing their own vhost ++ * device backend. ++ */ ++ vsocket->use_builtin_virtio_net = false; + } + pthread_mutex_unlock(&vhost_user.mutex); + +@@ -667,6 +681,7 @@ rte_vhost_driver_register(const char *path, uint64_t flags) + * rte_vhost_driver_set_features(), which will overwrite following + * two values. + */ ++ vsocket->use_builtin_virtio_net = true; + vsocket->supported_features = VIRTIO_NET_SUPPORTED_FEATURES; + vsocket->features = VIRTIO_NET_SUPPORTED_FEATURES; + +diff --git a/dpdk-17.11/lib/librte_vhost/vhost.c b/dpdk-17.11/lib/librte_vhost/vhost.c +index df528a4ea..75deaa877 100644 +--- a/dpdk-17.11/lib/librte_vhost/vhost.c ++++ b/dpdk-17.11/lib/librte_vhost/vhost.c +@@ -279,7 +279,7 @@ reset_device(struct virtio_net *dev) + + dev->features = 0; + dev->protocol_features = 0; +- dev->flags = 0; ++ dev->flags &= VIRTIO_DEV_BUILTIN_VIRTIO_NET; + + for (i = 0; i < dev->nr_vring; i++) + reset_vring_queue(dev, i); +@@ -315,6 +315,7 @@ vhost_new_device(void) + + vhost_devices[i] = dev; + dev->vid = i; ++ dev->flags = VIRTIO_DEV_BUILTIN_VIRTIO_NET; + dev->slave_req_fd = -1; + + return i; +@@ -371,6 +372,20 @@ vhost_enable_dequeue_zero_copy(int vid) + dev->dequeue_zero_copy = 1; + } + ++void ++vhost_set_builtin_virtio_net(int vid, bool enable) ++{ ++ struct virtio_net *dev = get_device(vid); ++ ++ if (dev == NULL) ++ return; ++ ++ if (enable) ++ dev->flags |= VIRTIO_DEV_BUILTIN_VIRTIO_NET; ++ else ++ dev->flags &= ~VIRTIO_DEV_BUILTIN_VIRTIO_NET; ++} ++ + int + rte_vhost_get_mtu(int vid, uint16_t *mtu) + { +diff --git a/dpdk-17.11/lib/librte_vhost/vhost.h b/dpdk-17.11/lib/librte_vhost/vhost.h +index 9cad1bb3c..e06531e6b 100644 +--- a/dpdk-17.11/lib/librte_vhost/vhost.h ++++ b/dpdk-17.11/lib/librte_vhost/vhost.h +@@ -53,6 +53,8 @@ + #define VIRTIO_DEV_RUNNING 1 + /* Used to indicate that the device is ready to operate */ + #define VIRTIO_DEV_READY 2 ++/* Used to indicate that the built-in vhost net device backend is enabled */ ++#define VIRTIO_DEV_BUILTIN_VIRTIO_NET 4 + + /* Backend value set by guest. */ + #define VIRTIO_DEV_STOPPED -1 +@@ -371,6 +373,7 @@ int alloc_vring_queue(struct virtio_net *dev, uint32_t vring_idx); + + void vhost_set_ifname(int, const char *if_name, unsigned int if_len); + void vhost_enable_dequeue_zero_copy(int vid); ++void vhost_set_builtin_virtio_net(int vid, bool enable); + + struct vhost_device_ops const *vhost_driver_callback_get(const char *path); + +diff --git a/dpdk-17.11/lib/librte_vhost/virtio_net.c b/dpdk-17.11/lib/librte_vhost/virtio_net.c +index 6fee16e55..3bfd71945 100644 +--- a/dpdk-17.11/lib/librte_vhost/virtio_net.c ++++ b/dpdk-17.11/lib/librte_vhost/virtio_net.c +@@ -727,6 +727,13 @@ rte_vhost_enqueue_burst(int vid, uint16_t queue_id, + if (!dev) + return 0; + ++ if (unlikely(!(dev->flags & VIRTIO_DEV_BUILTIN_VIRTIO_NET))) { ++ RTE_LOG(ERR, VHOST_DATA, ++ "(%d) %s: built-in vhost net backend is disabled.\n", ++ dev->vid, __func__); ++ return 0; ++ } ++ + if (dev->features & (1 << VIRTIO_NET_F_MRG_RXBUF)) + return virtio_dev_merge_rx(dev, queue_id, pkts, count); + else +@@ -1173,6 +1180,13 @@ rte_vhost_dequeue_burst(int vid, uint16_t queue_id, + if (!dev) + return 0; + ++ if (unlikely(!(dev->flags & VIRTIO_DEV_BUILTIN_VIRTIO_NET))) { ++ RTE_LOG(ERR, VHOST_DATA, ++ "(%d) %s: built-in vhost net backend is disabled.\n", ++ dev->vid, __func__); ++ return 0; ++ } ++ + if (unlikely(!is_valid_virt_queue_idx(queue_id, 1, dev->nr_vring))) { + RTE_LOG(ERR, VHOST_DATA, "(%d) %s: invalid virtqueue idx %d.\n", + dev->vid, __func__, queue_id); +-- +2.14.3 + diff --git a/SOURCES/0006-vhost-drop-virtqueues-only-with-built-in-virtio-driv.patch b/SOURCES/0006-vhost-drop-virtqueues-only-with-built-in-virtio-driv.patch new file mode 100644 index 0000000..398aaba --- /dev/null +++ b/SOURCES/0006-vhost-drop-virtqueues-only-with-built-in-virtio-driv.patch @@ -0,0 +1,42 @@ +From c18b2f65e0a3be55e30fc3df6062e00353dfdb26 Mon Sep 17 00:00:00 2001 +From: Stefan Hajnoczi +Date: Wed, 31 Jan 2018 17:46:51 +0000 +Subject: [PATCH 6/6] vhost: drop virtqueues only with built-in virtio driver + +Commit e29109323595beb3884da58126ebb3b878cb66f5 ("vhost: destroy unused +virtqueues when multiqueue not negotiated") broke vhost-scsi by removing +virtqueues when the virtio-net-specific VIRTIO_NET_F_MQ feature bit is +missing. + +The vhost_user.c code shouldn't assume all devices are vhost net device +backends. Use the new VIRTIO_DEV_BUILTIN_VIRTIO_NET flag to check +whether virtio_net.c is being used. + +This fixes examples/vhost_scsi. + +Signed-off-by: Stefan Hajnoczi +Reviewed-by: Maxime Coquelin +Acked-by: Yuanhan Liu +(cherry picked from commit 33adfbc805651f455dbf19f1e4b4b0878717a5e5) +Signed-off-by: Maxime Coquelin +--- + dpdk-17.11/lib/librte_vhost/vhost_user.c | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/dpdk-17.11/lib/librte_vhost/vhost_user.c b/dpdk-17.11/lib/librte_vhost/vhost_user.c +index 1848c8de9..f334497d4 100644 +--- a/dpdk-17.11/lib/librte_vhost/vhost_user.c ++++ b/dpdk-17.11/lib/librte_vhost/vhost_user.c +@@ -216,7 +216,8 @@ vhost_user_set_features(struct virtio_net *dev, uint64_t features) + (dev->features & (1 << VIRTIO_NET_F_MRG_RXBUF)) ? "on" : "off", + (dev->features & (1ULL << VIRTIO_F_VERSION_1)) ? "on" : "off"); + +- if (!(dev->features & (1ULL << VIRTIO_NET_F_MQ))) { ++ if ((dev->flags & VIRTIO_DEV_BUILTIN_VIRTIO_NET) && ++ !(dev->features & (1ULL << VIRTIO_NET_F_MQ))) { + /* + * Remove all but first queue pair if MQ hasn't been + * negotiated. This is safe because the device is not +-- +2.14.3 + diff --git a/SOURCES/arm64-armv8a-linuxapp-gcc-config b/SOURCES/arm64-armv8a-linuxapp-gcc-config new file mode 100644 index 0000000..2f52c7b --- /dev/null +++ b/SOURCES/arm64-armv8a-linuxapp-gcc-config @@ -0,0 +1,559 @@ +# -*- cfg-sha: 2543d3fdeee262a6a7fdcdd19e5c36cde5ae450d4cdf35a4a4af438710180e98 +# BSD LICENSE +# Copyright (C) Cavium, Inc 2015. All rights reserved. +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Cavium, Inc nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# BSD LICENSE +# Copyright (C) Cavium, Inc 2017. All rights reserved. +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Cavium, Inc nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# BSD LICENSE +# Copyright(c) 2010-2016 Intel Corporation. All rights reserved. +# All rights reserved. +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# BSD LICENSE +# Copyright(c) 2010-2017 Intel Corporation. All rights reserved. +# All rights reserved. +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# RTE_EXEC_ENV values are the directories in mk/exec-env/ +CONFIG_RTE_EXEC_ENV="linuxapp" +# RTE_ARCH values are architecture we compile for. directories in mk/arch/ +CONFIG_RTE_ARCH="arm64" +# machine can define specific variables or action for a specific board +# RTE_MACHINE values are architecture we compile for. directories in mk/machine/ +CONFIG_RTE_MACHINE="armv8a" +# The compiler we use. +# RTE_TOOLCHAIN values are architecture we compile for. directories in mk/toolchain/ +CONFIG_RTE_TOOLCHAIN="gcc" +# Use intrinsics or assembly code for key routines +CONFIG_RTE_FORCE_INTRINSICS=y +# Machine forces strict alignment constraints. +CONFIG_RTE_ARCH_STRICT_ALIGN=n +# Compile to share library +CONFIG_RTE_BUILD_SHARED_LIB=n +# Use newest code breaking previous ABI +CONFIG_RTE_NEXT_ABI=n +# Major ABI to overwrite library specific LIBABIVER +CONFIG_RTE_MAJOR_ABI= +# Machine's cache line size +CONFIG_RTE_CACHE_LINE_SIZE=128 +# Compile Environment Abstraction Layer +CONFIG_RTE_LIBRTE_EAL=y +CONFIG_RTE_MAX_LCORE=128 +CONFIG_RTE_MAX_NUMA_NODES=8 +CONFIG_RTE_MAX_MEMSEG=256 +CONFIG_RTE_MAX_MEMZONE=2560 +CONFIG_RTE_MAX_TAILQ=32 +CONFIG_RTE_ENABLE_ASSERT=n +CONFIG_RTE_LOG_LEVEL=RTE_LOG_INFO +CONFIG_RTE_LOG_DP_LEVEL=RTE_LOG_INFO +CONFIG_RTE_LOG_HISTORY=256 +CONFIG_RTE_BACKTRACE=y +CONFIG_RTE_LIBEAL_USE_HPET=n +CONFIG_RTE_EAL_ALLOW_INV_SOCKET_ID=n +CONFIG_RTE_EAL_ALWAYS_PANIC_ON_ERROR=n +CONFIG_RTE_EAL_IGB_UIO=n +CONFIG_RTE_EAL_VFIO=y +CONFIG_RTE_MALLOC_DEBUG=n +CONFIG_RTE_EAL_NUMA_AWARE_HUGEPAGES=y +# Recognize/ignore architecture we compile for. AVX/AVX512 CPU flags for performance/power testing. +# AVX512 is marked as experimental for now, will enable it after enough +# field test and possible optimization. +CONFIG_RTE_ENABLE_AVX=y +CONFIG_RTE_ENABLE_AVX512=n +# Default driver path (or "" to disable) +CONFIG_RTE_EAL_PMD_PATH="" +# Compile Environment Abstraction Layer to support Vmware TSC map +CONFIG_RTE_LIBRTE_EAL_VMWARE_TSC_MAP_SUPPORT=y +# Compile architecture we compile for. PCI library +CONFIG_RTE_LIBRTE_PCI=y +# Compile architecture we compile for. argument parser library +CONFIG_RTE_LIBRTE_KVARGS=y +# Compile generic ethernet library +CONFIG_RTE_LIBRTE_ETHER=y +CONFIG_RTE_LIBRTE_ETHDEV_DEBUG=n +CONFIG_RTE_MAX_ETHPORTS=32 +CONFIG_RTE_MAX_QUEUES_PER_PORT=1024 +CONFIG_RTE_LIBRTE_IEEE1588=n +CONFIG_RTE_ETHDEV_QUEUE_STAT_CNTRS=16 +CONFIG_RTE_ETHDEV_RXTX_CALLBACKS=y +CONFIG_RTE_ETHDEV_PROFILE_ITT_WASTED_RX_ITERATIONS=n +# Turn off Tx preparation stage +# Warning: rte_eth_tx_prepare() can be safely disabled only if using a +# driver which do not implement any Tx preparation. +CONFIG_RTE_ETHDEV_TX_PREPARE_NOOP=n +# Compile PCI bus driver +CONFIG_RTE_LIBRTE_PCI_BUS=y +# Compile architecture we compile for. vdev bus +CONFIG_RTE_LIBRTE_VDEV_BUS=y +# Compile burst-oriented Amazon ENA PMD driver +CONFIG_RTE_LIBRTE_ENA_PMD=n +CONFIG_RTE_LIBRTE_ENA_DEBUG_RX=n +CONFIG_RTE_LIBRTE_ENA_DEBUG_TX=n +CONFIG_RTE_LIBRTE_ENA_DEBUG_TX_FREE=n +CONFIG_RTE_LIBRTE_ENA_DEBUG_DRIVER=n +CONFIG_RTE_LIBRTE_ENA_COM_DEBUG=n +# Compile burst-oriented IGB & EM PMD drivers +CONFIG_RTE_LIBRTE_EM_PMD=n +CONFIG_RTE_LIBRTE_IGB_PMD=y +CONFIG_RTE_LIBRTE_E1000_DEBUG_INIT=n +CONFIG_RTE_LIBRTE_E1000_DEBUG_RX=n +CONFIG_RTE_LIBRTE_E1000_DEBUG_TX=n +CONFIG_RTE_LIBRTE_E1000_DEBUG_TX_FREE=n +CONFIG_RTE_LIBRTE_E1000_DEBUG_DRIVER=n +CONFIG_RTE_LIBRTE_E1000_PF_DISABLE_STRIP_CRC=n +# Compile burst-oriented IXGBE PMD driver +CONFIG_RTE_LIBRTE_IXGBE_PMD=y +CONFIG_RTE_LIBRTE_IXGBE_DEBUG_INIT=n +CONFIG_RTE_LIBRTE_IXGBE_DEBUG_RX=n +CONFIG_RTE_LIBRTE_IXGBE_DEBUG_TX=n +CONFIG_RTE_LIBRTE_IXGBE_DEBUG_TX_FREE=n +CONFIG_RTE_LIBRTE_IXGBE_DEBUG_DRIVER=n +CONFIG_RTE_LIBRTE_IXGBE_PF_DISABLE_STRIP_CRC=n +CONFIG_RTE_IXGBE_INC_VECTOR=y +CONFIG_RTE_LIBRTE_IXGBE_BYPASS=n +# Compile burst-oriented I40E PMD driver +CONFIG_RTE_LIBRTE_I40E_PMD=y +CONFIG_RTE_LIBRTE_I40E_DEBUG_RX=n +CONFIG_RTE_LIBRTE_I40E_DEBUG_TX=n +CONFIG_RTE_LIBRTE_I40E_DEBUG_TX_FREE=n +CONFIG_RTE_LIBRTE_I40E_RX_ALLOW_BULK_ALLOC=y +CONFIG_RTE_LIBRTE_I40E_INC_VECTOR=y +CONFIG_RTE_LIBRTE_I40E_16BYTE_RX_DESC=n +CONFIG_RTE_LIBRTE_I40E_QUEUE_NUM_PER_PF=64 +CONFIG_RTE_LIBRTE_I40E_QUEUE_NUM_PER_VF=4 +CONFIG_RTE_LIBRTE_I40E_QUEUE_NUM_PER_VM=4 +# interval up to 8160 us, aligned to 2 (or default value) +CONFIG_RTE_LIBRTE_I40E_ITR_INTERVAL=-1 +# Compile burst-oriented FM10K PMD +CONFIG_RTE_LIBRTE_FM10K_PMD=n +CONFIG_RTE_LIBRTE_FM10K_DEBUG_INIT=n +CONFIG_RTE_LIBRTE_FM10K_DEBUG_RX=n +CONFIG_RTE_LIBRTE_FM10K_DEBUG_TX=n +CONFIG_RTE_LIBRTE_FM10K_DEBUG_TX_FREE=n +CONFIG_RTE_LIBRTE_FM10K_DEBUG_DRIVER=n +CONFIG_RTE_LIBRTE_FM10K_RX_OLFLAGS_ENABLE=y +CONFIG_RTE_LIBRTE_FM10K_INC_VECTOR=y +# Compile burst-oriented Mellanox ConnectX-3 (MLX4) PMD +CONFIG_RTE_LIBRTE_MLX4_PMD=n +CONFIG_RTE_LIBRTE_MLX4_DEBUG=n +CONFIG_RTE_LIBRTE_MLX4_DEBUG_BROKEN_VERBS=n +CONFIG_RTE_LIBRTE_MLX4_TX_MP_CACHE=8 +# Compile burst-oriented Mellanox ConnectX-4 & ConnectX-5 (MLX5) PMD +CONFIG_RTE_LIBRTE_MLX5_PMD=n +CONFIG_RTE_LIBRTE_MLX5_DEBUG=n +CONFIG_RTE_LIBRTE_MLX5_TX_MP_CACHE=8 +# Compile burst-oriented Broadcom PMD driver +CONFIG_RTE_LIBRTE_BNX2X_PMD=n +CONFIG_RTE_LIBRTE_BNX2X_DEBUG=n +CONFIG_RTE_LIBRTE_BNX2X_DEBUG_INIT=n +CONFIG_RTE_LIBRTE_BNX2X_DEBUG_RX=n +CONFIG_RTE_LIBRTE_BNX2X_DEBUG_TX=n +CONFIG_RTE_LIBRTE_BNX2X_MF_SUPPORT=n +CONFIG_RTE_LIBRTE_BNX2X_DEBUG_PERIODIC=n +# Compile burst-oriented Chelsio Terminator (CXGBE) PMD +CONFIG_RTE_LIBRTE_CXGBE_PMD=n +CONFIG_RTE_LIBRTE_CXGBE_DEBUG=n +CONFIG_RTE_LIBRTE_CXGBE_DEBUG_REG=n +CONFIG_RTE_LIBRTE_CXGBE_DEBUG_MBOX=n +CONFIG_RTE_LIBRTE_CXGBE_DEBUG_TX=n +CONFIG_RTE_LIBRTE_CXGBE_DEBUG_RX=n +CONFIG_RTE_LIBRTE_CXGBE_TPUT=y +# Compile burst-oriented Cisco ENIC PMD driver +CONFIG_RTE_LIBRTE_ENIC_PMD=n +CONFIG_RTE_LIBRTE_ENIC_DEBUG=n +CONFIG_RTE_LIBRTE_ENIC_DEBUG_FLOW=n +# Compile burst-oriented Netronome NFP PMD driver +CONFIG_RTE_LIBRTE_NFP_PMD=n +CONFIG_RTE_LIBRTE_NFP_DEBUG=n +# Compile Marvell PMD driver +CONFIG_RTE_LIBRTE_MRVL_PMD=n +# Compile burst-oriented Broadcom BNXT PMD driver +CONFIG_RTE_LIBRTE_BNXT_PMD=n +# Compile burst-oriented Solarflare libefx-based PMD +CONFIG_RTE_LIBRTE_SFC_EFX_PMD=n +CONFIG_RTE_LIBRTE_SFC_EFX_DEBUG=n +# Compile SOFTNIC PMD +CONFIG_RTE_LIBRTE_PMD_SOFTNIC=y +# Compile software PMD backed by SZEDATA2 device +CONFIG_RTE_LIBRTE_PMD_SZEDATA2=n +# Defines firmware type address space. +# See documentation for supported values. +# Other values raise compile time error. +CONFIG_RTE_LIBRTE_PMD_SZEDATA2_AS=0 +# Compile burst-oriented Cavium Thunderx NICVF PMD driver +CONFIG_RTE_LIBRTE_THUNDERX_NICVF_PMD=n +CONFIG_RTE_LIBRTE_THUNDERX_NICVF_DEBUG_INIT=n +CONFIG_RTE_LIBRTE_THUNDERX_NICVF_DEBUG_RX=n +CONFIG_RTE_LIBRTE_THUNDERX_NICVF_DEBUG_TX=n +CONFIG_RTE_LIBRTE_THUNDERX_NICVF_DEBUG_DRIVER=n +CONFIG_RTE_LIBRTE_THUNDERX_NICVF_DEBUG_MBOX=n +# Compile burst-oriented Cavium LiquidIO PMD driver +CONFIG_RTE_LIBRTE_LIO_PMD=n +CONFIG_RTE_LIBRTE_LIO_DEBUG_DRIVER=n +CONFIG_RTE_LIBRTE_LIO_DEBUG_INIT=n +CONFIG_RTE_LIBRTE_LIO_DEBUG_RX=n +CONFIG_RTE_LIBRTE_LIO_DEBUG_TX=n +CONFIG_RTE_LIBRTE_LIO_DEBUG_MBOX=n +CONFIG_RTE_LIBRTE_LIO_DEBUG_REGS=n +# NXP DPAA Bus +CONFIG_RTE_LIBRTE_DPAA_BUS=n +CONFIG_RTE_LIBRTE_DPAA_MEMPOOL=n +CONFIG_RTE_LIBRTE_DPAA_PMD=n +# Compile burst-oriented Cavium OCTEONTX network PMD driver +CONFIG_RTE_LIBRTE_OCTEONTX_PMD=n +CONFIG_RTE_LIBRTE_OCTEONTX_DEBUG_INIT=n +CONFIG_RTE_LIBRTE_OCTEONTX_DEBUG_RX=n +CONFIG_RTE_LIBRTE_OCTEONTX_DEBUG_TX=n +CONFIG_RTE_LIBRTE_OCTEONTX_DEBUG_DRIVER=n +CONFIG_RTE_LIBRTE_OCTEONTX_DEBUG_MBOX=n +# Compile NXP DPAA2 FSL-MC Bus +CONFIG_RTE_LIBRTE_FSLMC_BUS=n +# Compile Support Libraries for NXP DPAA2 +CONFIG_RTE_LIBRTE_DPAA2_MEMPOOL=n +CONFIG_RTE_LIBRTE_DPAA2_USE_PHYS_IOVA=y +# Compile burst-oriented NXP DPAA2 PMD driver +CONFIG_RTE_LIBRTE_DPAA2_PMD=n +CONFIG_RTE_LIBRTE_DPAA2_DEBUG_INIT=n +CONFIG_RTE_LIBRTE_DPAA2_DEBUG_DRIVER=n +CONFIG_RTE_LIBRTE_DPAA2_DEBUG_RX=n +CONFIG_RTE_LIBRTE_DPAA2_DEBUG_TX=n +CONFIG_RTE_LIBRTE_DPAA2_DEBUG_TX_FREE=n +# Compile burst-oriented VIRTIO PMD driver +CONFIG_RTE_LIBRTE_VIRTIO_PMD=y +CONFIG_RTE_LIBRTE_VIRTIO_DEBUG_INIT=n +CONFIG_RTE_LIBRTE_VIRTIO_DEBUG_RX=n +CONFIG_RTE_LIBRTE_VIRTIO_DEBUG_TX=n +CONFIG_RTE_LIBRTE_VIRTIO_DEBUG_DRIVER=n +CONFIG_RTE_LIBRTE_VIRTIO_DEBUG_DUMP=n +# Compile virtio device emulation inside virtio PMD driver +CONFIG_RTE_VIRTIO_USER=n +# Compile burst-oriented VMXNET3 PMD driver +CONFIG_RTE_LIBRTE_VMXNET3_PMD=n +CONFIG_RTE_LIBRTE_VMXNET3_DEBUG_INIT=n +CONFIG_RTE_LIBRTE_VMXNET3_DEBUG_RX=n +CONFIG_RTE_LIBRTE_VMXNET3_DEBUG_TX=n +CONFIG_RTE_LIBRTE_VMXNET3_DEBUG_TX_FREE=n +CONFIG_RTE_LIBRTE_VMXNET3_DEBUG_DRIVER=n +# Compile example software rings based PMD +CONFIG_RTE_LIBRTE_PMD_RING=y +CONFIG_RTE_PMD_RING_MAX_RX_RINGS=16 +CONFIG_RTE_PMD_RING_MAX_TX_RINGS=16 +# Compile software PMD backed by PCAP files +CONFIG_RTE_LIBRTE_PMD_PCAP=n +# Compile link bonding PMD library +CONFIG_RTE_LIBRTE_PMD_BOND=n +CONFIG_RTE_LIBRTE_BOND_DEBUG_ALB=n +CONFIG_RTE_LIBRTE_BOND_DEBUG_ALB_L1=n +# QLogic 10G/25G/40G/50G/100G PMD +CONFIG_RTE_LIBRTE_QEDE_PMD=n +CONFIG_RTE_LIBRTE_QEDE_DEBUG_INIT=n +CONFIG_RTE_LIBRTE_QEDE_DEBUG_INFO=n +CONFIG_RTE_LIBRTE_QEDE_DEBUG_DRIVER=n +CONFIG_RTE_LIBRTE_QEDE_DEBUG_TX=n +CONFIG_RTE_LIBRTE_QEDE_DEBUG_RX=n +CONFIG_RTE_LIBRTE_QEDE_VF_TX_SWITCH=y +#Provides abs path/name of architecture we compile for. firmware file. +#Empty string denotes driver will use default firmware +CONFIG_RTE_LIBRTE_QEDE_FW="" +# Compile software PMD backed by AF_PACKET sockets (Linux only) +CONFIG_RTE_LIBRTE_PMD_AF_PACKET=n +# Compile ARK PMD +CONFIG_RTE_LIBRTE_ARK_PMD=n +CONFIG_RTE_LIBRTE_ARK_PAD_TX=y +CONFIG_RTE_LIBRTE_ARK_DEBUG_RX=n +CONFIG_RTE_LIBRTE_ARK_DEBUG_TX=n +CONFIG_RTE_LIBRTE_ARK_DEBUG_STATS=n +CONFIG_RTE_LIBRTE_ARK_DEBUG_TRACE=n +# Compile WRS accelerated virtual port (AVP) guest PMD driver +CONFIG_RTE_LIBRTE_AVP_PMD=n +CONFIG_RTE_LIBRTE_AVP_DEBUG_RX=n +CONFIG_RTE_LIBRTE_AVP_DEBUG_TX=n +CONFIG_RTE_LIBRTE_AVP_DEBUG_DRIVER=y +CONFIG_RTE_LIBRTE_AVP_DEBUG_BUFFERS=n +# Compile architecture we compile for. TAP PMD +# It is enabled by default for Linux only. +CONFIG_RTE_LIBRTE_PMD_TAP=n +# Compile null PMD +CONFIG_RTE_LIBRTE_PMD_NULL=n +# Compile fail-safe PMD +CONFIG_RTE_LIBRTE_PMD_FAILSAFE=y +# Do prefetch of packet data within PMD driver receive function +CONFIG_RTE_PMD_PACKET_PREFETCH=y +# Compile generic crypto device library +CONFIG_RTE_LIBRTE_CRYPTODEV=n +CONFIG_RTE_LIBRTE_CRYPTODEV_DEBUG=n +CONFIG_RTE_CRYPTO_MAX_DEVS=64 +CONFIG_RTE_CRYPTODEV_NAME_LEN=64 +# Compile PMD for ARMv8 Crypto device +CONFIG_RTE_LIBRTE_PMD_ARMV8_CRYPTO=n +CONFIG_RTE_LIBRTE_PMD_ARMV8_CRYPTO_DEBUG=n +# Compile NXP DPAA2 crypto sec driver for CAAM HW +CONFIG_RTE_LIBRTE_PMD_DPAA2_SEC=n +CONFIG_RTE_LIBRTE_DPAA2_SEC_DEBUG_INIT=n +CONFIG_RTE_LIBRTE_DPAA2_SEC_DEBUG_DRIVER=n +CONFIG_RTE_LIBRTE_DPAA2_SEC_DEBUG_RX=n +# NXP DPAA caam - crypto driver +CONFIG_RTE_LIBRTE_PMD_DPAA_SEC=n +CONFIG_RTE_LIBRTE_DPAA_SEC_DEBUG_INIT=n +CONFIG_RTE_LIBRTE_DPAA_SEC_DEBUG_DRIVER=n +CONFIG_RTE_LIBRTE_DPAA_SEC_DEBUG_RX=n +# Compile PMD for QuickAssist based devices +CONFIG_RTE_LIBRTE_PMD_QAT=n +CONFIG_RTE_LIBRTE_PMD_QAT_DEBUG_INIT=n +CONFIG_RTE_LIBRTE_PMD_QAT_DEBUG_TX=n +CONFIG_RTE_LIBRTE_PMD_QAT_DEBUG_RX=n +CONFIG_RTE_LIBRTE_PMD_QAT_DEBUG_DRIVER=n +# Number of sessions to create in architecture we compile for. session memory pool +# on a single QuickAssist device. +CONFIG_RTE_QAT_PMD_MAX_NB_SESSIONS=2048 +# Compile PMD for AESNI backed device +CONFIG_RTE_LIBRTE_PMD_AESNI_MB=n +CONFIG_RTE_LIBRTE_PMD_AESNI_MB_DEBUG=n +# Compile PMD for Software backed device +CONFIG_RTE_LIBRTE_PMD_OPENSSL=n +CONFIG_RTE_LIBRTE_PMD_OPENSSL_DEBUG=n +# Compile PMD for AESNI GCM device +CONFIG_RTE_LIBRTE_PMD_AESNI_GCM=n +CONFIG_RTE_LIBRTE_PMD_AESNI_GCM_DEBUG=n +# Compile PMD for SNOW 3G device +CONFIG_RTE_LIBRTE_PMD_SNOW3G=n +CONFIG_RTE_LIBRTE_PMD_SNOW3G_DEBUG=n +# Compile PMD for KASUMI device +CONFIG_RTE_LIBRTE_PMD_KASUMI=n +CONFIG_RTE_LIBRTE_PMD_KASUMI_DEBUG=n +# Compile PMD for ZUC device +CONFIG_RTE_LIBRTE_PMD_ZUC=n +CONFIG_RTE_LIBRTE_PMD_ZUC_DEBUG=n +# Compile PMD for Crypto Scheduler device +CONFIG_RTE_LIBRTE_PMD_CRYPTO_SCHEDULER=n +CONFIG_RTE_LIBRTE_PMD_CRYPTO_SCHEDULER_DEBUG=n +# Compile PMD for NULL Crypto device +CONFIG_RTE_LIBRTE_PMD_NULL_CRYPTO=n +# Compile PMD for Marvell Crypto device +CONFIG_RTE_LIBRTE_PMD_MRVL_CRYPTO=n +CONFIG_RTE_LIBRTE_PMD_MRVL_CRYPTO_DEBUG=n +# Compile generic security library +CONFIG_RTE_LIBRTE_SECURITY=n +# Compile generic event device library +CONFIG_RTE_LIBRTE_EVENTDEV=y +CONFIG_RTE_LIBRTE_EVENTDEV_DEBUG=n +CONFIG_RTE_EVENT_MAX_DEVS=16 +CONFIG_RTE_EVENT_MAX_QUEUES_PER_DEV=64 +# Compile PMD for skeleton event device +CONFIG_RTE_LIBRTE_PMD_SKELETON_EVENTDEV=n +CONFIG_RTE_LIBRTE_PMD_SKELETON_EVENTDEV_DEBUG=n +# Compile PMD for software event device +CONFIG_RTE_LIBRTE_PMD_SW_EVENTDEV=n +CONFIG_RTE_LIBRTE_PMD_SW_EVENTDEV_DEBUG=n +# Compile PMD for octeontx sso event device +CONFIG_RTE_LIBRTE_PMD_OCTEONTX_SSOVF=n +CONFIG_RTE_LIBRTE_PMD_OCTEONTX_SSOVF_DEBUG=n +# Compile librte_ring +CONFIG_RTE_LIBRTE_RING=y +# Compile librte_mempool +CONFIG_RTE_LIBRTE_MEMPOOL=y +CONFIG_RTE_MEMPOOL_CACHE_MAX_SIZE=512 +CONFIG_RTE_LIBRTE_MEMPOOL_DEBUG=n +# Compile Mempool drivers +CONFIG_RTE_DRIVER_MEMPOOL_RING=y +CONFIG_RTE_DRIVER_MEMPOOL_STACK=y +# Compile PMD for octeontx fpa mempool device +CONFIG_RTE_LIBRTE_OCTEONTX_MEMPOOL=y +CONFIG_RTE_LIBRTE_OCTEONTX_MEMPOOL_DEBUG=n +# Compile librte_mbuf +CONFIG_RTE_LIBRTE_MBUF=y +CONFIG_RTE_LIBRTE_MBUF_DEBUG=n +CONFIG_RTE_MBUF_DEFAULT_MEMPOOL_OPS="ring_mp_mc" +CONFIG_RTE_MBUF_REFCNT_ATOMIC=y +CONFIG_RTE_PKTMBUF_HEADROOM=128 +# Compile librte_timer +CONFIG_RTE_LIBRTE_TIMER=n +CONFIG_RTE_LIBRTE_TIMER_DEBUG=n +# Compile librte_cfgfile +CONFIG_RTE_LIBRTE_CFGFILE=n +# Compile librte_cmdline +CONFIG_RTE_LIBRTE_CMDLINE=y +CONFIG_RTE_LIBRTE_CMDLINE_DEBUG=n +# Compile librte_hash +CONFIG_RTE_LIBRTE_HASH=y +CONFIG_RTE_LIBRTE_HASH_DEBUG=n +# Compile librte_efd +CONFIG_RTE_LIBRTE_EFD=y +# Compile librte_member +CONFIG_RTE_LIBRTE_MEMBER=y +# Compile librte_jobstats +CONFIG_RTE_LIBRTE_JOBSTATS=n +# Compile architecture we compile for. device metrics library +CONFIG_RTE_LIBRTE_METRICS=y +# Compile architecture we compile for. bitrate statistics library +CONFIG_RTE_LIBRTE_BITRATE=y +# Compile architecture we compile for. latency statistics library +CONFIG_RTE_LIBRTE_LATENCY_STATS=y +# Compile librte_lpm +CONFIG_RTE_LIBRTE_LPM=n +CONFIG_RTE_LIBRTE_LPM_DEBUG=n +# Compile librte_acl +CONFIG_RTE_LIBRTE_ACL=n +CONFIG_RTE_LIBRTE_ACL_DEBUG=n +# Compile librte_power +CONFIG_RTE_LIBRTE_POWER=n +CONFIG_RTE_LIBRTE_POWER_DEBUG=n +CONFIG_RTE_MAX_LCORE_FREQS=64 +# Compile librte_net +CONFIG_RTE_LIBRTE_NET=y +# Compile librte_ip_frag +CONFIG_RTE_LIBRTE_IP_FRAG=y +CONFIG_RTE_LIBRTE_IP_FRAG_DEBUG=n +CONFIG_RTE_LIBRTE_IP_FRAG_MAX_FRAG=4 +CONFIG_RTE_LIBRTE_IP_FRAG_TBL_STAT=n +# Compile GRO library +CONFIG_RTE_LIBRTE_GRO=y +# Compile GSO library +CONFIG_RTE_LIBRTE_GSO=y +# Compile librte_meter +CONFIG_RTE_LIBRTE_METER=y +# Compile librte_classify +CONFIG_RTE_LIBRTE_FLOW_CLASSIFY=n +# Compile librte_sched +CONFIG_RTE_LIBRTE_SCHED=y +CONFIG_RTE_SCHED_DEBUG=n +CONFIG_RTE_SCHED_RED=n +CONFIG_RTE_SCHED_COLLECT_STATS=n +CONFIG_RTE_SCHED_SUBPORT_TC_OV=n +CONFIG_RTE_SCHED_PORT_N_GRINDERS=8 +CONFIG_RTE_SCHED_VECTOR=n +# Compile architecture we compile for. distributor library +CONFIG_RTE_LIBRTE_DISTRIBUTOR=n +# Compile architecture we compile for. reorder library +CONFIG_RTE_LIBRTE_REORDER=n +# Compile librte_port +CONFIG_RTE_LIBRTE_PORT=n +CONFIG_RTE_PORT_STATS_COLLECT=n +CONFIG_RTE_PORT_PCAP=n +# Compile librte_table +CONFIG_RTE_LIBRTE_TABLE=n +CONFIG_RTE_TABLE_STATS_COLLECT=n +# Compile librte_pipeline +CONFIG_RTE_LIBRTE_PIPELINE=n +CONFIG_RTE_PIPELINE_STATS_COLLECT=n +# Compile librte_kni +CONFIG_RTE_LIBRTE_KNI=n +CONFIG_RTE_LIBRTE_PMD_KNI=n +CONFIG_RTE_KNI_KMOD=n +CONFIG_RTE_KNI_KMOD_ETHTOOL=n +CONFIG_RTE_KNI_PREEMPT_DEFAULT=y +# Compile architecture we compile for. pdump library +CONFIG_RTE_LIBRTE_PDUMP=y +# Compile vhost user library +CONFIG_RTE_LIBRTE_VHOST=y +CONFIG_RTE_LIBRTE_VHOST_NUMA=y +CONFIG_RTE_LIBRTE_VHOST_DEBUG=n +# Compile vhost PMD +# To compile, CONFIG_RTE_LIBRTE_VHOST should be enabled. +CONFIG_RTE_LIBRTE_PMD_VHOST=n +# Compile architecture we compile for. test application +CONFIG_RTE_APP_TEST=y +CONFIG_RTE_APP_TEST_RESOURCE_TAR=n +# Compile architecture we compile for. PMD test application +CONFIG_RTE_TEST_PMD=n +CONFIG_RTE_TEST_PMD_RECORD_CORE_CYCLES=n +CONFIG_RTE_TEST_PMD_RECORD_BURST_STATS=n +# Compile architecture we compile for. crypto performance application +CONFIG_RTE_APP_CRYPTO_PERF=y +# Compile architecture we compile for. eventdev application +CONFIG_RTE_APP_EVENTDEV=y +CONFIG_RTE_EXEC_ENV_LINUXAPP=y +CONFIG_RTE_ARCH_ARM64=y +CONFIG_RTE_ARCH_64=y +# Maximum available cache line size in arm64 implementations. +# Setting to maximum available cache line size in generic config +# to address minimum DMA alignment across all arm64 implementations. +CONFIG_RTE_TOOLCHAIN_GCC=y +CONFIG_RTE_LIBRTE_PMD_XENVIRT=n diff --git a/SOURCES/configlib.sh b/SOURCES/configlib.sh new file mode 100644 index 0000000..a1049b3 --- /dev/null +++ b/SOURCES/configlib.sh @@ -0,0 +1,105 @@ +# Copyright (C) 2017, Red Hat, Inc. +# +# Core configuration file library. + +# Configurations are determined by sha values. The way to determine is by +# the special text: +# $FILE_COMMENT_TYPE -*- cfg-sha: $SHA256 -*- + +export LC_ALL=C + +# check required binaries +__check_reqd_binaries() { + local BIN __binaries=("egrep" "sort" "sha256sum" "sed") + for BIN in $__binaries; do + if ! type -P $BIN >/dev/null 2>&1; then + echo "Binary $BIN not found. Please install." + exit 1 + fi + done +} + +# Calculates a sha from a file +# The algorithm for generating a sha from a config is thus: +# +# 1. Remove all comment lines and blank lines +# 2. Sort the content +# 3. generate the sha-256 sum +# +# From a script perspective, this means: +# egrep -v ^\# %file% | egrep -v ^$ | sort -u | sha256sum +# +# Params: +# $1 = output variable +# $2 = file to use to calculate the shasum +# $3 = file comment type (defaults to # if unspecified) +calc_sha() { + __check_reqd_binaries + + if [ "$1" == "" ]; then + echo "Please pass in a storage variable." + return 1 + fi + + local __resultvar=$1 + __retval=1 + shift + + local __file=$1 + local cmnt=${2:-#} + + if [ -f "$__file" ]; then + local __shasum=$(egrep -v ^"$cmnt" "$__file" | egrep -v ^$ | sort -u | sha256sum -t | cut -d" " -f1) + eval $__resultvar="'$__shasum'" + __retval=0 + fi + return $__retval +} + +# Retrieves a sha stored in a file +# Param: +# $1 = output variable +# $2 = file to use to calculate the shasum +# $3 = file comment type (defaults to # if unspecified) +retr_sha() { + __check_reqd_binaries + + if [ "$1" == "" ]; then + echo "Please pass in a storage variable." + return 1 + fi + + local __resultvar=$1 + __retval=1 + shift + + local __file=$1 + local cmnt=${2:-#} + + if [ -f "$__file" ]; then + if grep -q "$cmnt -\*- cfg-sha:" "$__file"; then + local __shasum=$(grep "$cmnt -\*- cfg-sha:" "$__file" | sed -e "s@$cmnt -\*- cfg-sha: @@" | cut -d" " -f1) + eval $__resultvar="'$__shasum'" + __retval=0 + fi + fi + return $__retval +} + + +# Set a config value +# set_conf dpdk_build_tree parameter value +# dpdk_build_tree is the directory where the .config lives +# parameter is the config parameter +# value is the value to set for the config parameter +set_conf() { + c="$1/.config" + shift + + if grep -q "$1" "$c"; then + sed -i "s:^$1=.*$:$1=$2:g" $c + else + echo $1=$2 >> "$c" + fi +} + diff --git a/SOURCES/gen_config_group.sh b/SOURCES/gen_config_group.sh new file mode 100755 index 0000000..223f600 --- /dev/null +++ b/SOURCES/gen_config_group.sh @@ -0,0 +1,151 @@ +#!/bin/bash + +source configlib.sh + +# Generates arch configurations in the current directory based on +# 1. an openvswitch.spec file +# 2. an expanded dpdk tree + +if (( $# != 2 )); then + echo "$0: openvswitch.spec dpdk_tree" >&2 + exit 1 +fi + +OVSSPEC="$1" +DPDKDIR="$2" + +# accumulate all arch + name triples +OVS_DPDK_CONF_MACH_ARCH=() +for arch in $(grep %define\ dpdk_mach_arch "$OVSSPEC" | sed 's@%define dpdk_mach_arch @@') +do + OVS_DPDK_CONF_MACH_ARCH+=($arch) +done + +OVS_DPDK_CONF_MACH_TMPL=() +for tmpl in $(grep %define\ dpdk_mach_tmpl "$OVSSPEC" | sed 's@%define dpdk_mach_tmpl @@') +do + OVS_DPDK_CONF_MACH_TMPL+=($tmpl) +done + +OVS_DPDK_CONF_MACH=() +for mach in $(grep %define\ dpdk_mach\ "$OVSSPEC" | sed 's@%define dpdk_mach @@') +do + OVS_DPDK_CONF_MACH+=($mach) +done + +OVS_DPDK_TARGETS=() +for ((i=0; i < ${#OVS_DPDK_CONF_MACH[@]}; i++)); +do + OVS_DPDK_TARGETS+=("${OVS_DPDK_CONF_MACH_ARCH[$i]}-${OVS_DPDK_CONF_MACH_TMPL[$i]}-linuxapp-gcc") + echo "DPDK-target: ${OVS_DPDK_TARGETS[$i]}" +done + +OUTPUT_DIR=$(pwd) +pushd "$DPDKDIR" +for ((i=0; i < ${#OVS_DPDK_TARGETS[@]}; i++)); +do + echo "For ${OVS_DPDK_TARGETS[$i]}:" + + echo " a. Generating initial config" + echo " make V=1 T=${OVS_DPDK_TARGETS[$i]} O=${OVS_DPDK_TARGETS[$i]}" + make V=1 T=${OVS_DPDK_TARGETS[$i]} O=${OVS_DPDK_TARGETS[$i]} -j8 config + ORIG_SHA="" + OUTDIR="${OVS_DPDK_TARGETS[$i]}" + + echo " b. calculating and applying sha" + calc_sha ORIG_SHA "${OUTDIR}/.config" + if [ "$ORIG_SHA" == "" ]; then + echo "ERROR: Unable to get sha for arch ${OVS_DPDK_TARGETS[$i]}" + exit 1 + fi + echo "# -*- cfg-sha: ${ORIG_SHA}" > ${OUTDIR}/.config.new + cat "${OUTDIR}/.config" >> "${OUTDIR}/.config.new" + cp "${OUTDIR}/.config" "${OUTDIR}/.config.orig" + mv -f "${OUTDIR}/.config.new" "${OUTDIR}/.config" + + echo " c. setting initial configurations" + # these are the original setconf values from openvswitch.spec + set_conf "${OUTDIR}" CONFIG_RTE_MACHINE "\\\"${OVS_DPDK_CONF_MACH[$i]}\\\"" + + # Disable DPDK libraries not needed by OVS + set_conf "${OUTDIR}" CONFIG_RTE_LIBRTE_TIMER n + set_conf "${OUTDIR}" CONFIG_RTE_LIBRTE_CFGFILE n + set_conf "${OUTDIR}" CONFIG_RTE_LIBRTE_JOBSTATS n + set_conf "${OUTDIR}" CONFIG_RTE_LIBRTE_LPM n + set_conf "${OUTDIR}" CONFIG_RTE_LIBRTE_ACL n + set_conf "${OUTDIR}" CONFIG_RTE_LIBRTE_POWER n + set_conf "${OUTDIR}" CONFIG_RTE_LIBRTE_DISTRIBUTOR n + set_conf "${OUTDIR}" CONFIG_RTE_LIBRTE_REORDER n + set_conf "${OUTDIR}" CONFIG_RTE_LIBRTE_PORT n + set_conf "${OUTDIR}" CONFIG_RTE_LIBRTE_TABLE n + set_conf "${OUTDIR}" CONFIG_RTE_LIBRTE_PIPELINE n + set_conf "${OUTDIR}" CONFIG_RTE_LIBRTE_KNI n + set_conf "${OUTDIR}" CONFIG_RTE_LIBRTE_CRYPTODEV n + set_conf "${OUTDIR}" CONFIG_RTE_LIBRTE_SECURITY n + set_conf "${OUTDIR}" CONFIG_RTE_LIBRTE_FLOW_CLASSIFY n + + # Disable virtio user as not used by OVS + set_conf "${OUTDIR}" CONFIG_RTE_VIRTIO_USER n + + # Enable DPDK libraries needed by OVS + set_conf "${OUTDIR}" CONFIG_RTE_LIBRTE_VHOST_NUMA y + + # start by disabling ALL PMDs + for pmd in $(grep _PMD= "${OUTDIR}/.config" | sed 's@=\(y\|n\)@@g') + do + set_conf "${OUTDIR}" $pmd n + done + + # PMDs which have their own naming scheme + # the default for this was 'n' at one point. Make sure we keep it + # as such + set_conf "${OUTDIR}" CONFIG_RTE_LIBRTE_PMD_QAT n + set_conf "${OUTDIR}" CONFIG_RTE_LIBRTE_PMD_OCTEONTX_SSOVF n + set_conf "${OUTDIR}" CONFIG_RTE_LIBRTE_PMD_VHOST n + set_conf "${OUTDIR}" CONFIG_RTE_LIBRTE_PMD_KNI n + set_conf "${OUTDIR}" CONFIG_RTE_LIBRTE_PMD_XENVIRT n + set_conf "${OUTDIR}" CONFIG_RTE_LIBRTE_PMD_NULL_CRYPTO n + set_conf "${OUTDIR}" CONFIG_RTE_LIBRTE_PMD_NULL n + set_conf "${OUTDIR}" CONFIG_RTE_LIBRTE_PMD_TAP n + set_conf "${OUTDIR}" CONFIG_RTE_LIBRTE_PMD_CRYPTO_SCHEDULER n + set_conf "${OUTDIR}" CONFIG_RTE_LIBRTE_PMD_SKELETON_EVENTDEV n + set_conf "${OUTDIR}" CONFIG_RTE_LIBRTE_PMD_SW_EVENTDEV n + set_conf "${OUTDIR}" CONFIG_RTE_LIBRTE_PMD_PCAP n + set_conf "${OUTDIR}" CONFIG_RTE_LIBRTE_PMD_BOND n + set_conf "${OUTDIR}" CONFIG_RTE_LIBRTE_PMD_AF_PACKET n + + # whitelist of enabled PMDs + # Soft PMDs to enable + set_conf "${OUTDIR}" CONFIG_RTE_LIBRTE_PMD_RING y + set_conf "${OUTDIR}" CONFIG_RTE_LIBRTE_VIRTIO_PMD y + + # HW PMDs + set_conf "${OUTDIR}" CONFIG_RTE_LIBRTE_I40E_PMD y + case "${OVS_DPDK_CONF_MACH_ARCH[i]}" in + x86_64) + set_conf "${OUTDIR}" CONFIG_RTE_LIBRTE_ENIC_PMD y + ;& + arm64) + set_conf "${OUTDIR}" CONFIG_RTE_LIBRTE_IXGBE_PMD y + set_conf "${OUTDIR}" CONFIG_RTE_LIBRTE_IGB_PMD y + ;; + esac + + # Disable kernel modules + set_conf "${OUTDIR}" CONFIG_RTE_EAL_IGB_UIO n + set_conf "${OUTDIR}" CONFIG_RTE_KNI_KMOD n + + # Disable experimental stuff + set_conf "${OUTDIR}" CONFIG_RTE_NEXT_ABI n + + cp "${OUTDIR}/.config" "${OUTPUT_DIR}/${OVS_DPDK_TARGETS[$i]}-config" +done +popd >/dev/null + +echo -n "For each arch ( " +for ((i=0; i < ${#OVS_DPDK_CONF_MACH_ARCH[@]}; i++)); +do + echo -n "${OVS_DPDK_CONF_MACH_ARCH[i]} " +done +echo "):" +echo "1. ensure you enable the requisite hw" diff --git a/SOURCES/ppc_64-power8-linuxapp-gcc-config b/SOURCES/ppc_64-power8-linuxapp-gcc-config new file mode 100644 index 0000000..6f323c4 --- /dev/null +++ b/SOURCES/ppc_64-power8-linuxapp-gcc-config @@ -0,0 +1,534 @@ +# -*- cfg-sha: 4d1578565c23e449d8e5c1c18e88181f05769b5132b7f22dcbed6bce900e9d0c +# BSD LICENSE +# Copyright (C) IBM Corporation 2014. +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of IBM Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# BSD LICENSE +# Copyright(c) 2010-2016 Intel Corporation. All rights reserved. +# All rights reserved. +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# BSD LICENSE +# Copyright(c) 2010-2017 Intel Corporation. All rights reserved. +# All rights reserved. +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# RTE_EXEC_ENV values are the directories in mk/exec-env/ +CONFIG_RTE_EXEC_ENV="linuxapp" +# RTE_ARCH values are architecture we compile for. directories in mk/arch/ +CONFIG_RTE_ARCH="ppc_64" +# machine can define specific variables or action for a specific board +# RTE_MACHINE values are architecture we compile for. directories in mk/machine/ +CONFIG_RTE_MACHINE="power8" +# The compiler we use. +# RTE_TOOLCHAIN values are architecture we compile for. directories in mk/toolchain/ +CONFIG_RTE_TOOLCHAIN="gcc" +# Use intrinsics or assembly code for key routines +CONFIG_RTE_FORCE_INTRINSICS=n +# Machine forces strict alignment constraints. +CONFIG_RTE_ARCH_STRICT_ALIGN=n +# Compile to share library +CONFIG_RTE_BUILD_SHARED_LIB=n +# Use newest code breaking previous ABI +CONFIG_RTE_NEXT_ABI=n +# Major ABI to overwrite library specific LIBABIVER +CONFIG_RTE_MAJOR_ABI= +# Machine's cache line size +CONFIG_RTE_CACHE_LINE_SIZE=128 +# Compile Environment Abstraction Layer +CONFIG_RTE_LIBRTE_EAL=y +CONFIG_RTE_MAX_LCORE=256 +CONFIG_RTE_MAX_NUMA_NODES=32 +CONFIG_RTE_MAX_MEMSEG=256 +CONFIG_RTE_MAX_MEMZONE=2560 +CONFIG_RTE_MAX_TAILQ=32 +CONFIG_RTE_ENABLE_ASSERT=n +CONFIG_RTE_LOG_LEVEL=RTE_LOG_INFO +CONFIG_RTE_LOG_DP_LEVEL=RTE_LOG_INFO +CONFIG_RTE_LOG_HISTORY=256 +CONFIG_RTE_BACKTRACE=y +CONFIG_RTE_LIBEAL_USE_HPET=n +CONFIG_RTE_EAL_ALLOW_INV_SOCKET_ID=n +CONFIG_RTE_EAL_ALWAYS_PANIC_ON_ERROR=n +CONFIG_RTE_EAL_IGB_UIO=n +CONFIG_RTE_EAL_VFIO=y +CONFIG_RTE_MALLOC_DEBUG=n +CONFIG_RTE_EAL_NUMA_AWARE_HUGEPAGES=y +# Recognize/ignore architecture we compile for. AVX/AVX512 CPU flags for performance/power testing. +# AVX512 is marked as experimental for now, will enable it after enough +# field test and possible optimization. +CONFIG_RTE_ENABLE_AVX=y +CONFIG_RTE_ENABLE_AVX512=n +# Default driver path (or "" to disable) +CONFIG_RTE_EAL_PMD_PATH="" +# Compile Environment Abstraction Layer to support Vmware TSC map +CONFIG_RTE_LIBRTE_EAL_VMWARE_TSC_MAP_SUPPORT=n +# Compile architecture we compile for. PCI library +CONFIG_RTE_LIBRTE_PCI=y +# Compile architecture we compile for. argument parser library +CONFIG_RTE_LIBRTE_KVARGS=y +# Compile generic ethernet library +CONFIG_RTE_LIBRTE_ETHER=y +CONFIG_RTE_LIBRTE_ETHDEV_DEBUG=n +CONFIG_RTE_MAX_ETHPORTS=32 +CONFIG_RTE_MAX_QUEUES_PER_PORT=1024 +CONFIG_RTE_LIBRTE_IEEE1588=n +CONFIG_RTE_ETHDEV_QUEUE_STAT_CNTRS=16 +CONFIG_RTE_ETHDEV_RXTX_CALLBACKS=y +CONFIG_RTE_ETHDEV_PROFILE_ITT_WASTED_RX_ITERATIONS=n +# Turn off Tx preparation stage +# Warning: rte_eth_tx_prepare() can be safely disabled only if using a +# driver which do not implement any Tx preparation. +CONFIG_RTE_ETHDEV_TX_PREPARE_NOOP=n +# Compile PCI bus driver +CONFIG_RTE_LIBRTE_PCI_BUS=y +# Compile architecture we compile for. vdev bus +CONFIG_RTE_LIBRTE_VDEV_BUS=y +# Compile burst-oriented Amazon ENA PMD driver +CONFIG_RTE_LIBRTE_ENA_PMD=n +CONFIG_RTE_LIBRTE_ENA_DEBUG_RX=n +CONFIG_RTE_LIBRTE_ENA_DEBUG_TX=n +CONFIG_RTE_LIBRTE_ENA_DEBUG_TX_FREE=n +CONFIG_RTE_LIBRTE_ENA_DEBUG_DRIVER=n +CONFIG_RTE_LIBRTE_ENA_COM_DEBUG=n +# Compile burst-oriented IGB & EM PMD drivers +CONFIG_RTE_LIBRTE_EM_PMD=n +CONFIG_RTE_LIBRTE_IGB_PMD=n +CONFIG_RTE_LIBRTE_E1000_DEBUG_INIT=n +CONFIG_RTE_LIBRTE_E1000_DEBUG_RX=n +CONFIG_RTE_LIBRTE_E1000_DEBUG_TX=n +CONFIG_RTE_LIBRTE_E1000_DEBUG_TX_FREE=n +CONFIG_RTE_LIBRTE_E1000_DEBUG_DRIVER=n +CONFIG_RTE_LIBRTE_E1000_PF_DISABLE_STRIP_CRC=n +# Compile burst-oriented IXGBE PMD driver +CONFIG_RTE_LIBRTE_IXGBE_PMD=n +CONFIG_RTE_LIBRTE_IXGBE_DEBUG_INIT=n +CONFIG_RTE_LIBRTE_IXGBE_DEBUG_RX=n +CONFIG_RTE_LIBRTE_IXGBE_DEBUG_TX=n +CONFIG_RTE_LIBRTE_IXGBE_DEBUG_TX_FREE=n +CONFIG_RTE_LIBRTE_IXGBE_DEBUG_DRIVER=n +CONFIG_RTE_LIBRTE_IXGBE_PF_DISABLE_STRIP_CRC=n +CONFIG_RTE_IXGBE_INC_VECTOR=y +CONFIG_RTE_LIBRTE_IXGBE_BYPASS=n +# Compile burst-oriented I40E PMD driver +CONFIG_RTE_LIBRTE_I40E_PMD=y +CONFIG_RTE_LIBRTE_I40E_DEBUG_RX=n +CONFIG_RTE_LIBRTE_I40E_DEBUG_TX=n +CONFIG_RTE_LIBRTE_I40E_DEBUG_TX_FREE=n +CONFIG_RTE_LIBRTE_I40E_RX_ALLOW_BULK_ALLOC=y +CONFIG_RTE_LIBRTE_I40E_INC_VECTOR=y +CONFIG_RTE_LIBRTE_I40E_16BYTE_RX_DESC=n +CONFIG_RTE_LIBRTE_I40E_QUEUE_NUM_PER_PF=64 +CONFIG_RTE_LIBRTE_I40E_QUEUE_NUM_PER_VF=4 +CONFIG_RTE_LIBRTE_I40E_QUEUE_NUM_PER_VM=4 +# interval up to 8160 us, aligned to 2 (or default value) +CONFIG_RTE_LIBRTE_I40E_ITR_INTERVAL=-1 +# Compile burst-oriented FM10K PMD +CONFIG_RTE_LIBRTE_FM10K_PMD=n +CONFIG_RTE_LIBRTE_FM10K_DEBUG_INIT=n +CONFIG_RTE_LIBRTE_FM10K_DEBUG_RX=n +CONFIG_RTE_LIBRTE_FM10K_DEBUG_TX=n +CONFIG_RTE_LIBRTE_FM10K_DEBUG_TX_FREE=n +CONFIG_RTE_LIBRTE_FM10K_DEBUG_DRIVER=n +CONFIG_RTE_LIBRTE_FM10K_RX_OLFLAGS_ENABLE=y +CONFIG_RTE_LIBRTE_FM10K_INC_VECTOR=y +# Compile burst-oriented Mellanox ConnectX-3 (MLX4) PMD +CONFIG_RTE_LIBRTE_MLX4_PMD=n +CONFIG_RTE_LIBRTE_MLX4_DEBUG=n +CONFIG_RTE_LIBRTE_MLX4_DEBUG_BROKEN_VERBS=n +CONFIG_RTE_LIBRTE_MLX4_TX_MP_CACHE=8 +# Compile burst-oriented Mellanox ConnectX-4 & ConnectX-5 (MLX5) PMD +CONFIG_RTE_LIBRTE_MLX5_PMD=n +CONFIG_RTE_LIBRTE_MLX5_DEBUG=n +CONFIG_RTE_LIBRTE_MLX5_TX_MP_CACHE=8 +# Compile burst-oriented Broadcom PMD driver +CONFIG_RTE_LIBRTE_BNX2X_PMD=n +CONFIG_RTE_LIBRTE_BNX2X_DEBUG=n +CONFIG_RTE_LIBRTE_BNX2X_DEBUG_INIT=n +CONFIG_RTE_LIBRTE_BNX2X_DEBUG_RX=n +CONFIG_RTE_LIBRTE_BNX2X_DEBUG_TX=n +CONFIG_RTE_LIBRTE_BNX2X_MF_SUPPORT=n +CONFIG_RTE_LIBRTE_BNX2X_DEBUG_PERIODIC=n +# Compile burst-oriented Chelsio Terminator (CXGBE) PMD +CONFIG_RTE_LIBRTE_CXGBE_PMD=n +CONFIG_RTE_LIBRTE_CXGBE_DEBUG=n +CONFIG_RTE_LIBRTE_CXGBE_DEBUG_REG=n +CONFIG_RTE_LIBRTE_CXGBE_DEBUG_MBOX=n +CONFIG_RTE_LIBRTE_CXGBE_DEBUG_TX=n +CONFIG_RTE_LIBRTE_CXGBE_DEBUG_RX=n +CONFIG_RTE_LIBRTE_CXGBE_TPUT=y +# Compile burst-oriented Cisco ENIC PMD driver +CONFIG_RTE_LIBRTE_ENIC_PMD=n +CONFIG_RTE_LIBRTE_ENIC_DEBUG=n +CONFIG_RTE_LIBRTE_ENIC_DEBUG_FLOW=n +# Compile burst-oriented Netronome NFP PMD driver +CONFIG_RTE_LIBRTE_NFP_PMD=n +CONFIG_RTE_LIBRTE_NFP_DEBUG=n +# Compile Marvell PMD driver +CONFIG_RTE_LIBRTE_MRVL_PMD=n +# Compile burst-oriented Broadcom BNXT PMD driver +CONFIG_RTE_LIBRTE_BNXT_PMD=n +# Compile burst-oriented Solarflare libefx-based PMD +CONFIG_RTE_LIBRTE_SFC_EFX_PMD=n +CONFIG_RTE_LIBRTE_SFC_EFX_DEBUG=n +# Compile SOFTNIC PMD +CONFIG_RTE_LIBRTE_PMD_SOFTNIC=y +# Compile software PMD backed by SZEDATA2 device +CONFIG_RTE_LIBRTE_PMD_SZEDATA2=n +# Defines firmware type address space. +# See documentation for supported values. +# Other values raise compile time error. +CONFIG_RTE_LIBRTE_PMD_SZEDATA2_AS=0 +# Compile burst-oriented Cavium Thunderx NICVF PMD driver +CONFIG_RTE_LIBRTE_THUNDERX_NICVF_PMD=n +CONFIG_RTE_LIBRTE_THUNDERX_NICVF_DEBUG_INIT=n +CONFIG_RTE_LIBRTE_THUNDERX_NICVF_DEBUG_RX=n +CONFIG_RTE_LIBRTE_THUNDERX_NICVF_DEBUG_TX=n +CONFIG_RTE_LIBRTE_THUNDERX_NICVF_DEBUG_DRIVER=n +CONFIG_RTE_LIBRTE_THUNDERX_NICVF_DEBUG_MBOX=n +# Compile burst-oriented Cavium LiquidIO PMD driver +CONFIG_RTE_LIBRTE_LIO_PMD=n +CONFIG_RTE_LIBRTE_LIO_DEBUG_DRIVER=n +CONFIG_RTE_LIBRTE_LIO_DEBUG_INIT=n +CONFIG_RTE_LIBRTE_LIO_DEBUG_RX=n +CONFIG_RTE_LIBRTE_LIO_DEBUG_TX=n +CONFIG_RTE_LIBRTE_LIO_DEBUG_MBOX=n +CONFIG_RTE_LIBRTE_LIO_DEBUG_REGS=n +# NXP DPAA Bus +CONFIG_RTE_LIBRTE_DPAA_BUS=n +CONFIG_RTE_LIBRTE_DPAA_MEMPOOL=n +CONFIG_RTE_LIBRTE_DPAA_PMD=n +# Compile burst-oriented Cavium OCTEONTX network PMD driver +CONFIG_RTE_LIBRTE_OCTEONTX_PMD=n +CONFIG_RTE_LIBRTE_OCTEONTX_DEBUG_INIT=n +CONFIG_RTE_LIBRTE_OCTEONTX_DEBUG_RX=n +CONFIG_RTE_LIBRTE_OCTEONTX_DEBUG_TX=n +CONFIG_RTE_LIBRTE_OCTEONTX_DEBUG_DRIVER=n +CONFIG_RTE_LIBRTE_OCTEONTX_DEBUG_MBOX=n +# Compile NXP DPAA2 FSL-MC Bus +CONFIG_RTE_LIBRTE_FSLMC_BUS=n +# Compile Support Libraries for NXP DPAA2 +CONFIG_RTE_LIBRTE_DPAA2_MEMPOOL=n +CONFIG_RTE_LIBRTE_DPAA2_USE_PHYS_IOVA=y +# Compile burst-oriented NXP DPAA2 PMD driver +CONFIG_RTE_LIBRTE_DPAA2_PMD=n +CONFIG_RTE_LIBRTE_DPAA2_DEBUG_INIT=n +CONFIG_RTE_LIBRTE_DPAA2_DEBUG_DRIVER=n +CONFIG_RTE_LIBRTE_DPAA2_DEBUG_RX=n +CONFIG_RTE_LIBRTE_DPAA2_DEBUG_TX=n +CONFIG_RTE_LIBRTE_DPAA2_DEBUG_TX_FREE=n +# Compile burst-oriented VIRTIO PMD driver +CONFIG_RTE_LIBRTE_VIRTIO_PMD=y +CONFIG_RTE_LIBRTE_VIRTIO_DEBUG_INIT=n +CONFIG_RTE_LIBRTE_VIRTIO_DEBUG_RX=n +CONFIG_RTE_LIBRTE_VIRTIO_DEBUG_TX=n +CONFIG_RTE_LIBRTE_VIRTIO_DEBUG_DRIVER=n +CONFIG_RTE_LIBRTE_VIRTIO_DEBUG_DUMP=n +# Compile virtio device emulation inside virtio PMD driver +CONFIG_RTE_VIRTIO_USER=n +# Compile burst-oriented VMXNET3 PMD driver +CONFIG_RTE_LIBRTE_VMXNET3_PMD=n +CONFIG_RTE_LIBRTE_VMXNET3_DEBUG_INIT=n +CONFIG_RTE_LIBRTE_VMXNET3_DEBUG_RX=n +CONFIG_RTE_LIBRTE_VMXNET3_DEBUG_TX=n +CONFIG_RTE_LIBRTE_VMXNET3_DEBUG_TX_FREE=n +CONFIG_RTE_LIBRTE_VMXNET3_DEBUG_DRIVER=n +# Compile example software rings based PMD +CONFIG_RTE_LIBRTE_PMD_RING=y +CONFIG_RTE_PMD_RING_MAX_RX_RINGS=16 +CONFIG_RTE_PMD_RING_MAX_TX_RINGS=16 +# Compile software PMD backed by PCAP files +CONFIG_RTE_LIBRTE_PMD_PCAP=n +# Compile link bonding PMD library +CONFIG_RTE_LIBRTE_PMD_BOND=n +CONFIG_RTE_LIBRTE_BOND_DEBUG_ALB=n +CONFIG_RTE_LIBRTE_BOND_DEBUG_ALB_L1=n +# QLogic 10G/25G/40G/50G/100G PMD +CONFIG_RTE_LIBRTE_QEDE_PMD=n +CONFIG_RTE_LIBRTE_QEDE_DEBUG_INIT=n +CONFIG_RTE_LIBRTE_QEDE_DEBUG_INFO=n +CONFIG_RTE_LIBRTE_QEDE_DEBUG_DRIVER=n +CONFIG_RTE_LIBRTE_QEDE_DEBUG_TX=n +CONFIG_RTE_LIBRTE_QEDE_DEBUG_RX=n +CONFIG_RTE_LIBRTE_QEDE_VF_TX_SWITCH=y +#Provides abs path/name of architecture we compile for. firmware file. +#Empty string denotes driver will use default firmware +CONFIG_RTE_LIBRTE_QEDE_FW="" +# Compile software PMD backed by AF_PACKET sockets (Linux only) +CONFIG_RTE_LIBRTE_PMD_AF_PACKET=n +# Compile ARK PMD +CONFIG_RTE_LIBRTE_ARK_PMD=n +CONFIG_RTE_LIBRTE_ARK_PAD_TX=y +CONFIG_RTE_LIBRTE_ARK_DEBUG_RX=n +CONFIG_RTE_LIBRTE_ARK_DEBUG_TX=n +CONFIG_RTE_LIBRTE_ARK_DEBUG_STATS=n +CONFIG_RTE_LIBRTE_ARK_DEBUG_TRACE=n +# Compile WRS accelerated virtual port (AVP) guest PMD driver +CONFIG_RTE_LIBRTE_AVP_PMD=n +CONFIG_RTE_LIBRTE_AVP_DEBUG_RX=n +CONFIG_RTE_LIBRTE_AVP_DEBUG_TX=n +CONFIG_RTE_LIBRTE_AVP_DEBUG_DRIVER=y +CONFIG_RTE_LIBRTE_AVP_DEBUG_BUFFERS=n +# Compile architecture we compile for. TAP PMD +# It is enabled by default for Linux only. +CONFIG_RTE_LIBRTE_PMD_TAP=n +# Compile null PMD +CONFIG_RTE_LIBRTE_PMD_NULL=n +# Compile fail-safe PMD +CONFIG_RTE_LIBRTE_PMD_FAILSAFE=y +# Do prefetch of packet data within PMD driver receive function +CONFIG_RTE_PMD_PACKET_PREFETCH=y +# Compile generic crypto device library +CONFIG_RTE_LIBRTE_CRYPTODEV=n +CONFIG_RTE_LIBRTE_CRYPTODEV_DEBUG=n +CONFIG_RTE_CRYPTO_MAX_DEVS=64 +CONFIG_RTE_CRYPTODEV_NAME_LEN=64 +# Compile PMD for ARMv8 Crypto device +CONFIG_RTE_LIBRTE_PMD_ARMV8_CRYPTO=n +CONFIG_RTE_LIBRTE_PMD_ARMV8_CRYPTO_DEBUG=n +# Compile NXP DPAA2 crypto sec driver for CAAM HW +CONFIG_RTE_LIBRTE_PMD_DPAA2_SEC=n +CONFIG_RTE_LIBRTE_DPAA2_SEC_DEBUG_INIT=n +CONFIG_RTE_LIBRTE_DPAA2_SEC_DEBUG_DRIVER=n +CONFIG_RTE_LIBRTE_DPAA2_SEC_DEBUG_RX=n +# NXP DPAA caam - crypto driver +CONFIG_RTE_LIBRTE_PMD_DPAA_SEC=n +CONFIG_RTE_LIBRTE_DPAA_SEC_DEBUG_INIT=n +CONFIG_RTE_LIBRTE_DPAA_SEC_DEBUG_DRIVER=n +CONFIG_RTE_LIBRTE_DPAA_SEC_DEBUG_RX=n +# Compile PMD for QuickAssist based devices +CONFIG_RTE_LIBRTE_PMD_QAT=n +CONFIG_RTE_LIBRTE_PMD_QAT_DEBUG_INIT=n +CONFIG_RTE_LIBRTE_PMD_QAT_DEBUG_TX=n +CONFIG_RTE_LIBRTE_PMD_QAT_DEBUG_RX=n +CONFIG_RTE_LIBRTE_PMD_QAT_DEBUG_DRIVER=n +# Number of sessions to create in architecture we compile for. session memory pool +# on a single QuickAssist device. +CONFIG_RTE_QAT_PMD_MAX_NB_SESSIONS=2048 +# Compile PMD for AESNI backed device +CONFIG_RTE_LIBRTE_PMD_AESNI_MB=n +CONFIG_RTE_LIBRTE_PMD_AESNI_MB_DEBUG=n +# Compile PMD for Software backed device +CONFIG_RTE_LIBRTE_PMD_OPENSSL=n +CONFIG_RTE_LIBRTE_PMD_OPENSSL_DEBUG=n +# Compile PMD for AESNI GCM device +CONFIG_RTE_LIBRTE_PMD_AESNI_GCM=n +CONFIG_RTE_LIBRTE_PMD_AESNI_GCM_DEBUG=n +# Compile PMD for SNOW 3G device +CONFIG_RTE_LIBRTE_PMD_SNOW3G=n +CONFIG_RTE_LIBRTE_PMD_SNOW3G_DEBUG=n +# Compile PMD for KASUMI device +CONFIG_RTE_LIBRTE_PMD_KASUMI=n +CONFIG_RTE_LIBRTE_PMD_KASUMI_DEBUG=n +# Compile PMD for ZUC device +CONFIG_RTE_LIBRTE_PMD_ZUC=n +CONFIG_RTE_LIBRTE_PMD_ZUC_DEBUG=n +# Compile PMD for Crypto Scheduler device +CONFIG_RTE_LIBRTE_PMD_CRYPTO_SCHEDULER=n +CONFIG_RTE_LIBRTE_PMD_CRYPTO_SCHEDULER_DEBUG=n +# Compile PMD for NULL Crypto device +CONFIG_RTE_LIBRTE_PMD_NULL_CRYPTO=n +# Compile PMD for Marvell Crypto device +CONFIG_RTE_LIBRTE_PMD_MRVL_CRYPTO=n +CONFIG_RTE_LIBRTE_PMD_MRVL_CRYPTO_DEBUG=n +# Compile generic security library +CONFIG_RTE_LIBRTE_SECURITY=n +# Compile generic event device library +CONFIG_RTE_LIBRTE_EVENTDEV=y +CONFIG_RTE_LIBRTE_EVENTDEV_DEBUG=n +CONFIG_RTE_EVENT_MAX_DEVS=16 +CONFIG_RTE_EVENT_MAX_QUEUES_PER_DEV=64 +# Compile PMD for skeleton event device +CONFIG_RTE_LIBRTE_PMD_SKELETON_EVENTDEV=n +CONFIG_RTE_LIBRTE_PMD_SKELETON_EVENTDEV_DEBUG=n +# Compile PMD for software event device +CONFIG_RTE_LIBRTE_PMD_SW_EVENTDEV=n +CONFIG_RTE_LIBRTE_PMD_SW_EVENTDEV_DEBUG=n +# Compile PMD for octeontx sso event device +CONFIG_RTE_LIBRTE_PMD_OCTEONTX_SSOVF=n +CONFIG_RTE_LIBRTE_PMD_OCTEONTX_SSOVF_DEBUG=n +# Compile librte_ring +CONFIG_RTE_LIBRTE_RING=y +# Compile librte_mempool +CONFIG_RTE_LIBRTE_MEMPOOL=y +CONFIG_RTE_MEMPOOL_CACHE_MAX_SIZE=512 +CONFIG_RTE_LIBRTE_MEMPOOL_DEBUG=n +# Compile Mempool drivers +CONFIG_RTE_DRIVER_MEMPOOL_RING=y +CONFIG_RTE_DRIVER_MEMPOOL_STACK=y +# Compile PMD for octeontx fpa mempool device +CONFIG_RTE_LIBRTE_OCTEONTX_MEMPOOL=y +CONFIG_RTE_LIBRTE_OCTEONTX_MEMPOOL_DEBUG=n +# Compile librte_mbuf +CONFIG_RTE_LIBRTE_MBUF=y +CONFIG_RTE_LIBRTE_MBUF_DEBUG=n +CONFIG_RTE_MBUF_DEFAULT_MEMPOOL_OPS="ring_mp_mc" +CONFIG_RTE_MBUF_REFCNT_ATOMIC=y +CONFIG_RTE_PKTMBUF_HEADROOM=128 +# Compile librte_timer +CONFIG_RTE_LIBRTE_TIMER=n +CONFIG_RTE_LIBRTE_TIMER_DEBUG=n +# Compile librte_cfgfile +CONFIG_RTE_LIBRTE_CFGFILE=n +# Compile librte_cmdline +CONFIG_RTE_LIBRTE_CMDLINE=y +CONFIG_RTE_LIBRTE_CMDLINE_DEBUG=n +# Compile librte_hash +CONFIG_RTE_LIBRTE_HASH=y +CONFIG_RTE_LIBRTE_HASH_DEBUG=n +# Compile librte_efd +CONFIG_RTE_LIBRTE_EFD=y +# Compile librte_member +CONFIG_RTE_LIBRTE_MEMBER=y +# Compile librte_jobstats +CONFIG_RTE_LIBRTE_JOBSTATS=n +# Compile architecture we compile for. device metrics library +CONFIG_RTE_LIBRTE_METRICS=y +# Compile architecture we compile for. bitrate statistics library +CONFIG_RTE_LIBRTE_BITRATE=y +# Compile architecture we compile for. latency statistics library +CONFIG_RTE_LIBRTE_LATENCY_STATS=y +# Compile librte_lpm +CONFIG_RTE_LIBRTE_LPM=n +CONFIG_RTE_LIBRTE_LPM_DEBUG=n +# Compile librte_acl +CONFIG_RTE_LIBRTE_ACL=n +CONFIG_RTE_LIBRTE_ACL_DEBUG=n +# Compile librte_power +CONFIG_RTE_LIBRTE_POWER=n +CONFIG_RTE_LIBRTE_POWER_DEBUG=n +CONFIG_RTE_MAX_LCORE_FREQS=64 +# Compile librte_net +CONFIG_RTE_LIBRTE_NET=y +# Compile librte_ip_frag +CONFIG_RTE_LIBRTE_IP_FRAG=y +CONFIG_RTE_LIBRTE_IP_FRAG_DEBUG=n +CONFIG_RTE_LIBRTE_IP_FRAG_MAX_FRAG=4 +CONFIG_RTE_LIBRTE_IP_FRAG_TBL_STAT=n +# Compile GRO library +CONFIG_RTE_LIBRTE_GRO=y +# Compile GSO library +CONFIG_RTE_LIBRTE_GSO=y +# Compile librte_meter +CONFIG_RTE_LIBRTE_METER=y +# Compile librte_classify +CONFIG_RTE_LIBRTE_FLOW_CLASSIFY=n +# Compile librte_sched +CONFIG_RTE_LIBRTE_SCHED=y +CONFIG_RTE_SCHED_DEBUG=n +CONFIG_RTE_SCHED_RED=n +CONFIG_RTE_SCHED_COLLECT_STATS=n +CONFIG_RTE_SCHED_SUBPORT_TC_OV=n +CONFIG_RTE_SCHED_PORT_N_GRINDERS=8 +CONFIG_RTE_SCHED_VECTOR=n +# Compile architecture we compile for. distributor library +CONFIG_RTE_LIBRTE_DISTRIBUTOR=n +# Compile architecture we compile for. reorder library +CONFIG_RTE_LIBRTE_REORDER=n +# Compile librte_port +CONFIG_RTE_LIBRTE_PORT=n +CONFIG_RTE_PORT_STATS_COLLECT=n +CONFIG_RTE_PORT_PCAP=n +# Compile librte_table +CONFIG_RTE_LIBRTE_TABLE=n +CONFIG_RTE_TABLE_STATS_COLLECT=n +# Compile librte_pipeline +CONFIG_RTE_LIBRTE_PIPELINE=n +CONFIG_RTE_PIPELINE_STATS_COLLECT=n +# Compile librte_kni +CONFIG_RTE_LIBRTE_KNI=n +CONFIG_RTE_LIBRTE_PMD_KNI=n +CONFIG_RTE_KNI_KMOD=n +CONFIG_RTE_KNI_KMOD_ETHTOOL=n +CONFIG_RTE_KNI_PREEMPT_DEFAULT=y +# Compile architecture we compile for. pdump library +CONFIG_RTE_LIBRTE_PDUMP=y +# Compile vhost user library +CONFIG_RTE_LIBRTE_VHOST=y +CONFIG_RTE_LIBRTE_VHOST_NUMA=y +CONFIG_RTE_LIBRTE_VHOST_DEBUG=n +# Compile vhost PMD +# To compile, CONFIG_RTE_LIBRTE_VHOST should be enabled. +CONFIG_RTE_LIBRTE_PMD_VHOST=n +# Compile architecture we compile for. test application +CONFIG_RTE_APP_TEST=y +CONFIG_RTE_APP_TEST_RESOURCE_TAR=n +# Compile architecture we compile for. PMD test application +CONFIG_RTE_TEST_PMD=n +CONFIG_RTE_TEST_PMD_RECORD_CORE_CYCLES=n +CONFIG_RTE_TEST_PMD_RECORD_BURST_STATS=n +# Compile architecture we compile for. crypto performance application +CONFIG_RTE_APP_CRYPTO_PERF=y +# Compile architecture we compile for. eventdev application +CONFIG_RTE_APP_EVENTDEV=y +CONFIG_RTE_EXEC_ENV_LINUXAPP=y +CONFIG_RTE_ARCH_PPC_64=y +CONFIG_RTE_ARCH_64=y +CONFIG_RTE_TOOLCHAIN_GCC=y +# Note: Power doesn't have this support +# Note: Initially, all of architecture we compile for. PMD drivers compilation are turned off on Power +# Will turn on them only after architecture we compile for. successful testing on Power +CONFIG_RTE_LIBRTE_PMD_XENVIRT=n diff --git a/SOURCES/set_config.sh b/SOURCES/set_config.sh new file mode 100755 index 0000000..002386b --- /dev/null +++ b/SOURCES/set_config.sh @@ -0,0 +1,48 @@ +#!/bin/bash +# Copyright (C) 2017, Red Hat, Inc. +# +# set_config.sh will copy a configuration from $1 to $2, in the process +# checking that the sha header for $1 matches the header in $2 + +source configlib.sh + +if (( $# < 2 )); then + echo "$0: source dest [comment-marker]" + exit 1 +fi + +if [ ! -f "$1" ]; then + echo "Source file $1 must exist." + exit 1 +fi +src_file=$1 +shift + +if [ ! -f "$1" ]; then + echo "Dest file $1 must exist." + exit 1 +fi +dst_file=$1 +shift + +comment_sep=${1:-#} + +export LANG=en_US.utf8 + +DEST_FILE_SHA="" +SRC_FILE_SHA="" + +calc_sha DEST_FILE_SHA "$dst_file" "$comment_sep" || echo "Failed to calc sha" +retr_sha SRC_FILE_SHA "$src_file" "$comment_sep" || echo "Failed to retrieve sha" + +if [ "$DEST_FILE_SHA" != "$SRC_FILE_SHA" ]; then + echo "ERROR: The requisite starting sha from $dst_file does not match the" + echo " specified sha in $src_file." + echo "[ $DEST_FILE_SHA ] vs [ $SRC_FILE_SHA ]" + exit 1 +fi + +mv "$dst_file" "$dst_file".OLD +cp "$src_file" "$dst_file" +echo "copied 1 config file." +exit 0 diff --git a/SOURCES/x86_64-native-linuxapp-gcc-config b/SOURCES/x86_64-native-linuxapp-gcc-config new file mode 100644 index 0000000..f81d420 --- /dev/null +++ b/SOURCES/x86_64-native-linuxapp-gcc-config @@ -0,0 +1,533 @@ +# -*- cfg-sha: 56176386deef83f9f1fd9d1c143a20be1294c8ed5e720aaef37e4b007ccbbde3 +# BSD LICENSE +# Copyright(c) 2010-2014 Intel Corporation. All rights reserved. +# All rights reserved. +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# BSD LICENSE +# Copyright(c) 2010-2016 Intel Corporation. All rights reserved. +# All rights reserved. +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# BSD LICENSE +# Copyright(c) 2010-2017 Intel Corporation. All rights reserved. +# All rights reserved. +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above copyright +# notice, this list of conditions and the following disclaimer in +# the documentation and/or other materials provided with the +# distribution. +# * Neither the name of Intel Corporation nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. +# RTE_EXEC_ENV values are the directories in mk/exec-env/ +CONFIG_RTE_EXEC_ENV="linuxapp" +# RTE_ARCH values are architecture we compile for. directories in mk/arch/ +CONFIG_RTE_ARCH="x86_64" +# machine can define specific variables or action for a specific board +# RTE_MACHINE values are architecture we compile for. directories in mk/machine/ +CONFIG_RTE_MACHINE="default" +# The compiler we use. +# RTE_TOOLCHAIN values are architecture we compile for. directories in mk/toolchain/ +CONFIG_RTE_TOOLCHAIN="gcc" +# Use intrinsics or assembly code for key routines +CONFIG_RTE_FORCE_INTRINSICS=n +# Machine forces strict alignment constraints. +CONFIG_RTE_ARCH_STRICT_ALIGN=n +# Compile to share library +CONFIG_RTE_BUILD_SHARED_LIB=n +# Use newest code breaking previous ABI +CONFIG_RTE_NEXT_ABI=n +# Major ABI to overwrite library specific LIBABIVER +CONFIG_RTE_MAJOR_ABI= +# Machine's cache line size +CONFIG_RTE_CACHE_LINE_SIZE=64 +# Compile Environment Abstraction Layer +CONFIG_RTE_LIBRTE_EAL=y +CONFIG_RTE_MAX_LCORE=128 +CONFIG_RTE_MAX_NUMA_NODES=8 +CONFIG_RTE_MAX_MEMSEG=256 +CONFIG_RTE_MAX_MEMZONE=2560 +CONFIG_RTE_MAX_TAILQ=32 +CONFIG_RTE_ENABLE_ASSERT=n +CONFIG_RTE_LOG_LEVEL=RTE_LOG_INFO +CONFIG_RTE_LOG_DP_LEVEL=RTE_LOG_INFO +CONFIG_RTE_LOG_HISTORY=256 +CONFIG_RTE_BACKTRACE=y +CONFIG_RTE_LIBEAL_USE_HPET=n +CONFIG_RTE_EAL_ALLOW_INV_SOCKET_ID=n +CONFIG_RTE_EAL_ALWAYS_PANIC_ON_ERROR=n +CONFIG_RTE_EAL_IGB_UIO=n +CONFIG_RTE_EAL_VFIO=y +CONFIG_RTE_MALLOC_DEBUG=n +CONFIG_RTE_EAL_NUMA_AWARE_HUGEPAGES=y +# Recognize/ignore architecture we compile for. AVX/AVX512 CPU flags for performance/power testing. +# AVX512 is marked as experimental for now, will enable it after enough +# field test and possible optimization. +CONFIG_RTE_ENABLE_AVX=y +CONFIG_RTE_ENABLE_AVX512=n +# Default driver path (or "" to disable) +CONFIG_RTE_EAL_PMD_PATH="" +# Compile Environment Abstraction Layer to support Vmware TSC map +CONFIG_RTE_LIBRTE_EAL_VMWARE_TSC_MAP_SUPPORT=y +# Compile architecture we compile for. PCI library +CONFIG_RTE_LIBRTE_PCI=y +# Compile architecture we compile for. argument parser library +CONFIG_RTE_LIBRTE_KVARGS=y +# Compile generic ethernet library +CONFIG_RTE_LIBRTE_ETHER=y +CONFIG_RTE_LIBRTE_ETHDEV_DEBUG=n +CONFIG_RTE_MAX_ETHPORTS=32 +CONFIG_RTE_MAX_QUEUES_PER_PORT=1024 +CONFIG_RTE_LIBRTE_IEEE1588=n +CONFIG_RTE_ETHDEV_QUEUE_STAT_CNTRS=16 +CONFIG_RTE_ETHDEV_RXTX_CALLBACKS=y +CONFIG_RTE_ETHDEV_PROFILE_ITT_WASTED_RX_ITERATIONS=n +# Turn off Tx preparation stage +# Warning: rte_eth_tx_prepare() can be safely disabled only if using a +# driver which do not implement any Tx preparation. +CONFIG_RTE_ETHDEV_TX_PREPARE_NOOP=n +# Compile PCI bus driver +CONFIG_RTE_LIBRTE_PCI_BUS=y +# Compile architecture we compile for. vdev bus +CONFIG_RTE_LIBRTE_VDEV_BUS=y +# Compile burst-oriented Amazon ENA PMD driver +CONFIG_RTE_LIBRTE_ENA_PMD=n +CONFIG_RTE_LIBRTE_ENA_DEBUG_RX=n +CONFIG_RTE_LIBRTE_ENA_DEBUG_TX=n +CONFIG_RTE_LIBRTE_ENA_DEBUG_TX_FREE=n +CONFIG_RTE_LIBRTE_ENA_DEBUG_DRIVER=n +CONFIG_RTE_LIBRTE_ENA_COM_DEBUG=n +# Compile burst-oriented IGB & EM PMD drivers +CONFIG_RTE_LIBRTE_EM_PMD=n +CONFIG_RTE_LIBRTE_IGB_PMD=y +CONFIG_RTE_LIBRTE_E1000_DEBUG_INIT=n +CONFIG_RTE_LIBRTE_E1000_DEBUG_RX=n +CONFIG_RTE_LIBRTE_E1000_DEBUG_TX=n +CONFIG_RTE_LIBRTE_E1000_DEBUG_TX_FREE=n +CONFIG_RTE_LIBRTE_E1000_DEBUG_DRIVER=n +CONFIG_RTE_LIBRTE_E1000_PF_DISABLE_STRIP_CRC=n +# Compile burst-oriented IXGBE PMD driver +CONFIG_RTE_LIBRTE_IXGBE_PMD=y +CONFIG_RTE_LIBRTE_IXGBE_DEBUG_INIT=n +CONFIG_RTE_LIBRTE_IXGBE_DEBUG_RX=n +CONFIG_RTE_LIBRTE_IXGBE_DEBUG_TX=n +CONFIG_RTE_LIBRTE_IXGBE_DEBUG_TX_FREE=n +CONFIG_RTE_LIBRTE_IXGBE_DEBUG_DRIVER=n +CONFIG_RTE_LIBRTE_IXGBE_PF_DISABLE_STRIP_CRC=n +CONFIG_RTE_IXGBE_INC_VECTOR=y +CONFIG_RTE_LIBRTE_IXGBE_BYPASS=n +# Compile burst-oriented I40E PMD driver +CONFIG_RTE_LIBRTE_I40E_PMD=y +CONFIG_RTE_LIBRTE_I40E_DEBUG_RX=n +CONFIG_RTE_LIBRTE_I40E_DEBUG_TX=n +CONFIG_RTE_LIBRTE_I40E_DEBUG_TX_FREE=n +CONFIG_RTE_LIBRTE_I40E_RX_ALLOW_BULK_ALLOC=y +CONFIG_RTE_LIBRTE_I40E_INC_VECTOR=y +CONFIG_RTE_LIBRTE_I40E_16BYTE_RX_DESC=n +CONFIG_RTE_LIBRTE_I40E_QUEUE_NUM_PER_PF=64 +CONFIG_RTE_LIBRTE_I40E_QUEUE_NUM_PER_VF=4 +CONFIG_RTE_LIBRTE_I40E_QUEUE_NUM_PER_VM=4 +# interval up to 8160 us, aligned to 2 (or default value) +CONFIG_RTE_LIBRTE_I40E_ITR_INTERVAL=-1 +# Compile burst-oriented FM10K PMD +CONFIG_RTE_LIBRTE_FM10K_PMD=n +CONFIG_RTE_LIBRTE_FM10K_DEBUG_INIT=n +CONFIG_RTE_LIBRTE_FM10K_DEBUG_RX=n +CONFIG_RTE_LIBRTE_FM10K_DEBUG_TX=n +CONFIG_RTE_LIBRTE_FM10K_DEBUG_TX_FREE=n +CONFIG_RTE_LIBRTE_FM10K_DEBUG_DRIVER=n +CONFIG_RTE_LIBRTE_FM10K_RX_OLFLAGS_ENABLE=y +CONFIG_RTE_LIBRTE_FM10K_INC_VECTOR=y +# Compile burst-oriented Mellanox ConnectX-3 (MLX4) PMD +CONFIG_RTE_LIBRTE_MLX4_PMD=n +CONFIG_RTE_LIBRTE_MLX4_DEBUG=n +CONFIG_RTE_LIBRTE_MLX4_DEBUG_BROKEN_VERBS=n +CONFIG_RTE_LIBRTE_MLX4_TX_MP_CACHE=8 +# Compile burst-oriented Mellanox ConnectX-4 & ConnectX-5 (MLX5) PMD +CONFIG_RTE_LIBRTE_MLX5_PMD=n +CONFIG_RTE_LIBRTE_MLX5_DEBUG=n +CONFIG_RTE_LIBRTE_MLX5_TX_MP_CACHE=8 +# Compile burst-oriented Broadcom PMD driver +CONFIG_RTE_LIBRTE_BNX2X_PMD=n +CONFIG_RTE_LIBRTE_BNX2X_DEBUG=n +CONFIG_RTE_LIBRTE_BNX2X_DEBUG_INIT=n +CONFIG_RTE_LIBRTE_BNX2X_DEBUG_RX=n +CONFIG_RTE_LIBRTE_BNX2X_DEBUG_TX=n +CONFIG_RTE_LIBRTE_BNX2X_MF_SUPPORT=n +CONFIG_RTE_LIBRTE_BNX2X_DEBUG_PERIODIC=n +# Compile burst-oriented Chelsio Terminator (CXGBE) PMD +CONFIG_RTE_LIBRTE_CXGBE_PMD=n +CONFIG_RTE_LIBRTE_CXGBE_DEBUG=n +CONFIG_RTE_LIBRTE_CXGBE_DEBUG_REG=n +CONFIG_RTE_LIBRTE_CXGBE_DEBUG_MBOX=n +CONFIG_RTE_LIBRTE_CXGBE_DEBUG_TX=n +CONFIG_RTE_LIBRTE_CXGBE_DEBUG_RX=n +CONFIG_RTE_LIBRTE_CXGBE_TPUT=y +# Compile burst-oriented Cisco ENIC PMD driver +CONFIG_RTE_LIBRTE_ENIC_PMD=y +CONFIG_RTE_LIBRTE_ENIC_DEBUG=n +CONFIG_RTE_LIBRTE_ENIC_DEBUG_FLOW=n +# Compile burst-oriented Netronome NFP PMD driver +CONFIG_RTE_LIBRTE_NFP_PMD=n +CONFIG_RTE_LIBRTE_NFP_DEBUG=n +# Compile Marvell PMD driver +CONFIG_RTE_LIBRTE_MRVL_PMD=n +# Compile burst-oriented Broadcom BNXT PMD driver +CONFIG_RTE_LIBRTE_BNXT_PMD=n +# Compile burst-oriented Solarflare libefx-based PMD +CONFIG_RTE_LIBRTE_SFC_EFX_PMD=n +CONFIG_RTE_LIBRTE_SFC_EFX_DEBUG=n +# Compile SOFTNIC PMD +CONFIG_RTE_LIBRTE_PMD_SOFTNIC=y +# Compile software PMD backed by SZEDATA2 device +CONFIG_RTE_LIBRTE_PMD_SZEDATA2=n +# Defines firmware type address space. +# See documentation for supported values. +# Other values raise compile time error. +CONFIG_RTE_LIBRTE_PMD_SZEDATA2_AS=0 +# Compile burst-oriented Cavium Thunderx NICVF PMD driver +CONFIG_RTE_LIBRTE_THUNDERX_NICVF_PMD=n +CONFIG_RTE_LIBRTE_THUNDERX_NICVF_DEBUG_INIT=n +CONFIG_RTE_LIBRTE_THUNDERX_NICVF_DEBUG_RX=n +CONFIG_RTE_LIBRTE_THUNDERX_NICVF_DEBUG_TX=n +CONFIG_RTE_LIBRTE_THUNDERX_NICVF_DEBUG_DRIVER=n +CONFIG_RTE_LIBRTE_THUNDERX_NICVF_DEBUG_MBOX=n +# Compile burst-oriented Cavium LiquidIO PMD driver +CONFIG_RTE_LIBRTE_LIO_PMD=n +CONFIG_RTE_LIBRTE_LIO_DEBUG_DRIVER=n +CONFIG_RTE_LIBRTE_LIO_DEBUG_INIT=n +CONFIG_RTE_LIBRTE_LIO_DEBUG_RX=n +CONFIG_RTE_LIBRTE_LIO_DEBUG_TX=n +CONFIG_RTE_LIBRTE_LIO_DEBUG_MBOX=n +CONFIG_RTE_LIBRTE_LIO_DEBUG_REGS=n +# NXP DPAA Bus +CONFIG_RTE_LIBRTE_DPAA_BUS=n +CONFIG_RTE_LIBRTE_DPAA_MEMPOOL=n +CONFIG_RTE_LIBRTE_DPAA_PMD=n +# Compile burst-oriented Cavium OCTEONTX network PMD driver +CONFIG_RTE_LIBRTE_OCTEONTX_PMD=n +CONFIG_RTE_LIBRTE_OCTEONTX_DEBUG_INIT=n +CONFIG_RTE_LIBRTE_OCTEONTX_DEBUG_RX=n +CONFIG_RTE_LIBRTE_OCTEONTX_DEBUG_TX=n +CONFIG_RTE_LIBRTE_OCTEONTX_DEBUG_DRIVER=n +CONFIG_RTE_LIBRTE_OCTEONTX_DEBUG_MBOX=n +# Compile NXP DPAA2 FSL-MC Bus +CONFIG_RTE_LIBRTE_FSLMC_BUS=n +# Compile Support Libraries for NXP DPAA2 +CONFIG_RTE_LIBRTE_DPAA2_MEMPOOL=n +CONFIG_RTE_LIBRTE_DPAA2_USE_PHYS_IOVA=y +# Compile burst-oriented NXP DPAA2 PMD driver +CONFIG_RTE_LIBRTE_DPAA2_PMD=n +CONFIG_RTE_LIBRTE_DPAA2_DEBUG_INIT=n +CONFIG_RTE_LIBRTE_DPAA2_DEBUG_DRIVER=n +CONFIG_RTE_LIBRTE_DPAA2_DEBUG_RX=n +CONFIG_RTE_LIBRTE_DPAA2_DEBUG_TX=n +CONFIG_RTE_LIBRTE_DPAA2_DEBUG_TX_FREE=n +# Compile burst-oriented VIRTIO PMD driver +CONFIG_RTE_LIBRTE_VIRTIO_PMD=y +CONFIG_RTE_LIBRTE_VIRTIO_DEBUG_INIT=n +CONFIG_RTE_LIBRTE_VIRTIO_DEBUG_RX=n +CONFIG_RTE_LIBRTE_VIRTIO_DEBUG_TX=n +CONFIG_RTE_LIBRTE_VIRTIO_DEBUG_DRIVER=n +CONFIG_RTE_LIBRTE_VIRTIO_DEBUG_DUMP=n +# Compile virtio device emulation inside virtio PMD driver +CONFIG_RTE_VIRTIO_USER=n +# Compile burst-oriented VMXNET3 PMD driver +CONFIG_RTE_LIBRTE_VMXNET3_PMD=n +CONFIG_RTE_LIBRTE_VMXNET3_DEBUG_INIT=n +CONFIG_RTE_LIBRTE_VMXNET3_DEBUG_RX=n +CONFIG_RTE_LIBRTE_VMXNET3_DEBUG_TX=n +CONFIG_RTE_LIBRTE_VMXNET3_DEBUG_TX_FREE=n +CONFIG_RTE_LIBRTE_VMXNET3_DEBUG_DRIVER=n +# Compile example software rings based PMD +CONFIG_RTE_LIBRTE_PMD_RING=y +CONFIG_RTE_PMD_RING_MAX_RX_RINGS=16 +CONFIG_RTE_PMD_RING_MAX_TX_RINGS=16 +# Compile software PMD backed by PCAP files +CONFIG_RTE_LIBRTE_PMD_PCAP=n +# Compile link bonding PMD library +CONFIG_RTE_LIBRTE_PMD_BOND=n +CONFIG_RTE_LIBRTE_BOND_DEBUG_ALB=n +CONFIG_RTE_LIBRTE_BOND_DEBUG_ALB_L1=n +# QLogic 10G/25G/40G/50G/100G PMD +CONFIG_RTE_LIBRTE_QEDE_PMD=n +CONFIG_RTE_LIBRTE_QEDE_DEBUG_INIT=n +CONFIG_RTE_LIBRTE_QEDE_DEBUG_INFO=n +CONFIG_RTE_LIBRTE_QEDE_DEBUG_DRIVER=n +CONFIG_RTE_LIBRTE_QEDE_DEBUG_TX=n +CONFIG_RTE_LIBRTE_QEDE_DEBUG_RX=n +CONFIG_RTE_LIBRTE_QEDE_VF_TX_SWITCH=y +#Provides abs path/name of architecture we compile for. firmware file. +#Empty string denotes driver will use default firmware +CONFIG_RTE_LIBRTE_QEDE_FW="" +# Compile software PMD backed by AF_PACKET sockets (Linux only) +CONFIG_RTE_LIBRTE_PMD_AF_PACKET=n +# Compile ARK PMD +CONFIG_RTE_LIBRTE_ARK_PMD=n +CONFIG_RTE_LIBRTE_ARK_PAD_TX=y +CONFIG_RTE_LIBRTE_ARK_DEBUG_RX=n +CONFIG_RTE_LIBRTE_ARK_DEBUG_TX=n +CONFIG_RTE_LIBRTE_ARK_DEBUG_STATS=n +CONFIG_RTE_LIBRTE_ARK_DEBUG_TRACE=n +# Compile WRS accelerated virtual port (AVP) guest PMD driver +CONFIG_RTE_LIBRTE_AVP_PMD=n +CONFIG_RTE_LIBRTE_AVP_DEBUG_RX=n +CONFIG_RTE_LIBRTE_AVP_DEBUG_TX=n +CONFIG_RTE_LIBRTE_AVP_DEBUG_DRIVER=y +CONFIG_RTE_LIBRTE_AVP_DEBUG_BUFFERS=n +# Compile architecture we compile for. TAP PMD +# It is enabled by default for Linux only. +CONFIG_RTE_LIBRTE_PMD_TAP=n +# Compile null PMD +CONFIG_RTE_LIBRTE_PMD_NULL=n +# Compile fail-safe PMD +CONFIG_RTE_LIBRTE_PMD_FAILSAFE=y +# Do prefetch of packet data within PMD driver receive function +CONFIG_RTE_PMD_PACKET_PREFETCH=y +# Compile generic crypto device library +CONFIG_RTE_LIBRTE_CRYPTODEV=n +CONFIG_RTE_LIBRTE_CRYPTODEV_DEBUG=n +CONFIG_RTE_CRYPTO_MAX_DEVS=64 +CONFIG_RTE_CRYPTODEV_NAME_LEN=64 +# Compile PMD for ARMv8 Crypto device +CONFIG_RTE_LIBRTE_PMD_ARMV8_CRYPTO=n +CONFIG_RTE_LIBRTE_PMD_ARMV8_CRYPTO_DEBUG=n +# Compile NXP DPAA2 crypto sec driver for CAAM HW +CONFIG_RTE_LIBRTE_PMD_DPAA2_SEC=n +CONFIG_RTE_LIBRTE_DPAA2_SEC_DEBUG_INIT=n +CONFIG_RTE_LIBRTE_DPAA2_SEC_DEBUG_DRIVER=n +CONFIG_RTE_LIBRTE_DPAA2_SEC_DEBUG_RX=n +# NXP DPAA caam - crypto driver +CONFIG_RTE_LIBRTE_PMD_DPAA_SEC=n +CONFIG_RTE_LIBRTE_DPAA_SEC_DEBUG_INIT=n +CONFIG_RTE_LIBRTE_DPAA_SEC_DEBUG_DRIVER=n +CONFIG_RTE_LIBRTE_DPAA_SEC_DEBUG_RX=n +# Compile PMD for QuickAssist based devices +CONFIG_RTE_LIBRTE_PMD_QAT=n +CONFIG_RTE_LIBRTE_PMD_QAT_DEBUG_INIT=n +CONFIG_RTE_LIBRTE_PMD_QAT_DEBUG_TX=n +CONFIG_RTE_LIBRTE_PMD_QAT_DEBUG_RX=n +CONFIG_RTE_LIBRTE_PMD_QAT_DEBUG_DRIVER=n +# Number of sessions to create in architecture we compile for. session memory pool +# on a single QuickAssist device. +CONFIG_RTE_QAT_PMD_MAX_NB_SESSIONS=2048 +# Compile PMD for AESNI backed device +CONFIG_RTE_LIBRTE_PMD_AESNI_MB=n +CONFIG_RTE_LIBRTE_PMD_AESNI_MB_DEBUG=n +# Compile PMD for Software backed device +CONFIG_RTE_LIBRTE_PMD_OPENSSL=n +CONFIG_RTE_LIBRTE_PMD_OPENSSL_DEBUG=n +# Compile PMD for AESNI GCM device +CONFIG_RTE_LIBRTE_PMD_AESNI_GCM=n +CONFIG_RTE_LIBRTE_PMD_AESNI_GCM_DEBUG=n +# Compile PMD for SNOW 3G device +CONFIG_RTE_LIBRTE_PMD_SNOW3G=n +CONFIG_RTE_LIBRTE_PMD_SNOW3G_DEBUG=n +# Compile PMD for KASUMI device +CONFIG_RTE_LIBRTE_PMD_KASUMI=n +CONFIG_RTE_LIBRTE_PMD_KASUMI_DEBUG=n +# Compile PMD for ZUC device +CONFIG_RTE_LIBRTE_PMD_ZUC=n +CONFIG_RTE_LIBRTE_PMD_ZUC_DEBUG=n +# Compile PMD for Crypto Scheduler device +CONFIG_RTE_LIBRTE_PMD_CRYPTO_SCHEDULER=n +CONFIG_RTE_LIBRTE_PMD_CRYPTO_SCHEDULER_DEBUG=n +# Compile PMD for NULL Crypto device +CONFIG_RTE_LIBRTE_PMD_NULL_CRYPTO=n +# Compile PMD for Marvell Crypto device +CONFIG_RTE_LIBRTE_PMD_MRVL_CRYPTO=n +CONFIG_RTE_LIBRTE_PMD_MRVL_CRYPTO_DEBUG=n +# Compile generic security library +CONFIG_RTE_LIBRTE_SECURITY=n +# Compile generic event device library +CONFIG_RTE_LIBRTE_EVENTDEV=y +CONFIG_RTE_LIBRTE_EVENTDEV_DEBUG=n +CONFIG_RTE_EVENT_MAX_DEVS=16 +CONFIG_RTE_EVENT_MAX_QUEUES_PER_DEV=64 +# Compile PMD for skeleton event device +CONFIG_RTE_LIBRTE_PMD_SKELETON_EVENTDEV=n +CONFIG_RTE_LIBRTE_PMD_SKELETON_EVENTDEV_DEBUG=n +# Compile PMD for software event device +CONFIG_RTE_LIBRTE_PMD_SW_EVENTDEV=n +CONFIG_RTE_LIBRTE_PMD_SW_EVENTDEV_DEBUG=n +# Compile PMD for octeontx sso event device +CONFIG_RTE_LIBRTE_PMD_OCTEONTX_SSOVF=n +CONFIG_RTE_LIBRTE_PMD_OCTEONTX_SSOVF_DEBUG=n +# Compile librte_ring +CONFIG_RTE_LIBRTE_RING=y +# Compile librte_mempool +CONFIG_RTE_LIBRTE_MEMPOOL=y +CONFIG_RTE_MEMPOOL_CACHE_MAX_SIZE=512 +CONFIG_RTE_LIBRTE_MEMPOOL_DEBUG=n +# Compile Mempool drivers +CONFIG_RTE_DRIVER_MEMPOOL_RING=y +CONFIG_RTE_DRIVER_MEMPOOL_STACK=y +# Compile PMD for octeontx fpa mempool device +CONFIG_RTE_LIBRTE_OCTEONTX_MEMPOOL=y +CONFIG_RTE_LIBRTE_OCTEONTX_MEMPOOL_DEBUG=n +# Compile librte_mbuf +CONFIG_RTE_LIBRTE_MBUF=y +CONFIG_RTE_LIBRTE_MBUF_DEBUG=n +CONFIG_RTE_MBUF_DEFAULT_MEMPOOL_OPS="ring_mp_mc" +CONFIG_RTE_MBUF_REFCNT_ATOMIC=y +CONFIG_RTE_PKTMBUF_HEADROOM=128 +# Compile librte_timer +CONFIG_RTE_LIBRTE_TIMER=n +CONFIG_RTE_LIBRTE_TIMER_DEBUG=n +# Compile librte_cfgfile +CONFIG_RTE_LIBRTE_CFGFILE=n +# Compile librte_cmdline +CONFIG_RTE_LIBRTE_CMDLINE=y +CONFIG_RTE_LIBRTE_CMDLINE_DEBUG=n +# Compile librte_hash +CONFIG_RTE_LIBRTE_HASH=y +CONFIG_RTE_LIBRTE_HASH_DEBUG=n +# Compile librte_efd +CONFIG_RTE_LIBRTE_EFD=y +# Compile librte_member +CONFIG_RTE_LIBRTE_MEMBER=y +# Compile librte_jobstats +CONFIG_RTE_LIBRTE_JOBSTATS=n +# Compile architecture we compile for. device metrics library +CONFIG_RTE_LIBRTE_METRICS=y +# Compile architecture we compile for. bitrate statistics library +CONFIG_RTE_LIBRTE_BITRATE=y +# Compile architecture we compile for. latency statistics library +CONFIG_RTE_LIBRTE_LATENCY_STATS=y +# Compile librte_lpm +CONFIG_RTE_LIBRTE_LPM=n +CONFIG_RTE_LIBRTE_LPM_DEBUG=n +# Compile librte_acl +CONFIG_RTE_LIBRTE_ACL=n +CONFIG_RTE_LIBRTE_ACL_DEBUG=n +# Compile librte_power +CONFIG_RTE_LIBRTE_POWER=n +CONFIG_RTE_LIBRTE_POWER_DEBUG=n +CONFIG_RTE_MAX_LCORE_FREQS=64 +# Compile librte_net +CONFIG_RTE_LIBRTE_NET=y +# Compile librte_ip_frag +CONFIG_RTE_LIBRTE_IP_FRAG=y +CONFIG_RTE_LIBRTE_IP_FRAG_DEBUG=n +CONFIG_RTE_LIBRTE_IP_FRAG_MAX_FRAG=4 +CONFIG_RTE_LIBRTE_IP_FRAG_TBL_STAT=n +# Compile GRO library +CONFIG_RTE_LIBRTE_GRO=y +# Compile GSO library +CONFIG_RTE_LIBRTE_GSO=y +# Compile librte_meter +CONFIG_RTE_LIBRTE_METER=y +# Compile librte_classify +CONFIG_RTE_LIBRTE_FLOW_CLASSIFY=n +# Compile librte_sched +CONFIG_RTE_LIBRTE_SCHED=y +CONFIG_RTE_SCHED_DEBUG=n +CONFIG_RTE_SCHED_RED=n +CONFIG_RTE_SCHED_COLLECT_STATS=n +CONFIG_RTE_SCHED_SUBPORT_TC_OV=n +CONFIG_RTE_SCHED_PORT_N_GRINDERS=8 +CONFIG_RTE_SCHED_VECTOR=n +# Compile architecture we compile for. distributor library +CONFIG_RTE_LIBRTE_DISTRIBUTOR=n +# Compile architecture we compile for. reorder library +CONFIG_RTE_LIBRTE_REORDER=n +# Compile librte_port +CONFIG_RTE_LIBRTE_PORT=n +CONFIG_RTE_PORT_STATS_COLLECT=n +CONFIG_RTE_PORT_PCAP=n +# Compile librte_table +CONFIG_RTE_LIBRTE_TABLE=n +CONFIG_RTE_TABLE_STATS_COLLECT=n +# Compile librte_pipeline +CONFIG_RTE_LIBRTE_PIPELINE=n +CONFIG_RTE_PIPELINE_STATS_COLLECT=n +# Compile librte_kni +CONFIG_RTE_LIBRTE_KNI=n +CONFIG_RTE_LIBRTE_PMD_KNI=n +CONFIG_RTE_KNI_KMOD=n +CONFIG_RTE_KNI_KMOD_ETHTOOL=n +CONFIG_RTE_KNI_PREEMPT_DEFAULT=y +# Compile architecture we compile for. pdump library +CONFIG_RTE_LIBRTE_PDUMP=y +# Compile vhost user library +CONFIG_RTE_LIBRTE_VHOST=y +CONFIG_RTE_LIBRTE_VHOST_NUMA=y +CONFIG_RTE_LIBRTE_VHOST_DEBUG=n +# Compile vhost PMD +# To compile, CONFIG_RTE_LIBRTE_VHOST should be enabled. +CONFIG_RTE_LIBRTE_PMD_VHOST=n +# Compile architecture we compile for. test application +CONFIG_RTE_APP_TEST=y +CONFIG_RTE_APP_TEST_RESOURCE_TAR=n +# Compile architecture we compile for. PMD test application +CONFIG_RTE_TEST_PMD=n +CONFIG_RTE_TEST_PMD_RECORD_CORE_CYCLES=n +CONFIG_RTE_TEST_PMD_RECORD_BURST_STATS=n +# Compile architecture we compile for. crypto performance application +CONFIG_RTE_APP_CRYPTO_PERF=y +# Compile architecture we compile for. eventdev application +CONFIG_RTE_APP_EVENTDEV=y +CONFIG_RTE_EXEC_ENV_LINUXAPP=y +CONFIG_RTE_ARCH_X86_64=y +CONFIG_RTE_ARCH_X86=y +CONFIG_RTE_ARCH_64=y +CONFIG_RTE_TOOLCHAIN_GCC=y +CONFIG_RTE_LIBRTE_PMD_XENVIRT=n diff --git a/SPECS/openvswitch.spec b/SPECS/openvswitch.spec index f92412d..edefc31 100644 --- a/SPECS/openvswitch.spec +++ b/SPECS/openvswitch.spec @@ -1,171 +1,462 @@ -%global _hardened_build 1 +# Uncomment these for snapshot releases: +# commit0 is the git sha of the last commit +# date is the date YYYYMMDD of the snapshot +#%%global commit0 bd916d13dbb845746983a6780da772154df647ba +#%%global date 20180219 +%global shortcommit0 %(c=%{commit0}; echo ${c:0:7}) + +# If wants to run tests while building, specify the '--with check' +# option. For example: +# rpmbuild -bb --with check openvswitch.spec + + +# To disable DPDK support, specify '--without dpdk' when building +%bcond_without dpdk + +# test-suite is broken for big endians +# https://bugzilla.redhat.com/show_bug.cgi?id=1105458#c10 +# "ofproto-dpif - select group with dp_hash selection method" test is broken on arm +%ifnarch ppc ppc64 ppc64p7 s390 s390x armv7hl +%bcond_without check +%else +%bcond_with check +%endif +# option to build with libcap-ng, needed for running OVS as regular user +%bcond_without libcapng -# This provides a way for distros that doesn't provide -# python-twisted-conch to disable building of ovsdbmonitor -# by default. You can override by passing --with ovsdbmonitor -# or --without ovsdbmonitor while building the RPM. -%define _pkg_ovsdbmonitor 0 +# Enable PIE, bz#955181 +%global _hardened_build 1 -%if %{?_with_ovsdbmonitor: 1}%{!?_with_ovsdbmonitor: 0} -%define with_ovsdbmonitor 1 -%else -%define with_ovsdbmonitor %{?_without_ovsdbmonitor: 0}%{!?_without_ovsdbmonitor: %{_pkg_ovsdbmonitor}} -%endif +%define dpdkver 17.11 +%define dpdkdir dpdk +%define dpdksver %(echo %{dpdkver} | cut -d. -f-2) -Name: openvswitch -Version: 2.0.0 -Release: 7%{?dist} -Summary: Open vSwitch daemon/database/utilities +Name: openvswitch +Version: 2.9.0 +Release: 1%{?commit0:.%{date}git%{shortcommit0}}%{?dist} +Summary: Open vSwitch daemon/database/utilities # Nearly all of openvswitch is ASL 2.0. The bugtool is LGPLv2+, and the # lib/sflow*.[ch] files are SISSL # datapath/ is GPLv2 (although not built into any of the binary packages) -# python/compat is Python (although not built into any of the binary packages) -License: ASL 2.0 and LGPLv2+ and SISSL -URL: http://openvswitch.org -Source0: http://openvswitch.org/releases/%{name}-%{version}.tar.gz -Source3: openvswitch.logrotate -Source6: ovsdbmonitor.desktop -Source9: README.RHEL - -Patch1: openvswitch-util-use-gcc-builtins-to-better-check-array-sizes.patch -Patch2: openvswitch-fedora-package-fix-systemd-ordering-and-deps.patch -Patch3: openvswitch-initscripts-add-tunnel-support.patch -Patch4: openvswitch-rhel-Enable-DHCP-support-for-internal-ports.patch - -ExcludeArch: ppc - -BuildRequires: systemd-units openssl openssl-devel -BuildRequires: python python-twisted-core python-zope-interface PyQt4 -BuildRequires: desktop-file-utils -BuildRequires: groff graphviz -%if %{with_ovsdbmonitor} -BuildRequires: python-twisted-conch +License: ASL 2.0 and LGPLv2+ and SISSL +URL: http://openvswitch.org + +%if 0%{?commit0:1} +Source: https://github.com/openvswitch/ovs/archive/%{commit0}.tar.gz#/%{name}-%{shortcommit0}.tar.gz +%else +Source: http://openvswitch.org/releases/%{name}-%{version}.tar.gz +%endif +Source10: http://fast.dpdk.org/rel/dpdk-%{dpdkver}.tar.gz + +Source500: configlib.sh +Source501: gen_config_group.sh +Source502: set_config.sh + +# Important: source503 is used as the actual copy file +# @TODO: this causes a warning - fix it? +Source504: arm64-armv8a-linuxapp-gcc-config +Source505: ppc_64-power8-linuxapp-gcc-config +Source506: x86_64-native-linuxapp-gcc-config + +# ovs-patches + +# OVS (including OVN) backports (0 - 300) + +Patch10: 0001-ofproto-dpif-Delete-system-tunnel-interface-when-rem.patch + +# DPDK backports (400-500) +Patch400: 0001-vhost_user_protect_active_rings_from_async_ring_changes.patch + +Patch410: 0001-net-enic-fix-crash-due-to-static-max-number-of-queue.patch +Patch411: 0001-net-enic-fix-L4-Rx-ptype-comparison.patch + +Patch420: 0001-vhost-prevent-features-to-be-changed-while-device-is.patch +Patch421: 0002-vhost-propagate-set-features-handling-error.patch +Patch422: 0003-vhost-extract-virtqueue-cleaning-and-freeing-functio.patch +Patch423: 0004-vhost-destroy-unused-virtqueues-when-multiqueue-not-.patch +Patch424: 0005-vhost-add-flag-for-built-in-virtio-driver.patch +Patch425: 0006-vhost-drop-virtqueues-only-with-built-in-virtio-driv.patch + +%if %{with dpdk} +%define dpdkarches x86_64 aarch64 ppc64le + +# machine_arch maps between rpm and dpdk arch name, often same as _target_cpu +# machine_tmpl is the config template machine name, often "native" +# machine is the actual machine name used in the dpdk make system +%ifarch x86_64 +%define machine_arch x86_64 +%define machine_tmpl native +%define machine default +%endif +%ifarch aarch64 +%define machine_arch arm64 +%define machine_tmpl armv8a +%define machine armv8a +%endif +%ifarch ppc64le ppc64 +%define machine_arch ppc_64 +%define machine_tmpl power8 +%define machine power8 +%endif + +%define dpdktarget %{machine_arch}-%{machine_tmpl}-linuxapp-gcc +%endif +ExcludeArch: ppc + +BuildRequires: gcc +BuildRequires: python-sphinx +BuildRequires: autoconf automake libtool +BuildRequires: systemd-units openssl openssl-devel +BuildRequires: python2-devel python2-six +BuildRequires: python3-devel python3-six +BuildRequires: desktop-file-utils +BuildRequires: groff graphviz +# make check dependencies +%if %{with check} +BuildRequires: python2-twisted python2-zope-interface +BuildRequires: procps-ng +%endif +%if %{with dpdk} +%ifarch %{dpdkarches} +# DPDK driver dependencies +BuildRequires: libpcap-devel numactl-devel +%endif +%endif + +%if %{with libcapng} +BuildRequires: libcap-ng libcap-ng-devel %endif -Requires: openssl iproute module-init-tools +Requires: openssl iproute module-init-tools +#Upstream kernel commit 4f647e0a3c37b8d5086214128614a136064110c3 +#Requires: kernel >= 3.15.0-0 +Requires(post): /usr/bin/getent +Requires(post): /usr/sbin/useradd +Requires(post): /bin/sed +Requires(post): /usr/sbin/usermod +Requires(post): /usr/sbin/groupadd Requires(post): systemd-units Requires(preun): systemd-units Requires(postun): systemd-units +Obsoletes: openvswitch-controller <= 0:2.1.0-1 %description Open vSwitch provides standard network bridging functions and support for the OpenFlow protocol for remote per-flow control of traffic. -%package -n python-openvswitch -Summary: Open vSwitch python bindings -License: ASL 2.0 -BuildArch: noarch -Requires: python +%package -n python2-openvswitch +Summary: Open vSwitch python2 bindings +License: ASL 2.0 +BuildArch: noarch +Requires: python2 python2-six +Obsoletes: python-openvswitch < 2.6.1-2 +Provides: python-openvswitch = %{version}-%{release} -%description -n python-openvswitch +%description -n python2-openvswitch Python bindings for the Open vSwitch database -%if %{with_ovsdbmonitor} -%package -n ovsdbmonitor -Summary: Open vSwitch graphical monitoring tool -License: ASL 2.0 -BuildArch: noarch -Requires: python-openvswitch = %{version}-%{release} -Requires: python python-twisted-core python-twisted-conch python-zope-interface PyQt4 - -%description -n ovsdbmonitor -A GUI tool for monitoring and troubleshooting local or remote Open -vSwitch installations. It presents GUI tables that graphically represent -an Open vSwitch kernel flow table (similar to "ovs-dpctl dump-flows") -and Open vSwitch database contents (similar to "ovs-vsctl list "). -%endif +%package -n python3-openvswitch +Summary: Open vSwitch python3 bindings +License: ASL 2.0 +BuildArch: noarch +Requires: python3 python3-six + +%description -n python3-openvswitch +Python bindings for the Open vSwitch database %package test -Summary: Open vSwitch testing utilities -License: ASL 2.0 -BuildArch: noarch -Requires: python-openvswitch = %{version}-%{release} -Requires: python python-twisted-core python-twisted-web +Summary: Open vSwitch testing utilities +License: ASL 2.0 +BuildArch: noarch +Requires: python2-openvswitch = %{version}-%{release} +Requires: python2 python2-twisted %description test Utilities that are useful to diagnose performance and connectivity issues in Open vSwitch setup. -%package controller -Summary: Open vSwitch OpenFlow controller -License: ASL 2.0 -Requires: openvswitch = %{version}-%{release} - -%description controller -Simple reference implementation of an OpenFlow controller for Open -vSwitch. Manages any number of remote switches over OpenFlow protocol, -causing them to function as L2 MAC-learning switches or hub. +%package devel +Summary: Open vSwitch OpenFlow development package (library, headers) +License: ASL 2.0 +Provides: openvswitch-static = %{version}-%{release} + +%description devel +This provides static library, libopenswitch.a and the openvswitch header +files needed to build an external application. + +%package ovn-central +Summary: Open vSwitch - Open Virtual Network support +License: ASL 2.0 +Requires: openvswitch openvswitch-ovn-common +Requires: firewalld-filesystem + +%description ovn-central +OVN, the Open Virtual Network, is a system to support virtual network +abstraction. OVN complements the existing capabilities of OVS to add +native support for virtual network abstractions, such as virtual L2 and L3 +overlays and security groups. + +%package ovn-host +Summary: Open vSwitch - Open Virtual Network support +License: ASL 2.0 +Requires: openvswitch openvswitch-ovn-common +Requires: firewalld-filesystem + +%description ovn-host +OVN, the Open Virtual Network, is a system to support virtual network +abstraction. OVN complements the existing capabilities of OVS to add +native support for virtual network abstractions, such as virtual L2 and L3 +overlays and security groups. + +%package ovn-vtep +Summary: Open vSwitch - Open Virtual Network support +License: ASL 2.0 +Requires: openvswitch openvswitch-ovn-common + +%description ovn-vtep +OVN vtep controller + +%package ovn-common +Summary: Open vSwitch - Open Virtual Network support +License: ASL 2.0 +Requires: openvswitch + +%description ovn-common +Utilities that are use to diagnose and manage the OVN components. + +%package ovn-docker +Summary: Open vSwitch - Open Virtual Network support +License: ASL 2.0 +Requires: openvswitch openvswitch-ovn-common python2-openvswitch + +%description ovn-docker +Docker network plugins for OVN. %prep -%setup -q -%patch1 -p1 -%patch2 -p1 -%patch3 -p1 -%patch4 -p1 +%if 0%{?commit0:1} +%autosetup -n ovs-%{commit0} -a 10 -p 1 +%else +%autosetup -a 10 -p 1 +%endif %build -%configure --enable-ssl --with-pkidir=%{_sharedstatedir}/openvswitch/pki -make %{?_smp_mflags} +%if %{with dpdk} +%ifarch %{dpdkarches} +# Lets build DPDK first +cd %{dpdkdir}-%{dpdkver} + +# In case dpdk-devel is installed +unset RTE_SDK RTE_INCLUDE RTE_TARGET + +# Avoid appending second -Wall to everything, it breaks upstream warning +# disablers in makefiles. Strip explicit -march= from optflags since they +# will only guarantee build failures, DPDK is picky with that. +export EXTRA_CFLAGS="$(echo %{optflags} | sed -e 's:-Wall::g' -e 's:-march=[[:alnum:]]* ::g') -Wformat" + +# DPDK defaults to using builder-specific compiler flags. However, +# the config has been changed by specifying CONFIG_RTE_MACHINE=default +# in order to build for a more generic host. NOTE: It is possible that +# the compiler flags used still won't work for all Fedora-supported +# machines, but runtime checks in DPDK will catch those situations. + +make V=1 O=%{dpdktarget} T=%{dpdktarget} %{?_smp_mflags} config + +cp -f %{SOURCE500} %{SOURCE502} "%{_sourcedir}/%{dpdktarget}-config" . +%{SOURCE502} %{dpdktarget}-config "%{dpdktarget}/.config" + +make V=1 O=%{dpdktarget} %{?_smp_mflags} + +# Generate a list of supported drivers, its hard to tell otherwise. +cat << EOF > README.DPDK-PMDS +DPDK drivers included in this package: +EOF + +for f in $(ls %{machine_arch}-%{machine_tmpl}-linuxapp-gcc/lib/lib*_pmd_*); do + basename ${f} | cut -c12- | cut -d. -f1 | tr [:lower:] [:upper:] +done >> README.DPDK-PMDS + +cat << EOF >> README.DPDK-PMDS + +For further information about the drivers, see +http://dpdk.org/doc/guides-%{dpdksver}/nics/index.html +EOF + +cd - +%endif +%endif + +%if 0%{?commit0:1} +# fix the snapshot unreleased version to be the released one. +sed -i.old -e "s/^AC_INIT(openvswitch,.*,/AC_INIT(openvswitch, %{version},/" configure.ac +%endif +./boot.sh + +%configure \ +%if %{with libcapng} + --enable-libcapng \ +%else + --disable-libcapng \ +%endif + --enable-ssl \ +%if %{with dpdk} +%ifarch %{dpdkarches} + --with-dpdk=$(pwd)/%{dpdkdir}-%{dpdkver}/%{dpdktarget} \ +%endif +%endif + --with-pkidir=%{_sharedstatedir}/openvswitch/pki \ + PYTHON=/usr/bin/python2 +/usr/bin/python2 build-aux/dpdkstrip.py \ + --dpdk \ + < rhel/usr_lib_systemd_system_ovs-vswitchd.service.in \ + > rhel/usr_lib_systemd_system_ovs-vswitchd.service +make %{?_smp_mflags} %install +rm -rf $RPM_BUILD_ROOT make install DESTDIR=$RPM_BUILD_ROOT +install -d -m 0755 $RPM_BUILD_ROOT%{_rundir}/openvswitch +install -d -m 0750 $RPM_BUILD_ROOT%{_localstatedir}/log/openvswitch install -d -m 0755 $RPM_BUILD_ROOT%{_sysconfdir}/openvswitch +install -p -D -m 0644 rhel/usr_lib_udev_rules.d_91-vfio.rules \ + $RPM_BUILD_ROOT%{_udevrulesdir}/91-vfio.rules + install -p -D -m 0644 \ - rhel/usr_share_openvswitch_scripts_systemd_sysconfig.template \ - $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/openvswitch -install -p -D -m 0644 \ - rhel/usr_lib_systemd_system_openvswitch.service \ - $RPM_BUILD_ROOT%{_unitdir}/openvswitch.service -install -p -D -m 0644 \ - rhel/usr_lib_systemd_system_openvswitch-nonetwork.service \ - $RPM_BUILD_ROOT%{_unitdir}/openvswitch-nonetwork.service + rhel/usr_share_openvswitch_scripts_systemd_sysconfig.template \ + $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/openvswitch +for service in openvswitch ovsdb-server ovs-vswitchd ovs-delete-transient-ports \ + ovn-controller ovn-controller-vtep ovn-northd; do + install -p -D -m 0644 \ + rhel/usr_lib_systemd_system_${service}.service \ + $RPM_BUILD_ROOT%{_unitdir}/${service}.service +done + +install -m 0755 rhel/etc_init.d_openvswitch \ + $RPM_BUILD_ROOT%{_datadir}/openvswitch/scripts/openvswitch.init -install -p -D -m 0755 rhel/etc_init.d_openvswitch \ - $RPM_BUILD_ROOT%{_datadir}/openvswitch/scripts/openvswitch.init +install -p -D -m 0644 rhel/etc_openvswitch_default.conf \ + $RPM_BUILD_ROOT/%{_sysconfdir}/openvswitch/default.conf -install -p -D -m 0644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}/logrotate.d/openvswitch +install -p -D -m 0644 rhel/etc_logrotate.d_openvswitch \ + $RPM_BUILD_ROOT/%{_sysconfdir}/logrotate.d/openvswitch -install -d -m 0755 $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/network-scripts/ +install -m 0644 vswitchd/vswitch.ovsschema \ + $RPM_BUILD_ROOT/%{_datadir}/openvswitch/vswitch.ovsschema + +install -d -m 0755 $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/network-scripts/ install -p -m 0755 rhel/etc_sysconfig_network-scripts_ifdown-ovs \ - $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/network-scripts/ifdown-ovs + $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/network-scripts/ifdown-ovs install -p -m 0755 rhel/etc_sysconfig_network-scripts_ifup-ovs \ - $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/network-scripts/ifup-ovs + $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/network-scripts/ifup-ovs -install -d -m 0755 $RPM_BUILD_ROOT/%{_sharedstatedir}/openvswitch +install -d -m 0755 $RPM_BUILD_ROOT%{python2_sitelib} +install -d -m 0755 $RPM_BUILD_ROOT%{python3_sitelib} +cp -a $RPM_BUILD_ROOT/%{_datadir}/openvswitch/python/* \ + $RPM_BUILD_ROOT%{python2_sitelib} +cp -a $RPM_BUILD_ROOT/%{_datadir}/openvswitch/python/ovs \ + $RPM_BUILD_ROOT%{python3_sitelib} +rm -rf $RPM_BUILD_ROOT/%{_datadir}/openvswitch/python/ -install -d -m 0755 $RPM_BUILD_ROOT%{python_sitelib} -mv $RPM_BUILD_ROOT/%{_datadir}/openvswitch/python/* $RPM_BUILD_ROOT%{python_sitelib} -rmdir $RPM_BUILD_ROOT/%{_datadir}/openvswitch/python/ +install -d -m 0755 $RPM_BUILD_ROOT/%{_sharedstatedir}/openvswitch -mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} -install -p -m 0644 %{SOURCE9} $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version} +install -d -m 0755 $RPM_BUILD_ROOT%{_prefix}/lib/firewalld/services/ +install -p -m 0644 rhel/usr_lib_firewalld_services_ovn-central-firewall-service.xml \ + $RPM_BUILD_ROOT%{_prefix}/lib/firewalld/services/ovn-central-firewall-service.xml +install -p -m 0644 rhel/usr_lib_firewalld_services_ovn-host-firewall-service.xml \ + $RPM_BUILD_ROOT%{_prefix}/lib/firewalld/services/ovn-host-firewall-service.xml + +install -d -m 0755 $RPM_BUILD_ROOT%{_prefix}/lib/ocf/resource.d/ovn +ln -s %{_datadir}/openvswitch/scripts/ovndb-servers.ocf \ + $RPM_BUILD_ROOT%{_prefix}/lib/ocf/resource.d/ovn/ovndb-servers + +touch $RPM_BUILD_ROOT%{_sysconfdir}/openvswitch/conf.db +touch $RPM_BUILD_ROOT%{_sysconfdir}/openvswitch/system-id.conf + +# remove unpackaged files +rm -f $RPM_BUILD_ROOT/%{_bindir}/ovs-benchmark \ + $RPM_BUILD_ROOT/%{_bindir}/ovs-parse-backtrace \ + $RPM_BUILD_ROOT/%{_sbindir}/ovs-vlan-bug-workaround \ + $RPM_BUILD_ROOT/%{_mandir}/man1/ovs-benchmark.1* \ + $RPM_BUILD_ROOT/%{_mandir}/man8/ovs-vlan-bug-workaround.8* + +%check +%if %{with check} + if make check TESTSUITEFLAGS='%{_smp_mflags}' || + make check TESTSUITEFLAGS='--recheck'; then :; + else + cat tests/testsuite.log + exit 1 + fi +%endif -# Get rid of stuff we don't want to make RPM happy. -rm -f \ - $RPM_BUILD_ROOT%{_sbindir}/ovs-vlan-bug-workaround \ - $RPM_BUILD_ROOT%{_mandir}/man8/ovs-vlan-bug-workaround.8 \ - $RPM_BUILD_ROOT%{_sbindir}/ovs-brcompatd \ - $RPM_BUILD_ROOT%{_mandir}/man8/ovs-brcompatd.8 +%preun +%if 0%{?systemd_preun:1} + %systemd_preun %{name}.service +%else + if [ $1 -eq 0 ] ; then + # Package removal, not upgrade + /bin/systemctl --no-reload disable %{name}.service >/dev/null 2>&1 || : + /bin/systemctl stop %{name}.service >/dev/null 2>&1 || : + fi +%endif -desktop-file-install --dir=$RPM_BUILD_ROOT%{_datadir}/applications %{SOURCE6} +%preun ovn-central +%if 0%{?systemd_preun:1} + %systemd_preun ovn-northd.service +%else + if [ $1 -eq 0 ] ; then + # Package removal, not upgrade + /bin/systemctl --no-reload disable ovn-northd.service >/dev/null 2>&1 || : + /bin/systemctl stop ovn-northd.service >/dev/null 2>&1 || : + fi +%endif -%if ! %{with_ovsdbmonitor} -rm -f $RPM_BUILD_ROOT%{_bindir}/ovsdbmonitor -rm -f $RPM_BUILD_ROOT%{_mandir}/man1/ovsdbmonitor.1* -rm -rf $RPM_BUILD_ROOT%{_datadir}/ovsdbmonitor -rm -f $RPM_BUILD_ROOT%{_datadir}/applications/ovsdbmonitor.desktop -rm -rf $RPM_BUILD_ROOT%{_docdir}/ovsdbmonitor +%preun ovn-host +%if 0%{?systemd_preun:1} + %systemd_preun ovn-controller.service +%else + if [ $1 -eq 0 ] ; then + # Package removal, not upgrade + /bin/systemctl --no-reload disable ovn-controller.service >/dev/null 2>&1 || : + /bin/systemctl stop ovn-controller.service >/dev/null 2>&1 || : + fi %endif +%preun ovn-vtep +%if 0%{?systemd_preun:1} + %systemd_preun ovn-controller-vtep.service +%else + if [ $1 -eq 0 ] ; then + # Package removal, not upgrade + /bin/systemctl --no-reload disable ovn-controller-vtep.service >/dev/null 2>&1 || : + /bin/systemctl stop ovn-controller-vtep.service >/dev/null 2>&1 || : + fi +%endif %post +if [ $1 -eq 1 ]; then + getent passwd openvswitch >/dev/null || \ + useradd -r -d / -s /sbin/nologin -c "Open vSwitch Daemons" openvswitch + + sed -i 's:^#OVS_USER_ID=:OVS_USER_ID=:' /etc/sysconfig/openvswitch + + getent group hugetlbfs >/dev/null || \ + groupadd hugetlbfs + usermod -a -G hugetlbfs openvswitch + sed -i \ + 's@OVS_USER_ID="openvswitch:openvswitch"@OVS_USER_ID="openvswitch:hugetlbfs"@'\ + /etc/sysconfig/openvswitch + + # In the case of upgrade, this is not needed. + chown -R openvswitch:openvswitch /etc/openvswitch +fi + %if 0%{?systemd_post:1} %systemd_post %{name}.service %else @@ -175,25 +466,65 @@ rm -rf $RPM_BUILD_ROOT%{_docdir}/ovsdbmonitor fi %endif -# Package with native systemd unit file is installed for the first time -%triggerun -- %{name} < 1.9.0-1 -# Save the current service runlevel info -# User must manually run systemd-sysv-convert --apply openvswitch -# to migrate them to systemd targets -/usr/bin/systemd-sysv-convert --save %{name} >/dev/null 2>&1 ||: +%post ovn-central +%if 0%{?systemd_post:1} + %systemd_post ovn-northd.service +%else + # Package install, not upgrade + if [ $1 -eq 1 ]; then + /bin/systemctl daemon-reload >dev/null || : + fi +%endif -# Run these because the SysV package being removed won't do them -/sbin/chkconfig --del %{name} >/dev/null 2>&1 || : -/bin/systemctl try-restart %{name}.service >/dev/null 2>&1 || : +%post ovn-host +%if 0%{?systemd_post:1} + %systemd_post ovn-controller.service +%else + # Package install, not upgrade + if [ $1 -eq 1 ]; then + /bin/systemctl daemon-reload >dev/null || : + fi +%endif -%preun -%if 0%{?systemd_preun:1} - %systemd_preun %{name}.service +%post ovn-vtep +%if 0%{?systemd_post:1} + %systemd_post ovn-controller-vtep.service %else - if [ $1 -eq 0 ] ; then - # Package removal, not upgrade - /bin/systemctl --no-reload disable %{name}.service >/dev/null 2>&1 || : - /bin/systemctl stop %{name}.service >/dev/null 2>&1 || : + # Package install, not upgrade + if [ $1 -eq 1 ]; then + /bin/systemctl daemon-reload >dev/null || : + fi +%endif +%postun ovn-central +%if 0%{?systemd_postun_with_restart:1} + %systemd_postun_with_restart ovn-northd.service +%else + /bin/systemctl daemon-reload >/dev/null 2>&1 || : + if [ "$1" -ge "1" ] ; then + # Package upgrade, not uninstall + /bin/systemctl try-restart ovn-northd.service >/dev/null 2>&1 || : + fi +%endif + +%postun ovn-host +%if 0%{?systemd_postun_with_restart:1} + %systemd_postun_with_restart ovn-controller.service +%else + /bin/systemctl daemon-reload >/dev/null 2>&1 || : + if [ "$1" -ge "1" ] ; then + # Package upgrade, not uninstall + /bin/systemctl try-restart ovn-controller.service >/dev/null 2>&1 || : + fi +%endif + +%postun ovn-vtep +%if 0%{?systemd_postun_with_restart:1} + %systemd_postun_with_restart ovn-controller-vtep.service +%else + /bin/systemctl daemon-reload >/dev/null 2>&1 || : + if [ "$1" -ge "1" ] ; then + # Package upgrade, not uninstall + /bin/systemctl try-restart ovn-controller-vtep.service >/dev/null 2>&1 || : fi %endif @@ -208,37 +539,89 @@ rm -rf $RPM_BUILD_ROOT%{_docdir}/ovsdbmonitor fi %endif + +%files -n python2-openvswitch +%{python2_sitelib}/ovs +%doc COPYING + +%files -n python3-openvswitch +%{python3_sitelib}/ovs +%doc COPYING + +%files test +%{_bindir}/ovs-test +%{_bindir}/ovs-vlan-test +%{_bindir}/ovs-l3ping +%{_bindir}/ovs-pcap +%{_bindir}/ovs-tcpdump +%{_bindir}/ovs-tcpundump +%{_mandir}/man8/ovs-test.8* +%{_mandir}/man8/ovs-vlan-test.8* +%{_mandir}/man8/ovs-l3ping.8* +%{_mandir}/man1/ovs-pcap.1* +%{_mandir}/man8/ovs-tcpdump.8* +%{_mandir}/man1/ovs-tcpundump.1* +%{python2_sitelib}/ovstest + +%files devel +%{_libdir}/*.a +%{_libdir}/*.la +%{_libdir}/pkgconfig/*.pc +%{_includedir}/openvswitch/* +%{_includedir}/openflow/* +%{_includedir}/ovn/* + %files -%{_sysconfdir}/openvswitch/ -%config(noreplace) %{_sysconfdir}/logrotate.d/openvswitch +%defattr(-,openvswitch,openvswitch) +%dir %{_sysconfdir}/openvswitch +%{_sysconfdir}/openvswitch/default.conf +%config %ghost %{_sysconfdir}/openvswitch/conf.db +%config %ghost %{_sysconfdir}/openvswitch/system-id.conf %config(noreplace) %{_sysconfdir}/sysconfig/openvswitch +%config(noreplace) %{_sysconfdir}/logrotate.d/openvswitch +%defattr(-,root,root) +%{_sysconfdir}/bash_completion.d/ovs-appctl-bashcomp.bash +%{_sysconfdir}/bash_completion.d/ovs-vsctl-bashcomp.bash +%{_unitdir}/openvswitch.service +%{_unitdir}/ovs-vswitchd.service +%{_unitdir}/ovsdb-server.service +%{_unitdir}/ovs-delete-transient-ports.service +%{_datadir}/openvswitch/scripts/openvswitch.init %{_sysconfdir}/sysconfig/network-scripts/ifup-ovs %{_sysconfdir}/sysconfig/network-scripts/ifdown-ovs -%{_unitdir}/openvswitch.service -%{_unitdir}/openvswitch-nonetwork.service +%{_datadir}/openvswitch/bugtool-plugins/ +%{_datadir}/openvswitch/scripts/ovs-bugtool-* +%{_datadir}/openvswitch/scripts/ovs-check-dead-ifs +%{_datadir}/openvswitch/scripts/ovs-lib +%{_datadir}/openvswitch/scripts/ovs-save +%{_datadir}/openvswitch/scripts/ovs-vtep +%{_datadir}/openvswitch/scripts/ovs-ctl +%config %{_datadir}/openvswitch/vswitch.ovsschema +%config %{_datadir}/openvswitch/vtep.ovsschema %{_bindir}/ovs-appctl -%{_bindir}/ovs-benchmark +%{_bindir}/ovs-docker %{_bindir}/ovs-dpctl %{_bindir}/ovs-dpctl-top %{_bindir}/ovs-ofctl -%{_bindir}/ovs-pcap -%{_bindir}/ovs-pki -%{_bindir}/ovs-tcpundump %{_bindir}/ovs-vsctl %{_bindir}/ovsdb-client %{_bindir}/ovsdb-tool -%{_bindir}/ovs-parse-backtrace -# ovs-bugtool is LGPLv2+ +%{_bindir}/ovs-testcontroller +%{_bindir}/ovs-pki +%{_bindir}/vtep-ctl %{_sbindir}/ovs-bugtool %{_sbindir}/ovs-vswitchd %{_sbindir}/ovsdb-server -%{_mandir}/man1/ovs-benchmark.1* -%{_mandir}/man1/ovs-pcap.1* -%{_mandir}/man1/ovs-tcpundump.1* %{_mandir}/man1/ovsdb-client.1* %{_mandir}/man1/ovsdb-server.1* %{_mandir}/man1/ovsdb-tool.1* +%{_mandir}/man5/ovsdb.5* %{_mandir}/man5/ovs-vswitchd.conf.db.5* +%{_mandir}/man5/vtep.5* +%{_mandir}/man7/ovsdb-server.7* +%{_mandir}/man7/ovsdb.7* +%{_mandir}/man7/ovs-fields.7* +%{_mandir}/man8/vtep-ctl.8* %{_mandir}/man8/ovs-appctl.8* %{_mandir}/man8/ovs-bugtool.8* %{_mandir}/man8/ovs-ctl.8* @@ -249,64 +632,228 @@ rm -rf $RPM_BUILD_ROOT%{_docdir}/ovsdbmonitor %{_mandir}/man8/ovs-vsctl.8* %{_mandir}/man8/ovs-vswitchd.8* %{_mandir}/man8/ovs-parse-backtrace.8* -# /usr/share/openvswitch/bugtool-plugins and -# /usr/share/openvswitch/scripts/ovs-bugtool* are LGPLv2+ -%{_datadir}/openvswitch/ -%{_sharedstatedir}/openvswitch -%{_docdir}/%{name}-%{version}/README.RHEL -# see COPYING for full licensing details -%doc COPYING DESIGN INSTALL.SSL NOTICE README WHY-OVS - -%files -n python-openvswitch -%{python_sitelib}/ovs -%doc COPYING +%{_mandir}/man8/ovs-testcontroller.8* +%{_udevrulesdir}/91-vfio.rules +%doc COPYING NOTICE README.rst NEWS rhel/README.RHEL.rst +/var/lib/openvswitch +%attr(755,-,-) /var/log/openvswitch +%ghost %attr(755,root,root) %{_rundir}/openvswitch + +%files ovn-docker +%{_bindir}/ovn-docker-overlay-driver +%{_bindir}/ovn-docker-underlay-driver + +%files ovn-common +%{_bindir}/ovn-detrace +%{_bindir}/ovn-nbctl +%{_bindir}/ovn-sbctl +%{_bindir}/ovn-trace +%{_datadir}/openvswitch/scripts/ovn-ctl +%{_datadir}/openvswitch/scripts/ovndb-servers.ocf +%{_datadir}/openvswitch/scripts/ovn-bugtool-nbctl-show +%{_datadir}/openvswitch/scripts/ovn-bugtool-sbctl-lflow-list +%{_datadir}/openvswitch/scripts/ovn-bugtool-sbctl-show +%{_mandir}/man1/ovn-detrace.1* +%{_mandir}/man8/ovn-ctl.8* +%{_mandir}/man8/ovn-nbctl.8* +%{_mandir}/man8/ovn-trace.8* +%{_mandir}/man7/ovn-architecture.7* +%{_mandir}/man8/ovn-sbctl.8* +%{_mandir}/man5/ovn-nb.5* +%{_mandir}/man5/ovn-sb.5* +%{_prefix}/lib/ocf/resource.d/ovn/ovndb-servers + +%files ovn-central +%{_bindir}/ovn-northd +%{_mandir}/man8/ovn-northd.8* +%config %{_datadir}/openvswitch/ovn-nb.ovsschema +%config %{_datadir}/openvswitch/ovn-sb.ovsschema +%{_unitdir}/ovn-northd.service +%{_prefix}/lib/firewalld/services/ovn-central-firewall-service.xml + +%files ovn-host +%{_bindir}/ovn-controller +%{_mandir}/man8/ovn-controller.8* +%{_unitdir}/ovn-controller.service +%{_prefix}/lib/firewalld/services/ovn-host-firewall-service.xml + +%files ovn-vtep +%{_bindir}/ovn-controller-vtep +%{_mandir}/man8/ovn-controller-vtep.8* +%{_unitdir}/ovn-controller-vtep.service -%if %{with_ovsdbmonitor} -%files -n ovsdbmonitor -%{_bindir}/ovsdbmonitor -%{_mandir}/man1/ovsdbmonitor.1* -%{_datadir}/ovsdbmonitor -%{_datadir}/applications/ovsdbmonitor.desktop -%doc ovsdb/ovsdbmonitor/COPYING -%endif +%changelog +* Tue Feb 20 2018 Timothy Redaelli - 2.9.0-1 +- Update to Open vSwitch 2.9.0 and DPDK 17.11 +- Align with RHEL "Fast Datapath" channel 2.9.0-1 -%files test -%{_bindir}/ovs-test -%{_bindir}/ovs-vlan-test -%{_bindir}/ovs-l3ping -%{_mandir}/man8/ovs-test.8* -%{_mandir}/man8/ovs-vlan-test.8* -%{_mandir}/man8/ovs-l3ping.8* -%{python_sitelib}/ovstest +* Fri Feb 09 2018 Aaron Conole - 2.8.1-2 +- Update to include 94cd8383e297 and 951d79e638ec from upstream -%files controller -%{_bindir}/ovs-controller -%{_mandir}/man8/ovs-controller.8* +* Thu Feb 08 2018 Fedora Release Engineering - 2.8.1-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild +* Mon Oct 02 2017 Timothy Redaelli - 2.8.1-1 +- Update to Open vSwitch 2.8.1 -%changelog -* Fri Jan 24 2014 Daniel Mach - 2.0.0-7 -- Mass rebuild 2014-01-24 +* Tue Sep 19 2017 Timothy Redaelli - 2.8.0-2 +- Update DPDK to 17.05.2 (bugfixes) + +* Mon Sep 04 2017 Timothy Redaelli - 2.8.0-1 +- Update to Open vSwitch 2.8.0 and DPDK 17.05.1 (#1487971) + +* Thu Aug 03 2017 Fedora Release Engineering - 2.7.2-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild + +* Thu Jul 27 2017 Fedora Release Engineering - 2.7.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild + +* Wed Jul 19 2017 Timothy Redaelli - 2.7.2-1 +- Update to Open vSwitch 2.7.2 +- Add a symlink of the OCF script in the OCF resources folder + +* Fri Jul 14 2017 Timothy Redaelli - 2.7.1-2 +- Backport fix for CVE-2017-9263 (#1457327) +- Backport fix for CVE-2017-9265 (#1457335) + +* Thu Jul 06 2017 Timothy Redaelli - 2.7.1-1 +- Updated to Open vSwitch 2.7.1 and DPDK 16.11.2 (#1468234) + +* Tue Jun 13 2017 Timothy Redaelli - 2.7.0-5 +- Backport fix for CVE-2017-9264 (#1457329) + +* Wed Jun 07 2017 Timothy Redaelli - 2.7.0-4 +- Remove PYTHONCOERCECLOCALE=0 workaround and backport upstream patch (#1454364) + +* Wed May 31 2017 Timothy Redaelli - 2.7.0-3 +- Backport fix for CVE-2017-9214 (#1456797) +- Use %%autosetup instead of %%setup + +* Mon May 29 2017 Timothy Redaelli - 2.7.0-2 +- Install OVN firewalld rules + +* Thu May 18 2017 Timothy Redaelli - 2.7.0-1 +- Link statically with DPDK 16.11.1 (#1451476) +- Build OVS without DPDK support on all architectures not supported by DPDK +- Added python3-six to BuildRequires in order to launch python3 tests too +- Export PYTHONCOERCECLOCALE=0 in order to workaround an incompatibility + between Python 3.6.0 (with PEP 538) on Fedora 26+ and testsuite (#1454364) +- Disable tests on armv7hl + +* Fri Feb 24 2017 Timothy Redaelli - 2.7.0-0 +- Updated to Open vSwitch 2.7.0 (#1426596) +- Enable DPDK support + +* Thu Feb 16 2017 Timothy Redaelli - 2.6.1-2 +- Added python3-openvswitch and renamed python-openvswitch to python2-openvswitch + +* Sat Feb 11 2017 Fedora Release Engineering - 2.6.1-1 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild + +* Thu Nov 24 2016 Flavio Leitner - 2.6.1-0 +- Updated to Open vSwitch 2.6.1 + +* Tue Nov 01 2016 Aaron Conole - 2.6.0-0 +- Update to Open vSwitch 2.6.0 +- Enable OVN + +* Wed Aug 24 2016 Dan HorĂ¡k - 2.5.0-4 +- don't run the test-suite for big endian arches + +* Tue Jul 19 2016 Fedora Release Engineering - 2.5.0-3 +- https://fedoraproject.org/wiki/Changes/Automatic_Provides_for_Python_RPM_Packages -* Wed Jan 15 2014 Flavio Leitner - 2.0.0-6 +* Tue Mar 15 2016 Panu Matilainen - 2.5.0-2 +- Remove unpackaged files instead of excluding (#1281913) + +* Wed Mar 02 2016 Panu Matilainen - 2.5.0-1 +- Update to 2.5.0 (#1312617) + +* Thu Feb 04 2016 Fedora Release Engineering - 2.4.0-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild + +* Mon Aug 24 2015 Flavio Leitner - 2.4.0-1 +- updated to 2.4.0 (#1256171) + +* Thu Jun 18 2015 Flavio Leitner - 2.3.2-1 +- updated to 2.3.2 (#1233442) +- fixed to own /var/run/openvswitch directory (#1200887) + +* Thu Jun 18 2015 Fedora Release Engineering - 2.3.1-4.git20150327 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild + +* Fri Mar 27 2015 Flavio Leitner - 2.3.1-3.git20150327 +- updated to 2.3.1-git4750c96 +- commented out kernel requires +- added requires to procps-ng (testsuite #84) + +* Wed Jan 14 2015 Flavio Leitner - 2.3.1-2.git20150113 +- updated to 2.3.1-git3282e51 + +* Fri Dec 05 2014 Flavio Leitner - 2.3.1-1 +- updated to 2.3.1 + +* Fri Nov 07 2014 Flavio Leitner - 2.3.0-3.git20141107 +- updated to 2.3.0-git39ebb203 + +* Thu Oct 23 2014 Flavio Leitner - 2.3.0-2 +- fixed to own conf.db and system-id.conf in /etc/openvswitch. + (#1132707) + +* Tue Aug 19 2014 Flavio Leitner - 2.3.0-1 +- updated to 2.3.0 + +* Sun Aug 17 2014 Fedora Release Engineering - 2.1.2-5 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild + +* Thu Jun 12 2014 Flavio Leitner - 2.1.2-4 +- moved README.RHEL to be in the standard doc dir. +- added FAQ and NEWS files to the doc list. +- excluded PPC arch + +* Thu Jun 12 2014 Flavio Leitner - 2.1.2-3 +- removed ovsdbmonitor packaging + +* Sat Jun 07 2014 Fedora Release Engineering - 2.1.2-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild + +* Tue Mar 25 2014 Flavio Leitner - 2.1.2-1 +- updated to 2.1.2 + +* Tue Mar 25 2014 Flavio Leitner - 2.1.0-1 +- updated to 2.1.0 +- obsoleted openvswitch-controller package +- requires kernel 3.15.0-0 or newer + (kernel commit 4f647e0a3c37b8d5086214128614a136064110c3 + openvswitch: fix a possible deadlock and lockdep warning) +- ovs-lib: allow non-root users to check service status + (upstream commit 691e47554dd03dd6492e00bab5bd6d215f5cbd4f) +- rhel: Add Patch Port support to initscripts + (upstream commit e2bcc8ef49f5e51f48983b87ab1010f0f9ab1454) + +* Mon Jan 27 2014 Flavio Leitner - 2.0.1-1 +- updated to 2.0.1 + +* Mon Jan 27 2014 Flavio Leitner - 2.0.0-6 +- create a -devel package + (from Chris Wright ) + +* Wed Jan 15 2014 Flavio Leitner - 2.0.0-5 - Enable DHCP support for internal ports (upstream commit 490db96efaf89c63656b192d5ca287b0908a6c77) -* Wed Jan 15 2014 Flavio Leitner - 2.0.0-5 +* Wed Jan 15 2014 Flavio Leitner - 2.0.0-4 - disabled ovsdbmonitor packaging (upstream has removed the component) -* Wed Jan 15 2014 Flavio Leitner - 2.0.0-4 +* Wed Jan 15 2014 Flavio Leitner - 2.0.0-3 - fedora package: fix systemd ordering and deps. (upstream commit b49c106ef00438b1c59876dad90d00e8d6e7b627) -* Wed Jan 15 2014 Flavio Leitner - 2.0.0-3 +* Wed Jan 15 2014 Flavio Leitner - 2.0.0-2 - util: use gcc builtins to better check array sizes (upstream commit 878f1972909b33f27b32ad2ded208eb465b98a9b) -* Fri Dec 27 2013 Daniel Mach - 2.0.0-2 -- Mass rebuild 2013-12-27 - * Mon Oct 28 2013 Flavio Leitner - 2.0.0-1 - updated to 2.0.0 (#1023184)