From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from dpdk.org (dpdk.org [92.243.14.124]) by inbox.dpdk.org (Postfix) with ESMTP id 998E3A0487 for ; Wed, 3 Jul 2019 11:04:34 +0200 (CEST) Received: from [92.243.14.124] (localhost [127.0.0.1]) by dpdk.org (Postfix) with ESMTP id 83F08F04; Wed, 3 Jul 2019 11:04:34 +0200 (CEST) Received: from mail-pf1-f195.google.com (mail-pf1-f195.google.com [209.85.210.195]) by dpdk.org (Postfix) with ESMTP id 3A020F04 for ; Wed, 3 Jul 2019 11:04:33 +0200 (CEST) Received: by mail-pf1-f195.google.com with SMTP id j2so926612pfe.6 for ; Wed, 03 Jul 2019 02:04:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:date:message-id; bh=P2c2vweJPFtseR7/er5cISf7ELLoCniEw/AhKCG0Rh8=; b=GFQ4JB4w+2R4GYkirsGX9Ps2bB9uyt72r26oCCqaMXjHr2bDkVBy1Gv0mgkJQz63ma nRosjhui5dwuhyZkDW+UBtbMSWu2Pk9g8fhVwg0bxbdwgZHpMvNkuiq5deMdvXcuSoNO +hCEysw4iOJQTReAJJSVWB9Ibpn1QzDJpAjt2pAL/8WWD9T0ajr6K31ukUFaXwoFg9fd xnJn7iZ+4pyheY5tPsTrGUEdEIHulVLSLt+EsHo9Zw6ap8DyB57uSkvgHxNTa82L2wuO HDje55jj+SVSb/6XHpeKXALDDaelWK5uIJvxhAra40j5VfkXiX8lRSzHNFp0KeieABDV K0Kw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:date:message-id; bh=P2c2vweJPFtseR7/er5cISf7ELLoCniEw/AhKCG0Rh8=; b=pFWFujpzmFESgQi3RG2HTJ+q4W5FJvel6SuvxAm1uBpVu0lDprW1/STi44SNb6U0ZY d12jtSKbhI/G8dhhKg8CuuPgPwgpLDuL8XPuHY+pMx99esv/Szu6+11ZQI6ZKqarB9FJ eCz/OSkIu3ZNAVm1U7xvNW0o8b8LovYJZbahPnCHkFlTPANk8dsz10GMjkrIZlz8W8NI VGyJdfpqVJOxwSoifQ8mbI7/tnXj3Nlis+07maGSDd72wePlpL4u53j6z0W7sZDTAC4g khxQmnXy9QU0UIQMmy/1zUXUciocVNEIeCiUEphc7QwIBasggCYcroyyOc5Lc113O4Pb qq9A== X-Gm-Message-State: APjAAAU7feuR6gDiEBdGYMRFQ95EZCmrGJfm5X/jZVB+ReQzFhcemGls wRZ98s0tOfwzw1x83VBeTdmOok6n X-Google-Smtp-Source: APXvYqzccqFhX8kH0Ba7YzvVO1nTMdbYqUiy2Qp+J1kFkkgKGbhXHCVJP0CfzVcu2IlzguYWVNfgRA== X-Received: by 2002:a65:458d:: with SMTP id o13mr22074993pgq.34.1562144672290; Wed, 03 Jul 2019 02:04:32 -0700 (PDT) Received: from localhost.localdomain ([192.47.164.146]) by smtp.gmail.com with ESMTPSA id n17sm1610897pfq.182.2019.07.03.02.04.30 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 03 Jul 2019 02:04:31 -0700 (PDT) From: yasufum.o@gmail.com To: spp@dpdk.org, ferruh.yigit@intel.com, yasufum.o@gmail.com Date: Wed, 3 Jul 2019 18:04:27 +0900 Message-Id: <20190703090427.5545-1-yasufum.o@gmail.com> X-Mailer: git-send-email 2.17.1 Subject: [spp] [PATCH] docs: remove tabs in code example of impl X-BeenThere: spp@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: Soft Patch Panel List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: spp-bounces@dpdk.org Sender: "spp" From: Yasufumi Ogawa In code examples of `Implementation` section, there are some TAB characters remained. It is not a problem actually, but does not apply with coding rules and warn by some checkers. This update is to replace TABs with spaces to avoid warnings. Signed-off-by: Yasufumi Ogawa --- docs/guides/design/impl/spp_mirror.rst | 18 +++++++++--------- docs/guides/design/impl/spp_pcap.rst | 6 +++--- docs/guides/design/impl/spp_vf.rst | 10 +++++----- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/docs/guides/design/impl/spp_mirror.rst b/docs/guides/design/impl/spp_mirror.rst index 6233de9..7f9d16a 100644 --- a/docs/guides/design/impl/spp_mirror.rst +++ b/docs/guides/design/impl/spp_mirror.rst @@ -19,12 +19,12 @@ for duplicating packets is ``mirror_proc()`` on each of lcores. .. code-block:: c - for (cnt = 0; cnt < core->num; cnt++) { + for (cnt = 0; cnt < core->num; cnt++) { - ret = mirror_proc(core->id[cnt]); - if (unlikely(ret != 0)) - break; - } + ret = mirror_proc(core->id[cnt]); + if (unlikely(ret != 0)) + break; + } Mirroring Packets @@ -58,7 +58,7 @@ packet if in deep copy mode. rte_prefetch0(rte_pktmbuf_mtod(org_mbuf, void *)); #ifdef SPP_MIRROR_SHALLOWCOPY /* Shallow Copy */ - copybufs[cnt] = rte_pktmbuf_clone(org_mbuf, + copybufs[cnt] = rte_pktmbuf_clone(org_mbuf, g_mirror_pool); #else @@ -87,10 +87,10 @@ packet if in deep copy mode. *mirror_mbufs = copy_mbuf; mirror_mbufs = ©_mbuf->next; } while ((org_mbuf = org_mbuf->next) != NULL); - copybufs[cnt] = mirror_mbuf; + copybufs[cnt] = mirror_mbuf; #endif /* SPP_MIRROR_SHALLOWCOPY */ } - if (cnt != 0) + if (cnt != 0) nb_tx2 = spp_eth_tx_burst(tx->dpdk_port, 0, - copybufs, cnt); + copybufs, cnt); diff --git a/docs/guides/design/impl/spp_pcap.rst b/docs/guides/design/impl/spp_pcap.rst index 1f93d41..7777fca 100644 --- a/docs/guides/design/impl/spp_pcap.rst +++ b/docs/guides/design/impl/spp_pcap.rst @@ -41,10 +41,10 @@ and sending the packets to the writer thread via ring memory by using /* spp_pcap.c */ rx = &g_pcap_option.port_cap; - nb_rx = rte_eth_rx_burst(rx->ethdev_port_id, 0, bufs, MAX_PCAP_BURST); + nb_rx = rte_eth_rx_burst(rx->ethdev_port_id, 0, bufs, MAX_PCAP_BURST); - /* Forward to ring for writer thread */ - nb_tx = rte_ring_enqueue_burst(write_ring, (void *)bufs, nb_rx, NULL); + /* Forward to ring for writer thread */ + nb_tx = rte_ring_enqueue_burst(write_ring, (void *)bufs, nb_rx, NULL); Writing Packet diff --git a/docs/guides/design/impl/spp_vf.rst b/docs/guides/design/impl/spp_vf.rst index ed5dc27..65e8d06 100644 --- a/docs/guides/design/impl/spp_vf.rst +++ b/docs/guides/design/impl/spp_vf.rst @@ -58,8 +58,8 @@ or simply forwards packets. while ((status = spp_get_core_status(lcore_id)) != SPPWK_LCORE_REQ_STOP) { - if (status != SPPWK_LCORE_RUNNING) - continue; + if (status != SPPWK_LCORE_RUNNING) + continue; // skipping lines ... @@ -68,9 +68,9 @@ or simply forwards packets. /* Component classification to call a function. */ if (spp_get_component_type(core->id[cnt]) == SPPWK_TYPE_CLS) { - /* Component type for classifier. */ - ret = spp_classifier_mac_do(core->id[cnt]); - if (unlikely(ret != 0)) + /* Component type for classifier. */ + ret = spp_classifier_mac_do(core->id[cnt]); + if (unlikely(ret != 0)) break; } else { /* Component type for forward or merge. */ -- 2.17.1