From owner-freebsd-net@freebsd.org Thu Jul 5 15:49:57 2018 Return-Path: Delivered-To: freebsd-net@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 29ED81035333 for ; Thu, 5 Jul 2018 15:49:57 +0000 (UTC) (envelope-from nparhar@gmail.com) Received: from mail-pl0-x234.google.com (mail-pl0-x234.google.com [IPv6:2607:f8b0:400e:c01::234]) (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 9E12683969 for ; Thu, 5 Jul 2018 15:49:56 +0000 (UTC) (envelope-from nparhar@gmail.com) Received: by mail-pl0-x234.google.com with SMTP id a7-v6so1447885plp.3 for ; Thu, 05 Jul 2018 08:49:56 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:mail-followup-to :references:mime-version:content-disposition:in-reply-to:user-agent; bh=51TYcZm086JsSp4EriIxLMNxQI6NEyMdHWvuX6+iKFQ=; b=f2qPfPLE8OAxoy79MnkwCAsgmjv1XrYXNPFmxlRQMWmal6CTULQMGKfSu72ul4Gu9E GmhYMb5DbGmutRQcT3n9EzfWaOb/yJgYANIgUyWxh2bJNIwdOW1LCTNOIJnjuW+fIJIG oQol5ihl6pQARVuE4aGhdNySvy2hu/A1GK9S603XjXFEDaIlPwhiWNjuGBAidUTGhCYe p6w4xYUSYKfZvJB/0arOZisgbZXdSJinCfXjwTXBWHQ9x4wkzUWzff3buHcj8NCQ8ebV /cuGC83st7lvo2/Y9LssEyWfXQe+vEGocliKIkZwNFqf4SUlEtdYhXBlx3/Oy1hxDN3j rCxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :mail-followup-to:references:mime-version:content-disposition :in-reply-to:user-agent; bh=51TYcZm086JsSp4EriIxLMNxQI6NEyMdHWvuX6+iKFQ=; b=uZ7GhJAtC6Tfq+GwhG0SwoYUIwhtRWllKPwLtUgbo8Y27R2c/LgtIM612XRekyzQWo BWB7s0j7C3G39VT/R6WSNW28Lfw7HtmotS3MRvIDJe+4vucBWUw19YWYlhnZmocD/vO7 pDY5RCUPXybgKeBUVzljo2ZLem6BkkwEkivMZsqWHH2YH7qfcNrGC1KxYvrUPDmXdAbV HIMzk4615w/GfBGROwBiVV05PJgQlj6fCTl/Q01pRQXeYbUzkT+NNNt8u6TJz4G9bV4h 6wSHbA9KibAvMl1JM1TZzWh/3tJDDDLyviCFS9JymTcP57Xg6qZZJzi7qb7eYHsvfwNy X0wQ== X-Gm-Message-State: APt69E3lu/ecZ3unVbnT9Aqy6uXW8/1XuxCHHuAZwrCgSlwWHvZcvDVZ vX2Ta2RO0Md6D/aIslHhaK2ZTQ== X-Google-Smtp-Source: AAOMgpdcqOt/NXmh5o7ImxUYluwF//RCwaeurEfEjPmd27rfDT0dhhg1kVdrpwsJAS8Qr4oVcergXA== X-Received: by 2002:a17:902:201:: with SMTP id 1-v6mr6839997plc.310.1530805795577; Thu, 05 Jul 2018 08:49:55 -0700 (PDT) Received: from ox ([2601:641:c000:b800:d5c1:4c21:1e88:ba92]) by smtp.gmail.com with ESMTPSA id l8-v6sm14845848pfb.102.2018.07.05.08.49.54 (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Thu, 05 Jul 2018 08:49:54 -0700 (PDT) Sender: Navdeep Parhar Date: Thu, 5 Jul 2018 08:47:10 -0700 From: "np@freebsd.org" To: "Eggert, Lars" Cc: "freebsd-net@freebsd.org" , Giuseppe Lettieri Subject: Re: netmap & chelsio Message-ID: <20180705154710.GA3353@ox> Mail-Followup-To: "Eggert, Lars" , "freebsd-net@freebsd.org" , Giuseppe Lettieri References: <94019926-B14F-47AB-8AD9-C01B4A0E199F@netapp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <94019926-B14F-47AB-8AD9-C01B4A0E199F@netapp.com> User-Agent: Mutt/1.9.4 (2018-02-28) X-BeenThere: freebsd-net@freebsd.org X-Mailman-Version: 2.1.27 Precedence: list List-Id: Networking and TCP/IP with FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 05 Jul 2018 15:49:57 -0000 On Thu, Jul 05, 2018 at 03:09:33PM +0000, Eggert, Lars wrote: > Hi, > > when receiving packets via netmap (current GitHub version) on a Chelsio T6 > vcc0 device on -CURRENT, it appears that the Ethernet header starts at an > offset of two bytes into the netmap slot. So far, I have only used netmap with > various Intel NICs, where the Ethernet header starts at offset zero. > > Is this a bug? Is this to be expected? Set hw.cxgbe.fl_pktshift=0 in loader.conf to stop the chip from doing this. See cxgbe(4) for details on the knob. It's a historic optimization that doesn't seem to matter on modern CPUs, so the driver default should probably be 0 instead of 2. Regards, Navdeep