From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-2.3 required=3.0 tests=HEADER_FROM_DIFFERENT_DOMAINS, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D0158C606CF for ; Tue, 9 Jul 2019 02:10:20 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.kernel.org (Postfix) with ESMTP id AEEBE21537 for ; Tue, 9 Jul 2019 02:10:20 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726322AbfGICKT (ORCPT ); Mon, 8 Jul 2019 22:10:19 -0400 Received: from mx2.suse.de ([195.135.220.15]:58058 "EHLO mx1.suse.de" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with ESMTP id S1725941AbfGICKT (ORCPT ); Mon, 8 Jul 2019 22:10:19 -0400 X-Virus-Scanned: by amavisd-new at test-mx.suse.de Received: from relay2.suse.de (unknown [195.135.220.254]) by mx1.suse.de (Postfix) with ESMTP id 5512FAFF2; Tue, 9 Jul 2019 02:10:18 +0000 (UTC) Date: Tue, 9 Jul 2019 11:10:11 +0900 From: Benjamin Poirier To: Manish Chopra Cc: GR-Linux-NIC-Dev , "netdev@vger.kernel.org" Subject: Re: [EXT] [PATCH net-next 07/16] qlge: Deduplicate rx buffer queue management Message-ID: <20190709021011.GA23419@f1> References: <20190617074858.32467-1-bpoirier@suse.com> <20190617074858.32467-7-bpoirier@suse.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.11.3 (2019-02-01) Sender: netdev-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: netdev@vger.kernel.org On 2019/06/27 10:02, Manish Chopra wrote: > > while (curr_idx != clean_idx) { > > - lbq_desc = &rx_ring->lbq[curr_idx]; > > + struct qlge_bq_desc *lbq_desc = &rx_ring- > > >lbq.queue[curr_idx]; > > > > if (lbq_desc->p.pg_chunk.offset == last_offset) > > - pci_unmap_page(qdev->pdev, lbq_desc- > > >p.pg_chunk.map, > > + pci_unmap_page(qdev->pdev, lbq_desc->dma_addr, > > ql_lbq_block_size(qdev), > > PCI_DMA_FROMDEVICE); > > In this patch, lbq_desc->dma_addr points to offset in the page. So unmapping is broken within this patch. > Would have been nicer to fix this in the same patch although it might have been taken care in next patches probably. > Indeed, thanks. The same applies in ql_get_curr_lchunk(). Replaced with the following for v2: + pci_unmap_page(qdev->pdev, lbq_desc->dma_addr - + last_offset, ql_lbq_block_size(qdev),