From patchwork Thu Oct 5 15:05:58 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilya Maximets X-Patchwork-Id: 821874 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=openvswitch.org (client-ip=140.211.169.12; helo=mail.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=) Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3y7GPS2Z3Mz9t2V for ; Fri, 6 Oct 2017 02:08:44 +1100 (AEDT) Received: from mail.linux-foundation.org (localhost [127.0.0.1]) by mail.linuxfoundation.org (Postfix) with ESMTP id 34D32A73; Thu, 5 Oct 2017 15:06:31 +0000 (UTC) X-Original-To: ovs-dev@openvswitch.org Delivered-To: ovs-dev@mail.linuxfoundation.org Received: from smtp1.linuxfoundation.org (smtp1.linux-foundation.org [172.17.192.35]) by mail.linuxfoundation.org (Postfix) with ESMTPS id 1B393A59 for ; Thu, 5 Oct 2017 15:06:29 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by smtp1.linuxfoundation.org (Postfix) with ESMTPS id CA4B53F2 for ; Thu, 5 Oct 2017 15:06:27 +0000 (UTC) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20171005150625euoutp01c6698837f98815b047f2983423f69122~qtPQDG-un1770317703euoutp01B; Thu, 5 Oct 2017 15:06:25 +0000 (GMT) Received: from eusmges5.samsung.com (unknown [203.254.199.245]) by eucas1p1.samsung.com (KnoxPortal) with ESMTP id 20171005150624eucas1p10aa2be5ab18de7f9148908294fd9486f~qtPPE8Eet2252922529eucas1p1F; Thu, 5 Oct 2017 15:06:24 +0000 (GMT) Received: from eucas1p2.samsung.com ( [182.198.249.207]) by eusmges5.samsung.com (EUCPMTA) with SMTP id B7.27.12743.07A46D95; Thu, 5 Oct 2017 16:06:24 +0100 (BST) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20171005150623eucas1p231b1ff9cd68ac1a59ae870c6bf7fcaf4~qtPOdzsBo0934209342eucas1p2Y; Thu, 5 Oct 2017 15:06:23 +0000 (GMT) X-AuditID: cbfec7f5-f79d06d0000031c7-32-59d64a704a8e Received: from eusync2.samsung.com ( [203.254.199.212]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id 6E.02.18832.F6A46D95; Thu, 5 Oct 2017 16:06:23 +0100 (BST) Received: from imaximets.rnd.samsung.ru ([106.109.129.180]) by eusync2.samsung.com (Oracle Communications Messaging Server 7.0.5.31.0 64bit (built May 5 2014)) with ESMTPA id <0OXC0096ZVA4TQ80@eusync2.samsung.com>; Thu, 05 Oct 2017 16:06:23 +0100 (BST) From: Ilya Maximets To: ovs-dev@openvswitch.org, Bhanuprakash Bodireddy Date: Thu, 05 Oct 2017 18:05:58 +0300 Message-id: <1507215962-17692-4-git-send-email-i.maximets@samsung.com> X-Mailer: git-send-email 2.7.4 In-reply-to: <1507215962-17692-1-git-send-email-i.maximets@samsung.com> X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFrrMIsWRmVeSWpSXmKPExsWy7djP87oFXtciDR73s1us/sVpsfOZskVL /0xmi+cvFjJb3Lnyk81i2ufb7BZX2n+yWxz5fprRYu2hD+wWcz89Z3Tg8vj19Sqbx+I9L5k8 nt38z+jxfh+Q27dlFaPHu/lv2QLYorhsUlJzMstSi/TtErgyJj/qYimYXV5xp2sucwPjxPAu Rk4OCQETiSOPulkgbDGJC/fWs3UxcnEICSxllFjde5YJwvnMKLGraTU7TMfq58ugEssYJd5u 3sUI4TQzSew608sIUsUmoCNxavURMFtEIELiwfdZYN3MAieZJJ7NDQWxhQUsJJp7VoLFWQRU Ja5OXgpWzyvgJrHn5lWobXISN891MoPYnALuEhd2fAZbJiGwhk3i/uWHzBBFLhLnV11jhbCF JV4d3wLVLCPR2XGQCaKhmVGiYdUlqO4JjBJfmpczQVTZS5y6eZUJ4jw+iUnbpgNN5QCK80p0 tAlBlHhItL6bxgZhO0rc3f8D6uVZjBKX7j1hnsAovYCRYRWjSGppcW56arGpXnFibnFpXrpe cn7uJkZgVJ/+d/zrDsalx6wOMQpwMCrx8DI8uBIpxJpYVlyZe4hRgoNZSYS30fVapBBvSmJl VWpRfnxRaU5q8SFGaQ4WJXFe26i2SCGB9MSS1OzU1ILUIpgsEwenVAOj1uwPU369Vzxkvt09 qftLVVBUyIIVkm4Ta5xS3s8VVzunknVW/WAkq6vgBBcRy4XRpb19jsfEGCuK7y4x2CmWdoF1 X+a2rwcTvpTvmcex7t/+cGajq5pnfs1YFjrV6P9pJb01IvO2F8Rdv5Pxgy9zG1vktTsZk2+v PP9i196eKyx65rOUmiYxKbEUZyQaajEXFScCAO/ELWTmAgAA X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrGLMWRmVeSWpSXmKPExsVy+t/xK7r5XtciDea91rJY/YvTYuczZYuW /pnMFs9fLGS2uHPlJ5vFtM+32S2utP9ktzjy/TSjxdpDH9gt5n56zujA5fHr61U2j8V7XjJ5 PLv5n9Hj/T4gt2/LKkaPd/PfsgWwRXHZpKTmZJalFunbJXBlTH7UxVIwu7ziTtdc5gbGieFd jJwcEgImEqufL2OCsMUkLtxbzwZiCwksYZR4vUeoi5ELyG5lknjz9A0zSIJNQEfi1OojjCC2 iECERMuc9YwgRcwCp5kk+hefZwVJCAtYSDT3rGQHsVkEVCWuTl4K1sAr4Cax5+ZVdohtchI3 z3WCDeUUcJe4sOMzI8RmN4npi9qYJjDyLmBkWMUoklpanJueW2yoV5yYW1yal66XnJ+7iREY etuO/dy8g/HSxuBDjAIcjEo8vB5br0YKsSaWFVfmHmKU4GBWEuFtdL0WKcSbklhZlVqUH19U mpNafIhRmoNFSZy3d8/qSCGB9MSS1OzU1ILUIpgsEwenVAOjguiXjW0BSbHXYphcP35cZnhk eVeYl+IcUdMK668etVVnkrb/Xzvh7MO9mhXBcn2GCuvbk/9eZrK41n7t0KKH5w5vUJu99GrZ q8UHn+ok/ym+OkmoXGe+mYNcco39jMWzJbd8lVLaZdFlmWUcf/hezavAHR53NstJzL7nKDJd qMcp2uhhAqOgEktxRqKhFnNRcSIAg33rUzkCAAA= X-CMS-MailID: 20171005150623eucas1p231b1ff9cd68ac1a59ae870c6bf7fcaf4 X-Msg-Generator: CA X-Sender-IP: 182.198.249.179 X-Local-Sender: =?utf-8?q?Ilya_Maximets=1BSRR-Virtualization_Lab=1B?= =?utf-8?b?7IK87ISx7KCE7J6QG0xlYWRpbmcgRW5naW5lZXI=?= X-Global-Sender: =?utf-8?q?Ilya_Maximets=1BSRR-Virtualization_Lab=1BSamsu?= =?utf-8?q?ng_Electronics=1BLeading_Engineer?= X-Sender-Code: =?utf-8?q?C10=1BCISHQ=1BC10GD01GD010154?= CMS-TYPE: 201P X-CMS-RootMailID: 20171005150623eucas1p231b1ff9cd68ac1a59ae870c6bf7fcaf4 X-RootMTR: 20171005150623eucas1p231b1ff9cd68ac1a59ae870c6bf7fcaf4 References: <1507215962-17692-1-git-send-email-i.maximets@samsung.com> X-Spam-Status: No, score=-5.0 required=5.0 tests=RCVD_IN_DNSWL_HI, RP_MATCHES_RCVD autolearn=disabled version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on smtp1.linux-foundation.org Cc: Heetae Ahn , Ilya Maximets Subject: [ovs-dev] [PATCH v4 3/7] netdev: Remove unused may_steal. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.12 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: ovs-dev-bounces@openvswitch.org Errors-To: ovs-dev-bounces@openvswitch.org Not needed anymore because 'may_steal' already handled on dpif-netdev layer and always true; Signed-off-by: Ilya Maximets Acked-by: Eelco Chaudron --- lib/dpif-netdev.c | 2 +- lib/netdev-bsd.c | 4 ++-- lib/netdev-dpdk.c | 65 +++++++++++++++++++++------------------------------ lib/netdev-dummy.c | 4 ++-- lib/netdev-linux.c | 4 ++-- lib/netdev-provider.h | 7 +++--- lib/netdev.c | 12 ++++------ lib/netdev.h | 2 +- 8 files changed, 42 insertions(+), 58 deletions(-) diff --git a/lib/dpif-netdev.c b/lib/dpif-netdev.c index c6f5c23..166b73a 100644 --- a/lib/dpif-netdev.c +++ b/lib/dpif-netdev.c @@ -3251,7 +3251,7 @@ dp_netdev_pmd_flush_output_on_port(struct dp_netdev_pmd_thread *pmd, tx_qid = pmd->static_tx_qid; } - netdev_send(p->port->netdev, tx_qid, &p->output_pkts, true, dynamic_txqs); + netdev_send(p->port->netdev, tx_qid, &p->output_pkts, dynamic_txqs); dp_packet_batch_init(&p->output_pkts); } diff --git a/lib/netdev-bsd.c b/lib/netdev-bsd.c index 8a4cdb3..4f243b5 100644 --- a/lib/netdev-bsd.c +++ b/lib/netdev-bsd.c @@ -680,7 +680,7 @@ netdev_bsd_rxq_drain(struct netdev_rxq *rxq_) */ static int netdev_bsd_send(struct netdev *netdev_, int qid OVS_UNUSED, - struct dp_packet_batch *batch, bool may_steal, + struct dp_packet_batch *batch, bool concurrent_txq OVS_UNUSED) { struct netdev_bsd *dev = netdev_bsd_cast(netdev_); @@ -728,7 +728,7 @@ netdev_bsd_send(struct netdev *netdev_, int qid OVS_UNUSED, } ovs_mutex_unlock(&dev->mutex); - dp_packet_delete_batch(batch, may_steal); + dp_packet_delete_batch(batch, true); return error; } diff --git a/lib/netdev-dpdk.c b/lib/netdev-dpdk.c index c60f46f..011c6f7 100644 --- a/lib/netdev-dpdk.c +++ b/lib/netdev-dpdk.c @@ -279,7 +279,7 @@ struct dpdk_qos_ops { * For all QoS implementations it should always be non-null. */ int (*qos_run)(struct qos_conf *qos_conf, struct rte_mbuf **pkts, - int pkt_cnt, bool may_steal); + int pkt_cnt); }; /* dpdk_qos_ops for each type of user space QoS implementation */ @@ -1522,8 +1522,7 @@ netdev_dpdk_policer_pkt_handle(struct rte_meter_srtcm *meter, static int netdev_dpdk_policer_run(struct rte_meter_srtcm *meter, - struct rte_mbuf **pkts, int pkt_cnt, - bool may_steal) + struct rte_mbuf **pkts, int pkt_cnt) { int i = 0; int cnt = 0; @@ -1539,9 +1538,7 @@ netdev_dpdk_policer_run(struct rte_meter_srtcm *meter, } cnt++; } else { - if (may_steal) { - rte_pktmbuf_free(pkt); - } + rte_pktmbuf_free(pkt); } } @@ -1550,13 +1547,12 @@ netdev_dpdk_policer_run(struct rte_meter_srtcm *meter, static int ingress_policer_run(struct ingress_policer *policer, struct rte_mbuf **pkts, - int pkt_cnt, bool may_steal) + int pkt_cnt) { int cnt = 0; rte_spinlock_lock(&policer->policer_lock); - cnt = netdev_dpdk_policer_run(&policer->in_policer, pkts, - pkt_cnt, may_steal); + cnt = netdev_dpdk_policer_run(&policer->in_policer, pkts, pkt_cnt); rte_spinlock_unlock(&policer->policer_lock); return cnt; @@ -1660,7 +1656,7 @@ netdev_dpdk_vhost_rxq_recv(struct netdev_rxq *rxq, dropped = nb_rx; nb_rx = ingress_policer_run(policer, (struct rte_mbuf **) batch->packets, - nb_rx, true); + nb_rx); dropped -= nb_rx; } @@ -1699,7 +1695,7 @@ netdev_dpdk_rxq_recv(struct netdev_rxq *rxq, struct dp_packet_batch *batch) dropped = nb_rx; nb_rx = ingress_policer_run(policer, (struct rte_mbuf **) batch->packets, - nb_rx, true); + nb_rx); dropped -= nb_rx; } @@ -1717,14 +1713,13 @@ netdev_dpdk_rxq_recv(struct netdev_rxq *rxq, struct dp_packet_batch *batch) } static inline int -netdev_dpdk_qos_run(struct netdev_dpdk *dev, struct rte_mbuf **pkts, - int cnt, bool may_steal) +netdev_dpdk_qos_run(struct netdev_dpdk *dev, struct rte_mbuf **pkts, int cnt) { struct qos_conf *qos_conf = ovsrcu_get(struct qos_conf *, &dev->qos_conf); if (qos_conf) { rte_spinlock_lock(&qos_conf->lock); - cnt = qos_conf->ops->qos_run(qos_conf, pkts, cnt, may_steal); + cnt = qos_conf->ops->qos_run(qos_conf, pkts, cnt); rte_spinlock_unlock(&qos_conf->lock); } @@ -1797,8 +1792,8 @@ __netdev_dpdk_vhost_send(struct netdev *netdev, int qid, rte_spinlock_lock(&dev->tx_q[qid].tx_lock); cnt = netdev_dpdk_filter_packet_len(dev, cur_pkts, cnt); - /* Check has QoS has been configured for the netdev */ - cnt = netdev_dpdk_qos_run(dev, cur_pkts, cnt, true); + /* Check if QoS has been configured for the netdev. */ + cnt = netdev_dpdk_qos_run(dev, cur_pkts, cnt); dropped = total_pkts - cnt; do { @@ -1847,18 +1842,17 @@ dpdk_do_tx_copy(struct netdev *netdev, int qid, struct dp_packet_batch *batch) struct rte_mbuf *pkts[PKT_ARRAY_SIZE]; uint32_t cnt = batch_cnt; uint32_t dropped = 0; + uint32_t txcnt = 0; if (dev->type != DPDK_DEV_VHOST) { /* Check if QoS has been configured for this netdev. */ cnt = netdev_dpdk_qos_run(dev, (struct rte_mbuf **) batch->packets, - batch_cnt, false); + batch_cnt); dropped += batch_cnt - cnt; } dp_packet_batch_apply_cutlen(batch); - uint32_t txcnt = 0; - for (uint32_t i = 0; i < cnt; i++) { struct dp_packet *packet = batch->packets[i]; uint32_t size = dp_packet_size(packet); @@ -1904,12 +1898,12 @@ dpdk_do_tx_copy(struct netdev *netdev, int qid, struct dp_packet_batch *batch) static int netdev_dpdk_vhost_send(struct netdev *netdev, int qid, struct dp_packet_batch *batch, - bool may_steal, bool concurrent_txq OVS_UNUSED) + bool concurrent_txq OVS_UNUSED) { - if (OVS_UNLIKELY(!may_steal || batch->packets[0]->source != DPBUF_DPDK)) { + if (OVS_UNLIKELY(batch->packets[0]->source != DPBUF_DPDK)) { dpdk_do_tx_copy(netdev, qid, batch); - dp_packet_delete_batch(batch, may_steal); + dp_packet_delete_batch(batch, true); } else { dp_packet_batch_apply_cutlen(batch); __netdev_dpdk_vhost_send(netdev, qid, batch->packets, batch->count); @@ -1919,11 +1913,11 @@ netdev_dpdk_vhost_send(struct netdev *netdev, int qid, static inline void netdev_dpdk_send__(struct netdev_dpdk *dev, int qid, - struct dp_packet_batch *batch, bool may_steal, + struct dp_packet_batch *batch, bool concurrent_txq) { if (OVS_UNLIKELY(!(dev->flags & NETDEV_UP))) { - dp_packet_delete_batch(batch, may_steal); + dp_packet_delete_batch(batch, true); return; } @@ -1932,12 +1926,11 @@ netdev_dpdk_send__(struct netdev_dpdk *dev, int qid, rte_spinlock_lock(&dev->tx_q[qid].tx_lock); } - if (OVS_UNLIKELY(!may_steal || - batch->packets[0]->source != DPBUF_DPDK)) { + if (OVS_UNLIKELY(batch->packets[0]->source != DPBUF_DPDK)) { struct netdev *netdev = &dev->up; dpdk_do_tx_copy(netdev, qid, batch); - dp_packet_delete_batch(batch, may_steal); + dp_packet_delete_batch(batch, true); } else { int tx_cnt, dropped; int batch_cnt = dp_packet_batch_size(batch); @@ -1946,7 +1939,7 @@ netdev_dpdk_send__(struct netdev_dpdk *dev, int qid, dp_packet_batch_apply_cutlen(batch); tx_cnt = netdev_dpdk_filter_packet_len(dev, pkts, batch_cnt); - tx_cnt = netdev_dpdk_qos_run(dev, pkts, tx_cnt, true); + tx_cnt = netdev_dpdk_qos_run(dev, pkts, tx_cnt); dropped = batch_cnt - tx_cnt; dropped += netdev_dpdk_eth_tx_burst(dev, qid, pkts, tx_cnt); @@ -1965,12 +1958,11 @@ netdev_dpdk_send__(struct netdev_dpdk *dev, int qid, static int netdev_dpdk_eth_send(struct netdev *netdev, int qid, - struct dp_packet_batch *batch, bool may_steal, - bool concurrent_txq) + struct dp_packet_batch *batch, bool concurrent_txq) { struct netdev_dpdk *dev = netdev_dpdk_cast(netdev); - netdev_dpdk_send__(dev, qid, batch, may_steal, concurrent_txq); + netdev_dpdk_send__(dev, qid, batch, concurrent_txq); return 0; } @@ -2937,8 +2929,7 @@ dpdk_ring_open(const char dev_name[], dpdk_port_t *eth_port_id) static int netdev_dpdk_ring_send(struct netdev *netdev, int qid, - struct dp_packet_batch *batch, bool may_steal, - bool concurrent_txq) + struct dp_packet_batch *batch, bool concurrent_txq) { struct netdev_dpdk *dev = netdev_dpdk_cast(netdev); struct dp_packet *packet; @@ -2951,7 +2942,7 @@ netdev_dpdk_ring_send(struct netdev *netdev, int qid, dp_packet_mbuf_rss_flag_reset(packet); } - netdev_dpdk_send__(dev, qid, batch, may_steal, concurrent_txq); + netdev_dpdk_send__(dev, qid, batch, concurrent_txq); return 0; } @@ -3163,15 +3154,13 @@ egress_policer_qos_is_equal(const struct qos_conf *conf, } static int -egress_policer_run(struct qos_conf *conf, struct rte_mbuf **pkts, int pkt_cnt, - bool may_steal) +egress_policer_run(struct qos_conf *conf, struct rte_mbuf **pkts, int pkt_cnt) { int cnt = 0; struct egress_policer *policer = CONTAINER_OF(conf, struct egress_policer, qos_conf); - cnt = netdev_dpdk_policer_run(&policer->egress_meter, pkts, - pkt_cnt, may_steal); + cnt = netdev_dpdk_policer_run(&policer->egress_meter, pkts, pkt_cnt); return cnt; } diff --git a/lib/netdev-dummy.c b/lib/netdev-dummy.c index f731af1..57ef13f 100644 --- a/lib/netdev-dummy.c +++ b/lib/netdev-dummy.c @@ -1062,7 +1062,7 @@ netdev_dummy_rxq_drain(struct netdev_rxq *rxq_) static int netdev_dummy_send(struct netdev *netdev, int qid OVS_UNUSED, - struct dp_packet_batch *batch, bool may_steal, + struct dp_packet_batch *batch, bool concurrent_txq OVS_UNUSED) { struct netdev_dummy *dev = netdev_dummy_cast(netdev); @@ -1132,7 +1132,7 @@ netdev_dummy_send(struct netdev *netdev, int qid OVS_UNUSED, ovs_mutex_unlock(&dev->mutex); } - dp_packet_delete_batch(batch, may_steal); + dp_packet_delete_batch(batch, true); return error; } diff --git a/lib/netdev-linux.c b/lib/netdev-linux.c index 2ff3e2b..aaf4899 100644 --- a/lib/netdev-linux.c +++ b/lib/netdev-linux.c @@ -1269,7 +1269,7 @@ netdev_linux_tap_batch_send(struct netdev *netdev_, * expected to do additional queuing of packets. */ static int netdev_linux_send(struct netdev *netdev_, int qid OVS_UNUSED, - struct dp_packet_batch *batch, bool may_steal, + struct dp_packet_batch *batch, bool concurrent_txq OVS_UNUSED) { int error = 0; @@ -1305,7 +1305,7 @@ netdev_linux_send(struct netdev *netdev_, int qid OVS_UNUSED, } free_batch: - dp_packet_delete_batch(batch, may_steal); + dp_packet_delete_batch(batch, true); return error; } diff --git a/lib/netdev-provider.h b/lib/netdev-provider.h index b3c57d5..e6ec79a 100644 --- a/lib/netdev-provider.h +++ b/lib/netdev-provider.h @@ -347,9 +347,8 @@ struct netdev_class { * If the function returns a non-zero value, some of the packets might have * been sent anyway. * - * If 'may_steal' is false, the caller retains ownership of all the - * packets. If 'may_steal' is true, the caller transfers ownership of all - * the packets to the network device, regardless of success. + * The caller transfers ownership of all the packets to the network + * device, regardless of success. * * If 'concurrent_txq' is true, the caller may perform concurrent calls * to netdev_send() with the same 'qid'. The netdev provider is responsible @@ -369,7 +368,7 @@ struct netdev_class { * datapath". It will also prevent the OVS implementation of bonding from * working properly over 'netdev'.) */ int (*send)(struct netdev *netdev, int qid, struct dp_packet_batch *batch, - bool may_steal, bool concurrent_txq); + bool concurrent_txq); /* Registers with the poll loop to wake up from the next call to * poll_block() when the packet transmission queue for 'netdev' has diff --git a/lib/netdev.c b/lib/netdev.c index b4e570b..fa0c9fc 100644 --- a/lib/netdev.c +++ b/lib/netdev.c @@ -771,9 +771,8 @@ netdev_get_pt_mode(const struct netdev *netdev) * If the function returns a non-zero value, some of the packets might have * been sent anyway. * - * If 'may_steal' is false, the caller retains ownership of all the packets. - * If 'may_steal' is true, the caller transfers ownership of all the packets - * to the network device, regardless of success. + * The caller transfers ownership of all the packets to the network device, + * regardless of success. * * If 'concurrent_txq' is true, the caller may perform concurrent calls * to netdev_send() with the same 'qid'. The netdev provider is responsible @@ -790,15 +789,12 @@ netdev_get_pt_mode(const struct netdev *netdev) * cases this function will always return EOPNOTSUPP. */ int netdev_send(struct netdev *netdev, int qid, struct dp_packet_batch *batch, - bool may_steal, bool concurrent_txq) + bool concurrent_txq) { - int error = netdev->netdev_class->send(netdev, qid, batch, may_steal, + int error = netdev->netdev_class->send(netdev, qid, batch, concurrent_txq); if (!error) { COVERAGE_INC(netdev_sent); - if (!may_steal) { - dp_packet_batch_reset_cutlen(batch); - } } return error; } diff --git a/lib/netdev.h b/lib/netdev.h index f8482f7..bdcacf5 100644 --- a/lib/netdev.h +++ b/lib/netdev.h @@ -181,7 +181,7 @@ int netdev_rxq_drain(struct netdev_rxq *); /* Packet transmission. */ int netdev_send(struct netdev *, int qid, struct dp_packet_batch *, - bool may_steal, bool concurrent_txq); + bool concurrent_txq); void netdev_send_wait(struct netdev *, int qid); /* Flow offloading. */