From mboxrd@z Thu Jan  1 00:00:00 1970
Return-Path: <adrien.mazarguil@6wind.com>
Received: from mail-wr0-f171.google.com (mail-wr0-f171.google.com
 [209.85.128.171]) by dpdk.org (Postfix) with ESMTP id AC3421B81B
 for <dev@dpdk.org>; Mon,  9 Apr 2018 17:08:05 +0200 (CEST)
Received: by mail-wr0-f171.google.com with SMTP id d1so9917541wrj.13
 for <dev@dpdk.org>; Mon, 09 Apr 2018 08:08:05 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=6wind-com.20150623.gappssmtp.com; s=20150623;
 h=date:from:to:cc:subject:message-id:references:mime-version
 :content-disposition:content-transfer-encoding:in-reply-to;
 bh=xxOP7DcNqOxU0eDY24OJrD6cIQQTufrYrSvaWGAIVV8=;
 b=P8jkaCQYEsuTeMkUIceZe1TC5GW8TsRIahZICRLk0ZkVym63Y3tk2MEpAxx+Zu+Hpn
 NC2o2allDxVV30rU6vaWNbAU66ARtB8cwt9QwEN7owG4HHrHvJAmDI++aGSevQLOXzsh
 RtFGtHndDlt+pKnSW1Jz0bwMu1CRn6BQH3jrvVwqJsdsfSIPc1NGPcU1gn++UDYkfytz
 3FZrhnF70sYaSmSpEd5U2D9jhUqNnWVJUYyudAV8j9NUf3Uwb0cJMJlacbxJk2lbeEY6
 p7XVT3e+sNXMMBxi/tERUMK/Bz6G0V1vkd8fyqExRZo6gFQtxGG1z8VO70RokSn3gobn
 oXPQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20161025;
 h=x-gm-message-state:date:from:to:cc:subject:message-id:references
 :mime-version:content-disposition:content-transfer-encoding
 :in-reply-to;
 bh=xxOP7DcNqOxU0eDY24OJrD6cIQQTufrYrSvaWGAIVV8=;
 b=Ek9wzOoep33886iJjkWmCJcIQ6JW8rdScb1JTYBYpMXC0NpJg2iyL79jDgfGClVTWQ
 W7YWnUXKyhuGT0MoG25gOKraiUrLLV3SyIJ2qFQF3Rrnlic6Je+YgDB7bs/n957bZm1c
 5a9T8DXEepliaCw+/5GaKIC5SNo3v6WpDoj3mMKlsaz+eID9GgCJZTcFnmTvHxqehZ6P
 /boZmY0u+i7GEWw0ps1uRYb5eoLHhF1B0JjCsU1eLx1SLJd1xoAFq1Q1IogqlFTIUW2j
 dbwZPDWvIeMoWFsSwxEh0CH5PhtGEEmp6QThLCgYz1+sXl6BcCWSmqSN4s7dd/GGO5Ls
 7bXg==
X-Gm-Message-State: AElRT7G7qiYc//Nm7TmHsJSkt9ow0BP26gLN2Y8MIvzJ2MOxZO18IFMi
 Ajyk+0QDySbuCl/aCEQBRPy8Bw==
X-Google-Smtp-Source: AIpwx49IvpxlTJv6wHmrG3YSxyE3poXoEEHdM/iubLS2O+CyfoSc5L8rmijObJAtJdhxoLSORyd/mQ==
X-Received: by 10.223.209.198 with SMTP id m6mr27939459wri.267.1523286485476; 
 Mon, 09 Apr 2018 08:08:05 -0700 (PDT)
Received: from 6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78])
 by smtp.gmail.com with ESMTPSA id z133sm1091495wmg.28.2018.04.09.08.08.04
 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);
 Mon, 09 Apr 2018 08:08:04 -0700 (PDT)
