From patchwork Wed Apr 29 08:38:15 2015 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Vladislav Zolotarov X-Patchwork-Id: 4495 Return-Path: X-Original-To: patchwork@dpdk.org Delivered-To: patchwork@dpdk.org Received: from [92.243.14.124] (localhost [IPv6:::1]) by dpdk.org (Postfix) with ESMTP id E0082C7C2; Wed, 29 Apr 2015 10:38:29 +0200 (CEST) Received: from mail-wi0-f175.google.com (mail-wi0-f175.google.com [209.85.212.175]) by dpdk.org (Postfix) with ESMTP id 219CAC7A6 for ; Wed, 29 Apr 2015 10:38:26 +0200 (CEST) Received: by widdi4 with SMTP id di4so170498245wid.0 for ; Wed, 29 Apr 2015 01:38:26 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=8W58vT/HsMRaAKKS3Jo+6VQx7Pt6WWIjAqG/bOWtRCM=; b=iqv87bD4Q05g3pkJrQejbgClZkwErdlRfK9aLuH1inW3/8pzTlfiTxwJE4rKyAIMBD vlahOFa/Fs3x7WXQzXcsQd417WiTa7gNuP9dJboSYbVhQ4mTt/SB0/mOe/xuAZD29PMS pPutgbDnFBQBJbpLegL3/hqsrRbO8OmS1wrzzm+CuNBwn8e1ArapQNcjm8zlpisOwOTq IbzmEdlTi+qa6MOaFXUOEwqZLl1tjaVOhh7JtNAsPDr7z1nWn0qEPW4GxVdvjmx5/vLR 9vV2yZryBkV6j07VVdS+OGERqVuuvee2jQh0qn4KSm9yWnqzH+1OmkNYa1DFE9tehXIc gFhg== X-Gm-Message-State: ALoCoQkJr1tPoWpoFadr9CKjIABInQEsGoQv2+3s9vouqMh621gxI5zoobWkx5/5XBK6PT3WPulR X-Received: by 10.195.18.103 with SMTP id gl7mr39031686wjd.34.1430296705966; Wed, 29 Apr 2015 01:38:25 -0700 (PDT) Received: from vladz-laptop.localdomain (bzq-79-182-192-238.red.bezeqint.net. [79.182.192.238]) by mx.google.com with ESMTPSA id yr1sm37946370wjc.37.2015.04.29.01.38.24 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 29 Apr 2015 01:38:25 -0700 (PDT) From: Vlad Zolotarov To: dev@dpdk.org Date: Wed, 29 Apr 2015 11:38:15 +0300 Message-Id: <1430296697-32650-4-git-send-email-vladz@cloudius-systems.com> X-Mailer: git-send-email 2.1.0 In-Reply-To: <1430296697-32650-1-git-send-email-vladz@cloudius-systems.com> References: <1430296697-32650-1-git-send-email-vladz@cloudius-systems.com> Subject: [dpdk-dev] [PATCH v2 3/5] ixgbe: Rename yy_rsc_xx -> yy_sc/scattered_rx_xx X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: patches and discussions about DPDK List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org Sender: "dev" - ixgbe_rsc_entry -> ixgbe_scattered_rx_entry - sw_rsc_ring -> sw_sc_ring - ixgbe_free_rsc_cluster() -> ixgbe_free_sc_cluster() - In local variables: xx_rsc_yy -> xx_sc_yy Signed-off-by: Vlad Zolotarov --- lib/librte_pmd_ixgbe/ixgbe_rxtx.c | 48 +++++++++++++++++++-------------------- lib/librte_pmd_ixgbe/ixgbe_rxtx.h | 4 ++-- 2 files changed, 26 insertions(+), 26 deletions(-) diff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c index a45f51e..b335a57 100644 --- a/lib/librte_pmd_ixgbe/ixgbe_rxtx.c +++ b/lib/librte_pmd_ixgbe/ixgbe_rxtx.c @@ -1466,7 +1466,7 @@ ixgbe_recv_pkts_lro(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts, struct ixgbe_rx_queue *rxq = rx_queue; volatile union ixgbe_adv_rx_desc *rx_ring = rxq->rx_ring; struct ixgbe_rx_entry *sw_ring = rxq->sw_ring; - struct ixgbe_rsc_entry *sw_rsc_ring = rxq->sw_rsc_ring; + struct ixgbe_scattered_rx_entry *sw_sc_ring = rxq->sw_sc_ring; uint16_t rx_id = rxq->rx_tail; uint16_t nb_rx = 0; uint16_t nb_hold = rxq->nb_rx_hold; @@ -1475,8 +1475,8 @@ ixgbe_recv_pkts_lro(void *rx_queue, struct rte_mbuf **rx_pkts, uint16_t nb_pkts, while (nb_rx < nb_pkts) { bool eop; struct ixgbe_rx_entry *rxe; - struct ixgbe_rsc_entry *rsc_entry; - struct ixgbe_rsc_entry *next_rsc_entry; + struct ixgbe_scattered_rx_entry *sc_entry; + struct ixgbe_scattered_rx_entry *next_sc_entry; struct ixgbe_rx_entry *next_rxe; struct rte_mbuf *first_seg; struct rte_mbuf *rxm; @@ -1619,14 +1619,14 @@ next_desc: else nextp_id = next_id; - next_rsc_entry = &sw_rsc_ring[nextp_id]; + next_sc_entry = &sw_sc_ring[nextp_id]; next_rxe = &sw_ring[nextp_id]; rte_ixgbe_prefetch(next_rxe); } - rsc_entry = &sw_rsc_ring[rx_id]; - first_seg = rsc_entry->fbuf; - rsc_entry->fbuf = NULL; + sc_entry = &sw_sc_ring[rx_id]; + first_seg = sc_entry->fbuf; + sc_entry->fbuf = NULL; /* * If this is the first buffer of the received packet, @@ -1651,11 +1651,11 @@ next_desc: /* * If this is not the last buffer of the received packet, update * the pointer to the first mbuf at the NEXTP entry in the - * sw_rsc_ring and continue to parse the RX ring. + * sw_sc_ring and continue to parse the RX ring. */ if (!eop) { rxm->next = next_rxe->mbuf; - next_rsc_entry->fbuf = first_seg; + next_sc_entry->fbuf = first_seg; goto next_desc; } @@ -2305,7 +2305,7 @@ ixgbe_dev_tx_queue_setup(struct rte_eth_dev *dev, } /** - * ixgbe_free_rsc_cluster - free the not-yet-completed RSC cluster + * ixgbe_free_sc_cluster - free the not-yet-completed scattered cluster * * The "next" pointer of the last segment of (not-yet-completed) RSC clusters * in the sw_rsc_ring is not set to NULL but rather points to the next @@ -2314,10 +2314,10 @@ ixgbe_dev_tx_queue_setup(struct rte_eth_dev *dev, * will just free first "nb_segs" segments of the cluster explicitly by calling * an rte_pktmbuf_free_seg(). * - * @m RSC cluster head + * @m scattered cluster head */ static void -ixgbe_free_rsc_cluster(struct rte_mbuf *m) +ixgbe_free_sc_cluster(struct rte_mbuf *m) { uint8_t i, nb_segs = m->nb_segs; struct rte_mbuf *next_seg; @@ -2353,11 +2353,11 @@ ixgbe_rx_queue_release_mbufs(struct ixgbe_rx_queue *rxq) #endif } - if (rxq->sw_rsc_ring) + if (rxq->sw_sc_ring) for (i = 0; i < rxq->nb_rx_desc; i++) - if (rxq->sw_rsc_ring[i].fbuf) { - ixgbe_free_rsc_cluster(rxq->sw_rsc_ring[i].fbuf); - rxq->sw_rsc_ring[i].fbuf = NULL; + if (rxq->sw_sc_ring[i].fbuf) { + ixgbe_free_sc_cluster(rxq->sw_sc_ring[i].fbuf); + rxq->sw_sc_ring[i].fbuf = NULL; } } @@ -2367,7 +2367,7 @@ ixgbe_rx_queue_release(struct ixgbe_rx_queue *rxq) if (rxq != NULL) { ixgbe_rx_queue_release_mbufs(rxq); rte_free(rxq->sw_ring); - rte_free(rxq->sw_rsc_ring); + rte_free(rxq->sw_sc_ring); rte_free(rxq); } } @@ -2624,20 +2624,20 @@ ixgbe_dev_rx_queue_setup(struct rte_eth_dev *dev, } if (rsc_requested) { - rxq->sw_rsc_ring = - rte_zmalloc_socket("rxq->sw_rsc_ring", - sizeof(struct ixgbe_rsc_entry) * len, + rxq->sw_sc_ring = + rte_zmalloc_socket("rxq->sw_sc_ring", + sizeof(struct ixgbe_scattered_rx_entry) * len, RTE_CACHE_LINE_SIZE, socket_id); - if (!rxq->sw_rsc_ring) { + if (!rxq->sw_sc_ring) { ixgbe_rx_queue_release(rxq); return (-ENOMEM); } } else - rxq->sw_rsc_ring = NULL; + rxq->sw_sc_ring = NULL; - PMD_INIT_LOG(DEBUG, "sw_ring=%p sw_rsc_ring=%p hw_ring=%p " + PMD_INIT_LOG(DEBUG, "sw_ring=%p sw_sc_ring=%p hw_ring=%p " "dma_addr=0x%"PRIx64, - rxq->sw_ring, rxq->sw_rsc_ring, rxq->rx_ring, + rxq->sw_ring, rxq->sw_sc_ring, rxq->rx_ring, rxq->rx_ring_phys_addr); if (!rte_is_power_of_2(nb_desc)) { diff --git a/lib/librte_pmd_ixgbe/ixgbe_rxtx.h b/lib/librte_pmd_ixgbe/ixgbe_rxtx.h index a1bcbe8..af36438 100644 --- a/lib/librte_pmd_ixgbe/ixgbe_rxtx.h +++ b/lib/librte_pmd_ixgbe/ixgbe_rxtx.h @@ -79,7 +79,7 @@ struct ixgbe_rx_entry { struct rte_mbuf *mbuf; /**< mbuf associated with RX descriptor. */ }; -struct ixgbe_rsc_entry { +struct ixgbe_scattered_rx_entry { struct rte_mbuf *fbuf; /**< First segment of the fragmented packet. */ }; @@ -109,7 +109,7 @@ struct ixgbe_rx_queue { volatile uint32_t *rdt_reg_addr; /**< RDT register address. */ volatile uint32_t *rdh_reg_addr; /**< RDH register address. */ struct ixgbe_rx_entry *sw_ring; /**< address of RX software ring. */ - struct ixgbe_rsc_entry *sw_rsc_ring; /**< address of RSC software ring. */ + struct ixgbe_scattered_rx_entry *sw_sc_ring; /**< address of scattered Rx software ring. */ struct rte_mbuf *pkt_first_seg; /**< First segment of current packet. */ struct rte_mbuf *pkt_last_seg; /**< Last segment of current packet. */ uint64_t mbuf_initializer; /**< value to init mbufs */