Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp2084146imm; Thu, 2 Aug 2018 06:04:36 -0700 (PDT) X-Google-Smtp-Source: AAOMgpfrp5g0aZYSeJSCgmCelcoL6SfsNId5PiWeGUhjqGcHeembjxG8F4u2wmbLDGW+EVldIdXK X-Received: by 2002:a63:1f4d:: with SMTP id q13-v6mr2741105pgm.241.1533215076890; Thu, 02 Aug 2018 06:04:36 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1533215076; cv=none; d=google.com; s=arc-20160816; b=co/HDwIF9z9JOm9VZadMBpGGfKk9GGSGdvDSOzMvbMQr10CQldof5C3EUGIo8XZc5x bHd8DXJGeI4QGW+0daZxXSTuZRnlTF7Xr2nKRGhFVxCypo608+6fKd7hNpHuAwHveadT 9d+SZ+B/tiPrl0h3XCDoqRzPMVioKsapFd4b+yagKsHEEdzlzHMUt6MFQtpHLrlexAWD HgB9If2YwYqai6yJkuCP+e5ujMxHa34T72IXzpwZGC4n3OEd3QEwtttz01cKA1AvWKJP jfq5qGQiYdz4bWA7GRf10Sd4iHTyk7apwUKUGFhSv/WxJMTNbVg1u/HkbTeLOzAy1Hhb hueA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding :content-language:in-reply-to:mime-version:user-agent:date :message-id:from:references:cc:to:subject:dkim-signature :arc-authentication-results; bh=O4XHT4t3AiikZr+66dkHznDJWTyTNlWCpe9chdfEqqc=; b=07PyyYtTz3FRlpE55vOkhm8i6lv7TvL6fvcHCtnPyZoWuLYwANOTS37x4KuK0eOq+G LOWJ6JkoJP3lRRtgePQsRTzYtxPLKJxj70nu/H2ThCdTrMlXTmFF/Bd5joxkHixSPqmb 5SDTUDXzCbeZ5M/XwskaDHswj0DlZkHbQOfxzo6DqFtQtoU4lGvGqU4AuPjIGe0WGrTX xbaUtW2DQppS/pxOSJ+qi6SH4W9OGoWXY2HZAnS4cNk5oHPbF8lI9QdWQnBR2YoJhD4i cyLmH3dx/M854z3mSTLqnJKES2JHEHY0jU6Mr9G/nyPD9/RzJ9Iye9bpWUFEler3ZpdY DqDQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=tTdORfBS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id y86-v6si2002080pfi.195.2018.08.02.06.04.22; Thu, 02 Aug 2018 06:04:36 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=tTdORfBS; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2387579AbeHBOyW (ORCPT + 99 others); Thu, 2 Aug 2018 10:54:22 -0400 Received: from mail-pl0-f68.google.com ([209.85.160.68]:34678 "EHLO mail-pl0-f68.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387469AbeHBOyW (ORCPT ); Thu, 2 Aug 2018 10:54:22 -0400 Received: by mail-pl0-f68.google.com with SMTP id f6-v6so1007506plo.1; Thu, 02 Aug 2018 06:03:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=O4XHT4t3AiikZr+66dkHznDJWTyTNlWCpe9chdfEqqc=; b=tTdORfBSXdGVsQw2TbD4m6bgEyH2e6434N2B6+AGNTlGv692DIU3sgM6Ai8tFtZsJp wieRp9nodMtRH54/1ptxxhypiFWeon18dixkP5m1fRkMnK703IfVYaO6J9zuwXSOQx41 EgytnaiyiebvlA7G2z+VVDY+h1j369vrHuqdJxeYzdaukMz3pnHiThRuZni8uNhhSRST aMiNcU/6QMBkRbZ8ZVQyHySKryUlazGl0aEtXVdxhu8Xa5ncqG50ZeeoLBppklFsrOPe CEQLEJ8joa4fZHuQzSeq4cNNRpJq7WibGdXQEq6oBSeM0Ifl/TnAi4fQWrN3od1+IGEC alXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=O4XHT4t3AiikZr+66dkHznDJWTyTNlWCpe9chdfEqqc=; b=B9WmZqafKiVH9rLaG6t+taFl8lgoUknbkyhcsgXy1dt2M7u0vflAQijtDu09Y4BR73 azRs4HkrZ/EzzsHYdEYJhxm66QqN/KhJorSVX3hk37lZkgYYa+AqoE8e748284CWecWE vNYiH9fiykZKqzQQqD2jOXlgTVF6XK9zumwjvsXJ8WUNFyOXUWR6M8C+2sgwSCW5aW53 jY4P6oe/CR0DU6eZoG4y9U/RFzUxQP7dcKNvnhYP5INrENcJICSsHCinonpMtXa0QaZy wJT4VD59n0RlKXK0iFA+EahaLy8pWmJTwcyuTrtc5DlEvngzrJzqD2+Z8Fp2ix5vwhQF cR3w== X-Gm-Message-State: AOUpUlF+d+z+5D7FIe2W6di7HFzPvabTkW4NgCUmhjhSgwYgIWVCALYV 98gT9JKiz0/vB7/4O9B3f2Ll1HUX X-Received: by 2002:a17:902:7106:: with SMTP id a6-v6mr2418603pll.28.1533214995824; Thu, 02 Aug 2018 06:03:15 -0700 (PDT) Received: from [192.168.86.235] (c-67-180-167-114.hsd1.ca.comcast.net. [67.180.167.114]) by smtp.gmail.com with ESMTPSA id e21-v6sm3221247pfl.187.2018.08.02.06.03.14 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 02 Aug 2018 06:03:15 -0700 (PDT) Subject: Re: [PATCH 1/1] selftest/net: fix protocol family to work for IPv4. To: Maninder Singh , davem@davemloft.net, shuahkh@osg.samsung.com Cc: netdev@vger.kernel.org, linux-api@vger.kernel.org, linux-kernel@vger.kernel.org, edumazet@google.com, pankaj.m@samsung.com, a.sahrawat@samsung.com, Vaneet Narang References: <20180802100201epcas5p390bb362ccabaa99087eff88af37bffb2~HCQZjTEZd0101301013epcas5p3C@epcas5p3.samsung.com> From: Eric Dumazet Message-ID: Date: Thu, 2 Aug 2018 06:03:13 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 MIME-Version: 1.0 In-Reply-To: <20180802100201epcas5p390bb362ccabaa99087eff88af37bffb2~HCQZjTEZd0101301013epcas5p3C@epcas5p3.samsung.com> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 08/02/2018 02:57 AM, Maninder Singh wrote: > use actual protocol family passed by user rather than hardcoded > AF_INTE6 to cerate sockets. > current code is not working for IPv4. > > Signed-off-by: Maninder Singh > Signed-off-by: Vaneet Narang > --- > tools/testing/selftests/net/tcp_mmap.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/tools/testing/selftests/net/tcp_mmap.c b/tools/testing/selftests/net/tcp_mmap.c > index 77f7627..e8c5dff 100644 > --- a/tools/testing/selftests/net/tcp_mmap.c > +++ b/tools/testing/selftests/net/tcp_mmap.c > @@ -402,7 +402,7 @@ int main(int argc, char *argv[]) > exit(1); > } > > - fd = socket(AF_INET6, SOCK_STREAM, 0); > + fd = socket(cfg_family, SOCK_STREAM, 0); > if (fd == -1) { > perror("socket"); > exit(1); > Darn, someone spotted my hidden attempt to kill IPv4 ;) Reviewed-by: Eric Dumazet