Date: Mon, 9 Apr 2018 17:07:51 +0200
From: Adrien Mazarguil <adrien.mazarguil@6wind.com>
To: Marcelo Ricardo Leitner <marcelo.leitner@gmail.com>
Cc: dev@dpdk.org, Timothy Redaelli <tredaelli@redhat.com>
Message-ID: <20180409150751.GC4957@6wind.com>
References: <20180403175938.GA23889@localhost.localdomain>
 <20180405092621.GI4957@6wind.com>
 <20180408212750.GA27045@localhost.localdomain>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <20180408212750.GA27045@localhost.localdomain>
Subject: Re: [dpdk-dev] Question on documentation / Mellanox ConnectX-3
X-BeenThere: dev@dpdk.org
X-Mailman-Version: 2.1.15
Precedence: list
List-Id: DPDK patches and discussions <dev.dpdk.org>
List-Unsubscribe: <https://dpdk.org/ml/options/dev>,
 <mailto:dev-request@dpdk.org?subject=unsubscribe>
List-Archive: <http://dpdk.org/ml/archives/dev/>
List-Post: <mailto:dev@dpdk.org>
List-Help: <mailto:dev-request@dpdk.org?subject=help>
List-Subscribe: <https://dpdk.org/ml/listinfo/dev>,
 <mailto:dev-request@dpdk.org?subject=subscribe>
X-List-Received-Date: Mon, 09 Apr 2018 15:08:05 -0000

On Sun, Apr 08, 2018 at 06:27:50PM -0300, Marcelo Ricardo Leitner wrote:
> On Thu, Apr 05, 2018 at 11:26:21AM +0200, Adrien Mazarguil wrote:
> > On Tue, Apr 03, 2018 at 02:59:38PM -0300, Marcelo Ricardo Leitner wrote:
> > > Hi,
> > >
> > > http://docs.openvswitch.org/en/latest/howto/dpdk/ says:
> > >
> > > Some NICs (i.e. Mellanox ConnectX-3) have only one PCI address
> > > associated with multiple ports. Using a PCI device like above won’t
> > > work. Instead, below usage is suggested:
> > >
> > > $ ovs-vsctl add-port br0 dpdk-p0 -- set Interface dpdk-p0 type=dpdk \
> > >     options:dpdk-devargs="class=eth,mac=00:11:22:33:44:55:01"
> > > $ ovs-vsctl add-port br0 dpdk-p1 -- set Interface dpdk-p1 type=dpdk \
> > >     options:dpdk-devargs="class=eth,mac=00:11:22:33:44:55:02"
> > >
> > > But these MACs are 7 bytes long. Seems the idea was to mention the two
> > > incremental MAC addresses that the ports have, and thus the ':55'
> > > should have been removed from there, right?
> > >
> > > Reading the code, it doesn't seem prepared to handle the extra byte in
> > > any (special) way.
> >
> > After a quick glance at the original patch [1], I confirm it looks like a
> > mistake in the OVS documentation. MAC addresses should be 6 bytes long, the
> > 7th byte is not a workaround to identify a physical port like I initially
> > thought.
> >
> > As you pointed out, since default MAC addresses on mlx4 ports are normally
> > incremental, documentation should read something like:
> >
> >  $ ovs-vsctl add-port br0 dpdk-p0 -- set Interface dpdk-p0 type=dpdk \
> >      options:dpdk-devargs="class=eth,mac=00:11:22:33:44:55"
> >  $ ovs-vsctl add-port br0 dpdk-p1 -- set Interface dpdk-p1 type=dpdk \
> >      options:dpdk-devargs="class=eth,mac=00:11:22:33:44:56"
> >
> > [1] https://github.com/openvswitch/ovs/commit/5e7588186839
> 
> Thanks Adrien. Question now is, who can fix the doc?

Someone should submit a request or patch pointing to this thread to the
documentation maintainer of OVS. Since it's a different project there's not
much I can do from the DPDK side.

-- 
Adrien Mazarguil
6WIND