From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-wm1-f50.google.com (mail-wm1-f50.google.com [209.85.128.50]) by dpdk.org (Postfix) with ESMTP id 346A0201 for ; Wed, 7 Nov 2018 11:53:49 +0100 (CET) Received: by mail-wm1-f50.google.com with SMTP id w7-v6so13516132wmc.1 for ; Wed, 07 Nov 2018 02:53:49 -0800 (PST) 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:in-reply-to; bh=ntA0kQEcEbBR/qOeuzH58/MYEfpGYK7tEpODbWAmack=; b=OQuUpUZVkPjGGMhBGw4sek6V3CbBQqf8mVtzzC+vxJ3d7qduWi7U7DutRpib6yogRu cEDYYnCEA24rWuB5NUkuA4AvryAFJa8qX+QVI/Ngc8U1UcILvdt/HtTi28XDgIr5Pbe8 5bqgg5FHAIA7v9XhK8fMzUf+WTcgrBWcP6N/h8utsrG6rKQeefAiI8+Obju/v5gJ+Ajd luqyGLHzFNb7cAun1TG8nIm92nVQ/BpYXRsj7sfpGREVGfZO0SG4BsrLksb1uSeZa/Ys vJucJGW6odEgvM5WQbRK0Id3hdox5jEEEp8hYaikPUf6QM5GuCid7xF358AtmoeoGsQr DK1w== 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:in-reply-to; bh=ntA0kQEcEbBR/qOeuzH58/MYEfpGYK7tEpODbWAmack=; b=WSS3QjzHDu43n9gwNY3VAZBuoDlEKcvymidyNcapJrl02bGHCRPe1dSctMv3DZr9nI PKR9oWo3bsxoJR7UC9qQ1q1ryO0dxOO6KIuW9POmMn+8a1/R8i6Kmw6a4uTn5iqZDfy0 tdF8SIZvWvkZSpEOAyiYB/1BVNFt35SzIi3dpwPXQ7XV3keYzGerLyiEEQ6P4wAIvki4 Dd2ospoVB+5m1ZaLBcnnj0q/r9OjcDhyXHLMbpOvGk8FSWnrqGj2tq8qnCcZWDJpsskT d85osvWd0gQL1jlCGN4WjUMHvgXplV7gZqlAubjBfdo8E/nm5C/eaWIEiVCcdysY/uqm Yn8A== X-Gm-Message-State: AGRZ1gIl5lyAhahvbhzaAWN+8bQ8Icmoow7fY6XPc0iEwzBF1DRlZqY3 JZWiCtqTczDb3dRs/dvRzS/i+Q== X-Google-Smtp-Source: AJdET5cMWi7iNObHDo8uYWJry7wetByo5Cf1Uebo9BXHXUH5P9OcMH0X/168wJbowA89q3orSaehQw== X-Received: by 2002:a1c:cf02:: with SMTP id f2-v6mr1685489wmg.34.1541588028890; Wed, 07 Nov 2018 02:53:48 -0800 (PST) Received: from 6wind.com (host.78.145.23.62.rev.coltfrance.com. [62.23.145.78]) by smtp.gmail.com with ESMTPSA id r198-v6sm5305126wmg.0.2018.11.07.02.53.47 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 07 Nov 2018 02:53:48 -0800 (PST) Date: Wed, 7 Nov 2018 11:53:29 +0100 From: Adrien Mazarguil To: Cliff Burdick Cc: users Message-ID: <20181107105329.GJ4638@6wind.com> References: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Subject: Re: [dpdk-users] Hairpin with rte_flow? X-BeenThere: users@dpdk.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: DPDK usage discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 07 Nov 2018 10:53:49 -0000 On Fri, Oct 19, 2018 at 11:25:42AM -1000, Cliff Burdick wrote: > Does anyone know if it's possible to do a hairpin mode using rte_flow? For > example, if I send a packet to 10.1.1.1, in tx queue 0, but I also have a > flow rule to send 10.1.1.1 to rx queue 1, is there a way to get the nic to > do that without sending the actual packet out? Mellanox appears to support > a hairpin mode, but it doesn't look like it's through dpdk. Hairpin on the *same* port cannot be expressed through rte_flow yet. On the other hand something similar can be achieved using a port representor. Assuming port 3 is VF and port 4 its representor, with testpmd you could do: flow create 3 transfer egress pattern eth / ipv4 dst is 10.1.1.1 / end actions port_id id 4 / end flow create 3 ingress pattern eth / ipv4 dst is 10.1.1.1 / end actions queue index 1 / end The first rule requests the device to actively route matching egress traffic from port 3 through the representor (port 4). Since traffic received by a representor should be fed back to its associated VF, that traffic should be received on port 3. The second rule is not mandatory, however without it RSS might otherwise dispatch it to a different queue. Question is which drivers implement this use case. While I'm aware mlx5 supports PF/VF/representor redirections, I don't know if a VF can feed its own representor like that. A true hairpin action is missing anyway. -- Adrien Mazarguil 6WIND