From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mailout1.w1.samsung.com (mailout1.w1.samsung.com [210.118.77.11]) by dpdk.org (Postfix) with ESMTP id 2ED7D1D8D6 for ; Fri, 15 Jun 2018 14:32:12 +0200 (CEST) Received: from eucas1p2.samsung.com (unknown [182.198.249.207]) by mailout1.w1.samsung.com (KnoxPortal) with ESMTP id 20180615123211euoutp01f3024fdcb0dfe9fccc2dbcb24309933a~4VVzz_ujg2572425724euoutp01J for ; Fri, 15 Jun 2018 12:32:11 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 mailout1.w1.samsung.com 20180615123211euoutp01f3024fdcb0dfe9fccc2dbcb24309933a~4VVzz_ujg2572425724euoutp01J DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=samsung.com; s=mail20170921; t=1529065931; bh=snxzYn8vxH/22YPtXJtY7MfipdiKDAoXFDTXqrx1RXs=; h=To:Subject:Cc:From:Date:In-Reply-To:References:From; b=T1zlGgBvOFv9wW/ovdVzNHqGayQdbpG6e/wP5r82CrsP3F+8JozcOe4il8izY1dak 9o5nw6DE9AVvlU9x9kG8mSf4jazK5UfOkQP2AFezZrBawf0y2MptIJtJCtrmbJMbOV iNAeAp5QM4ddLB7tjibXp6p+UlscehP/QQqqDvxQ= Received: from eusmges2new.samsung.com (unknown [203.254.199.244]) by eucas1p2.samsung.com (KnoxPortal) with ESMTP id 20180615123210eucas1p2873de0019ce1780a6b9a0cb65d507c78~4VVy3XNp81981519815eucas1p2m; Fri, 15 Jun 2018 12:32:10 +0000 (GMT) Received: from eucas1p1.samsung.com ( [182.198.249.206]) by eusmges2new.samsung.com (EUCPMTA) with SMTP id 67.4B.17380.9C1B32B5; Fri, 15 Jun 2018 13:32:09 +0100 (BST) Received: from eusmtrp2.samsung.com (unknown [182.198.249.139]) by eucas1p1.samsung.com (KnoxPortal) with ESMTPA id 20180615123208eucas1p1e5d258f95e9621a31c2fcfbf1f494476~4VVxsfFEy3007530075eucas1p1f; Fri, 15 Jun 2018 12:32:08 +0000 (GMT) Received: from eusmgms1.samsung.com (unknown [182.198.249.179]) by eusmtrp2.samsung.com (KnoxPortal) with ESMTP id 20180615123208eusmtrp24ec92febd5078c6cf9970784a726d5f5~4VVxSynuU2601026010eusmtrp21; Fri, 15 Jun 2018 12:32:08 +0000 (GMT) X-AuditID: cbfec7f4-6f9ff700000043e4-29-5b23b1c95f84 Received: from eusmtip2.samsung.com ( [203.254.199.222]) by eusmgms1.samsung.com (EUCPMTA) with SMTP id E8.62.04178.8C1B32B5; Fri, 15 Jun 2018 13:32:08 +0100 (BST) Received: from [106.109.129.180] (unknown [106.109.129.180]) by eusmtip2.samsung.com (KnoxPortal) with ESMTPA id 20180615123208eusmtip28b86d59359a85261a3a6a0f3a91d3e2c~4VVw5SOKf1825118251eusmtip2Z; Fri, 15 Jun 2018 12:32:08 +0000 (GMT) To: dev@dpdk.org, Maxime Coquelin Cc: HePeng , Tiwei Bie , Zhihong Wang From: Ilya Maximets Date: Fri, 15 Jun 2018 15:32:07 +0300 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.7.0 MIME-Version: 1.0 In-Reply-To: <462941BC-FB45-46BD-8FB2-3455887D6BAB@icloud.com> Content-Language: en-GB Content-Transfer-Encoding: 7bit X-Brightmail-Tracker: H4sIAAAAAAAAA+NgFlrKKsWRmVeSWpSXmKPExsWy7djPc7onNypHG0zs0rF492k7k8WV9p/s Fsc697BYbG34z2TRv38fm8Xmi5OYHNg8fi1YyuqxfNpRRo/Fe14yebzfd5XNo2/LKsYA1igu m5TUnMyy1CJ9uwSujNVTlzAXzOOqWHJ2AXMD4xP2LkZODgkBE4nrk+cygdhCAisYJZZM5eli 5AKyvzBKXN58kgnC+cwosfLbJlaYjsttp1ggEssZJX4tvgPV/pFRYsGkcBBbRMBOYsqen8wg trCAu8Shp6vAbGaBLImrx9eD2WwCOhKnVh9hBLFZBFQlbp97DhYXFYiQaH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FRaBaS9llIWmYhaZmFpGUBI8sqRpHU0uLc9NxiQ73ixNzi0rx0veT8 3E2MwFjbduzn5h2MlzYGH2IU4GBU4uH1uKAULcSaWFZcmXuIUYKDWUmEt7cEKMSbklhZlVqU H19UmpNafIjRFOi5icxSosn5wDSQVxJvaGpobmFpaG5sbmxmoSTOe96gMkpIID2xJDU7NbUg tQimj4mDU6qBMaBaZdGh0rccRfvsJmV9CuBedqx73cKVwlclv9Z9Fjuy0+O8dVR0WcwloYZ/ 37nOrdIR8t+jGjw7IYVHo7cq6coWzqfnZtQuXuqkEihrpfxlD9Pp2Z251z6bK5TPPpQe4/lD J+DtP5ujGuY7fs6UPhDFcGwd57eOjWfsN7Hf8LtXNfUVe5bwOiWW4oxEQy3mouJEAPCfJmbL AgAA Message-Id: <20180615123208eucas1p1e5d258f95e9621a31c2fcfbf1f494476~4VVxsfFEy3007530075eucas1p1f@eucas1p1.samsung.com> X-CMS-MailID: 20180615123208eucas1p1e5d258f95e9621a31c2fcfbf1f494476 X-Msg-Generator: CA Content-Type: text/plain; charset="utf-8" X-RootMTR: 20180615123208eucas1p1e5d258f95e9621a31c2fcfbf1f494476 X-EPHeader: CA CMS-TYPE: 201P X-CMS-RootMailID: 20180615123208eucas1p1e5d258f95e9621a31c2fcfbf1f494476 References: <462941BC-FB45-46BD-8FB2-3455887D6BAB@icloud.com> Subject: Re: [dpdk-dev] Missing an increment on vq->log_cache_nb_elem ? X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jun 2018 12:32:13 -0000 > Hi, > > > In the latest dpdk master branch, in the function *vhost_log_cache_page*: > > > static __rte_always_inline void > vhost_log_cache_page(struct virtio_net *dev, struct vhost_virtqueue *vq, > uint64_t page) > { > uint32_t bit_nr = page % (sizeof(unsigned long) << 3); > uint32_t offset = page / (sizeof(unsigned long) << 3); > int i; > > for (i = 0; i < vq->log_cache_nb_elem; i++) { > struct log_cache_entry *elem = vq->log_cache + i; > > if (elem->offset == offset) { > elem->val |= (1UL << bit_nr); > return; > } > } > > if (unlikely(i >= VHOST_LOG_CACHE_NR)) { > /* > * No more room for a new log cache entry, > * so write the dirty log map directly. > */ > rte_smp_wmb(); > vhost_log_page((uint8_t *)(uintptr_t)dev->log_base, page); > > return; > } > > vq->log_cache[i].offset = offset; > vq->log_cache[i].val = (1UL << bit_nr); > } > > Did it just miss an increment on vq->log_cache_nb_elem ? Hi. Thanks for pointing that. I looked through the code and I see no updates of 'vq->log_cache_nb_elem'. Looks like it always equal to initial zero value. Maxime, I'm afraid that this means that currently pages logging is not performed at all. Could you please check? Best regards, Ilya Maximets.