Received: by 2002:a05:6902:102b:0:0:0:0 with SMTP id x11csp506631ybt; Wed, 8 Jul 2020 05:20:29 -0700 (PDT) X-Google-Smtp-Source: ABdhPJy+yWkjVgGJRNCZaPg7D6/8zcmYeCk1Fq/HnSJYm4iPQeW6Hovq3bRVn5RAKMn+7mMCGz+E X-Received: by 2002:a17:906:2988:: with SMTP id x8mr44420126eje.141.1594210828864; Wed, 08 Jul 2020 05:20:28 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1594210828; cv=none; d=google.com; s=arc-20160816; b=nnn4DpeI/3AUyKPEbc43OK3TG/+npcYQYOPBiwgBQDgeHm9PmGnY79nyQf4e0rt41C Z9mwmH/a5aySXRKdK31NjgkYZVUuaRfSw5+JNARaadZB3s1w4SAxhUdGL30EwAVVb4AU VIbUytowT5CQZU6hvdhcvhi+bowxQ4/WAAwNpLBp/jYvHVa/aOj5al2JqKv5pMMYAy0i j50qKO9+1xqmxoQQqV9+N+AhrNUZ+rEN4fY3yM5Z1YpUdgkvN/vNBCf1oQXm2eTiU8L7 xVEmiH4gGlsKWyG/v51gSaOfaYoev20qxjGXWZGcGVDpbK62nAA95SEA9KeCOejzSKP/ st9g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date; bh=0/PXdkg0PFF86mYbDxKbrjYSsAdBy44WnaycIQxolOQ=; b=OqUG6go1pV2TqSUaSnpndgKLZtmYxXyliKNS/ky19ZsFMi0C6W9cEi+t3W9uy4NjYt ehIoGbUCWrgAqES4yWUYLJQ2bYAowOjHlwPmdcmIMoReVfkmJrGwdpkssDUpFrfO9I+1 BL+wGAnlrA9Yj8l4Mf9Ga6pKknpVMhEm8cZ/QC/vo4QOEyZZZeYFvlA+TzAUuj/08smK oj4FIO7ThAj28EpgkBhBPS+dOl6g7DJPOvjmb87LydhUBa00+IIrggW1uL9y9sC98c5J +5aCy7JgU3bmibiZZL+l2SKocX33DjOs+Cu0H4plaM8y4LdYvp1lqi5cAdTFEvOcubpm uTVw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id g10si9519288ejf.54.2020.07.08.05.20.05; Wed, 08 Jul 2020 05:20:28 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728919AbgGHMTo (ORCPT + 99 others); Wed, 8 Jul 2020 08:19:44 -0400 Received: from verein.lst.de ([213.95.11.211]:35029 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728723AbgGHMTo (ORCPT ); Wed, 8 Jul 2020 08:19:44 -0400 Received: by verein.lst.de (Postfix, from userid 2407) id B235068AFE; Wed, 8 Jul 2020 14:19:40 +0200 (CEST) Date: Wed, 8 Jul 2020 14:19:40 +0200 From: Christoph Hellwig To: "Song Bao Hua (Barry Song)" Cc: Christoph Hellwig , Robin Murphy , =?iso-8859-1?Q?Bj=F6rn_T=F6pel?= , Daniel Borkmann , "maximmi@mellanox.com" , "konrad.wilk@oracle.com" , "jonathan.lemon@gmail.com" , "linux-kernel@vger.kernel.org" , "iommu@lists.linux-foundation.org" , "netdev@vger.kernel.org" , "bpf@vger.kernel.org" , "davem@davemloft.net" , "magnus.karlsson@intel.com" Subject: Re: [PATCH net] xsk: remove cheap_dma optimization Message-ID: <20200708121940.GA19619@lst.de> References: <20200626134358.90122-1-bjorn.topel@gmail.com> <20200627070406.GB11854@lst.de> <88d27e1b-dbda-301c-64ba-2391092e3236@intel.com> <878626a2-6663-0d75-6339-7b3608aa4e42@arm.com> <20200708065014.GA5694@lst.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.17 (2007-11-01) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, Jul 08, 2020 at 07:57:23AM +0000, Song Bao Hua (Barry Song) wrote: > > int dma_map_batch_start(struct device *dev, size_t rounded_len, > > enum dma_data_direction dir, unsigned long attrs, dma_addr_t *addr); > > int dma_map_batch_add(struct device *dev, dma_addr_t *addr, struct page > > *page, > > unsigned long offset, size_t size); > > int dma_map_batch_end(struct device *dev, int ret, dma_addr_t start_addr); > > > > Hello Christoph, > > What is the different between dma_map_batch_add() and adding the buffer to sg of dma_map_sg()? There is not struct scatterlist involved in this API, avoiding the overhead to allocate it (which is kinda the point).