From owner-freebsd-net@freebsd.org Sun Nov 12 05:19:13 2017 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 8613EE68C72 for ; Sun, 12 Nov 2017 05:19:13 +0000 (UTC) (envelope-from kmacybsd@gmail.com) Received: from mail-oi0-x236.google.com (mail-oi0-x236.google.com [IPv6:2607:f8b0:4003:c06::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4870A7CA2F for ; Sun, 12 Nov 2017 05:19:13 +0000 (UTC) (envelope-from kmacybsd@gmail.com) Received: by mail-oi0-x236.google.com with SMTP id r128so9331420oig.9 for ; Sat, 11 Nov 2017 21:19:13 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=THRsyE+AWU0R5MEfQ6tAd9MfztnQvB/4rxVAQBNT7+c=; b=pFCB0V9sKNQCzezrwRjYBApAW1+7Cctc4FAMQMu8v5rIoQvIeeXbNhOns+hfRcYgcQ KmO52V2xphN1s4CX37pNlMnw/rVs4dnRDe/qz0diuu9Z9Dqsw43LYtGOvPvDd8+a3Ycr yQvw6dCDgMSWZ8Zgo1nmoXJd90mRcxKsdhiQubqkdDc9KDrLDnUlJ7g9GJM/j3nfjOHS vUo3CDjV+s5mwp6ovGZum1vEG+Zioy92l+j98w7BV2YW1JMwqArlbDMbeakL5RdDGE0s Ggs8+IYXNOFgC3oyHhz+/tXvfKo26ZYKiQTRwc9pqljfsvahX75jvitxf5RSOD00qc0t qLAw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=THRsyE+AWU0R5MEfQ6tAd9MfztnQvB/4rxVAQBNT7+c=; b=VtR+jFsaGs9/+OGq2owLZDtIYOg2YDm4YqfMIWdKsg/D18WuoL6Y+/MWEogj5p3O1U ylzkPagCGg1YeQ6g9/i9XLN+WYi6VdmczlhMpk2RM2ryL6UqmHkfltGpt70H1tT187VA Xup4nRWXgpajhx8MWcz9H5Ne+4+5MjHMQep9W/6WsTeJ4b3bf+t2iA0da6d1cgq4oEu4 J5k8+jdpmoLkGVngV1HS1sZ9ce9Qx5NkDNtql8OLGOgGXpvv5XD/cP+ufq7xV1sSQzlD loul2TILeXOuIUbpBIqifl0GkNMFqTCj9M1VWH5MxcuXGZ8O3E2VYbLMaXaACQ53YOdr lFkg== X-Gm-Message-State: AJaThX4LV2Mlua9YTZRy6OhAW5bTgKWdu5N0jso8b35uFkWpvuFmqEzk YRPYOBDj/zn9VESUXpEWb+AlytmvgQGntoz1lKY= X-Google-Smtp-Source: AGs4zMasFxTjkOQCcyRkjdVYmWoXcGIcyHUqytvyUt1aurOgeyTe0QQNabz3QBWOStBDsp02I2c7jNfardQAzhFvXAY= X-Received: by 10.202.166.218 with SMTP id t87mr2065592oij.420.1510463952444; Sat, 11 Nov 2017 21:19:12 -0800 (PST) MIME-Version: 1.0 Sender: kmacybsd@gmail.com Received: by 10.157.31.89 with HTTP; Sat, 11 Nov 2017 21:19:12 -0800 (PST) In-Reply-To: References: <5A01ED27.60900@cox.net> From: "K. Macy" Date: Sat, 11 Nov 2017 21:19:12 -0800 X-Google-Sender-Auth: dO8qhh4SDrNQh4lY5DUI2LwZl74 Message-ID: Subject: Re: netmap scatter/gather? To: Vincenzo Maffione Cc: "Joseph H. Buehler" , "freebsd-net@freebsd.org" Content-Type: text/plain; charset="UTF-8" X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 12 Nov 2017 05:19:13 -0000 On Sat, Nov 11, 2017 at 8:30 PM, K. Macy wrote: > On Tue, Nov 7, 2017 at 9:32 AM, Vincenzo Maffione wrote: >> Hi, >> In general netmap adapters (i.e. netmap ports) may support NS_MOREFRAG. >> But in practice this is mainly supported on VALE ports. >> So if you don't want to add the missing support by yourself you can simply >> change the netmap buffer size by tuning the sysctl dev.netmap.buf_size, and >> increase it to 9600. >> > > When doing vxlan that allows me to avoid copies on encap, but I don't > see any mechanism to avoid a (second) copy on decap where what I'd > like to do is to indicate to VALE that the packet starts at a certain > offset. Am I missing something? It looks like if you'd just change NETMAP_BUF to take an offset as well it would mostly just work if I could pass on offset in netmap_slot: idx = ring->slot[i].buf_idx; d->hdr.slot = &ring->slot[i]; d->hdr.buf = (u_char *)NETMAP_BUF(ring, idx); -> idx = ring->slot[i].buf_idx; off = ring->slot[i].buf_off; /* new */ d->hdr.slot = &ring->slot[i]; d->hdr.buf = (u_char *)NETMAP_BUF(ring, idx, off); > > > Thanks.