From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mails.dpdk.org (mails.dpdk.org [217.70.189.124]) by inbox.dpdk.org (Postfix) with ESMTP id A4D61A00C3; Wed, 7 Dec 2022 18:15:16 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 3F348410D7; Wed, 7 Dec 2022 18:15:16 +0100 (CET) Received: from NAM11-BN8-obe.outbound.protection.outlook.com (mail-bn8nam11on2041.outbound.protection.outlook.com [40.107.236.41]) by mails.dpdk.org (Postfix) with ESMTP id 8C70A40156 for ; Wed, 7 Dec 2022 18:15:14 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=W8rd9ucgIBlSKRe+lTHx1MTdHsYehQfuT3cp0AqEdYEqR6sSgmilhWJxrITtvJ6W5kcBrOQulVW6X9OmCyfoZUKvdtPYcQtzLq+MJNuRj1GFhiXnANzlmeSW2oN9/Fq54lbEQWfHFL9/Zh/3Zg5PftM1S4CSrat+gCqIlWejMFviTboql1SJi4pELFsAdZiNIDKudMECYrdIGUh/PjzA1QPUQisnkSlQDn9DhCBmkculmzG4toAui8GfRxflgGLDn/ovHYQBaN8HZAWOxRg1M3XvB2YzDETNS0BSKeLi7HWCoSchZ8+sXVr9ENdsRV9+t0CCL4lb/bxL4ZbABs08rQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=yAzc6wqYGf1Yi3+SJG6gYkP0s9NQAfFwYmCNrJYK7eM=; b=cAfEXIVtIkqRpUWuUkhyqYsyABQ7SpsMdiqZVGzSaneiVsDClzcMFFWGVzhhgAb+pkoH4MCcGgkK7zFofUHlrHDVYLD+nsg5gH4/eCAIxsd4jd91T9uUDiMj5Sb4vESjEs+S7le7MCh2VQBxhrMDkHjEqel5D3OJxSWmmBDXVrxP/38KNhpVtCHD9sWCsbU5XapTfsAjW/iXyKwkqD2L7LQR+MXTFnmzH3b5syInFIv6ur36wfsQ9fah8xYKYZkQazJHd0jNksasfEG8j43x3dsRRkElV/HhMy32gcvkAt6w9xJ3mfn9rM61cC4m/Ei26XoRDPnb3cQy+Mghegjn+Q== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=amd.com; dmarc=pass action=none header.from=amd.com; dkim=pass header.d=amd.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amd.com; s=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=yAzc6wqYGf1Yi3+SJG6gYkP0s9NQAfFwYmCNrJYK7eM=; b=FbTo8VdZG9R6AO5XBDA52bRPcj344/9HEtSY0CfXH1NXQNY6VKDXQu6osfivFBsDWYflRSwViujiljMvWEqtiTIaa2wwBEhAe5qZ4Unc4XBKzFtXlDegpoiQHQhpGoH7UdBJdjfXmTaAmQNPFUZ6bJOS2ACNGAGH9b5iFZmo9Ws= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=amd.com; Received: from CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) by PH7PR12MB6000.namprd12.prod.outlook.com (2603:10b6:510:1dc::15) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5880.14; Wed, 7 Dec 2022 17:15:11 +0000 Received: from CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::b482:d5bd:c7d0:3842]) by CH2PR12MB4294.namprd12.prod.outlook.com ([fe80::b482:d5bd:c7d0:3842%8]) with mapi id 15.20.5880.014; Wed, 7 Dec 2022 17:15:11 +0000 Message-ID: <625cb85c-4d10-6912-48ad-971e809da0b8@amd.com> Date: Wed, 7 Dec 2022 17:15:06 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.5.1 Content-Language: en-US To: Nathan Skrzypczak Cc: andrew.rybchenko@oktetlabs.ru, Jakub Grajciar , dev@dpdk.org References: <20221010104038.15867-1-nathan.skrzypczak@gmail.com> <20221017121246.9721-1-nathan.skrzypczak@gmail.com> <1520db83-9e0f-9973-f2e1-d2a91a3b3104@amd.com> From: Ferruh Yigit Subject: Re: [PATCH v2] net/memif: default to physical socket In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-ClientProxiedBy: LO4P265CA0176.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:312::16) To CH2PR12MB4294.namprd12.prod.outlook.com (2603:10b6:610:a9::11) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: CH2PR12MB4294:EE_|PH7PR12MB6000:EE_ X-MS-Office365-Filtering-Correlation-Id: 58720745-3e09-48e0-bea2-08dad8769901 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: 03Mkb0U41tp1zeu44MDmOB63qlncCs5tDaxilecCdrVIrhAFMvVQSnXDDZOUofpQiyOqo4F2aJ2OyTFkFde1WWJn4RROuzTWMtbuTzdGkSTOO+W0XrayrlZg+mBesV8k0fuy4hSDZWAutogD2cow2Qk6q3e7n7r5VL2ky4hPdkkZR8RqlPTOoUSxixL3rR2bfJZOz3rD0Ipp5ijsoCaFxTLjPlXKsW+zhDgNAxwiXsW6SquMT0YWuFq0tgq8HD8jUYEp5GvRXmrXcdD5Hgwu1aaQdkGkjJA2igu6uO9YHrDe7Mqd8Aa2Vgkaepya/+E6uOyQfOYGHOYFiNASudrlEcSnJNfB0PabBhXx0sQUw1lA8uORw5c/9D3RChTvpqfS+L7HaPUJXInWrcaDV077hJMh/ii9tYKI2cRzXnpUsiiV1RrVooXvhvSSZg0O4P+fMJhq8TwCOs4XwxUssDk4ojFC3ZSub4ImSEMEwX52Ji2CjybU38A3BuOuf1dPop1dAF+FTQbAfmORfP9yTHLS2ZkH58Wx6lsUhJuzdSQn5cHVJ+3wHtnNroWwDF+yok4lpyTSU+0MRrX2LpJDndP1VtawXiMaOn/qYehqtUZRoKK775aqbi8tdH344ZZ5U67ZgSCBbCTpN+GucVeZh5wOVpS6AmVsMrtBsQVB9POJy69jtidJZKFAm7+m88fX3rdyIbUJGo1X7R/hF3JFewLsMKgcnj5LMwCJIA578KqQ09U= X-Forefront-Antispam-Report: CIP:255.255.255.255; CTRY:; LANG:en; SCL:1; SRV:; IPV:NLI; SFV:NSPM; H:CH2PR12MB4294.namprd12.prod.outlook.com; PTR:; CAT:NONE; SFS:(13230022)(4636009)(346002)(39860400002)(366004)(136003)(396003)(376002)(451199015)(316002)(44832011)(86362001)(41300700001)(6916009)(66574015)(5660300002)(31696002)(66946007)(4326008)(36756003)(66556008)(8676002)(66476007)(83380400001)(8936002)(186003)(2616005)(38100700002)(6486002)(53546011)(6512007)(6666004)(26005)(6506007)(478600001)(2906002)(31686004)(43740500002)(45980500001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?MkM3N0twTlVGbjVNM21LTW1jVzlvV2RPdnJOQWhvbVg2dXFOTTRjWUlvcnlk?= =?utf-8?B?WXJucEFwaGtMaFh3Q3B2MHJ5UFp5andsMVo5TlZJWVdrZzFwY3lKS0pja2FK?= =?utf-8?B?ZEJaTTdaUTBqblU3L2Z1OVVaUkFlUk83OGROQ1BNZGEyRjhWUlV4UmxpMjBk?= =?utf-8?B?a0EvYXZvWEJvWldWSFpRN21zaE1uREcvM0NwaTVnMFE1dWpkRHp5NDRLT2g5?= =?utf-8?B?OVIwYjhBM1l3ZXBLYjlIN3RySmdZNkJONGhNZTU0cUhBUmN4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5eWtDNkcrcElCc0ROcjdJUlNLU2gyc1NqR3lSb1Y3ZnVKS3IyUitX?= =?utf-8?Q?f3ZCmkMz4+5ATaSKBG0qK4OGe?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 58720745-3e09-48e0-bea2-08dad8769901 X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Dec 2022 17:15:11.3614 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 3dd8961f-e488-4e60-8e11-a82d994e183d X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: oeAQXk+wKTV3EC+hboBZNCiHnJBa97Vs85MEB9fsuLB/YQMw7yVBjZLU3SukBGZK X-MS-Exchange-Transport-CrossTenantHeadersStamped: PH7PR12MB6000 X-BeenThere: dev@dpdk.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: DPDK patches and discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dev-bounces@dpdk.org On 12/7/2022 3:56 PM, Nathan Skrzypczak wrote: > Hi Ferruh, > Hi Nathan, > Thank you for your reply,  > > On the potential confusion for users of the DPDK memif PMD : when > defaulting to abstract sockets was added in [0] (v20.10 release) > it did change the existing behavior, so reverting it would restore the > old behavior.> Also abstract sockets are quite a unusual feature in linux (a 0byte > prefixed string...), so I'm expecting most users of memif to just use > regular sockets because they're way easier to handle. > Not sure if regular socket is easier to handle, or users prefer regular sockets, we need more input on these. > Also my guess is it will probably bug people if the way to use regular > sockets is to pass `abstract-socket=false` to the PMD config. > What do you think ? > I don't have a preference about the default config, but I also don't have enough justification for changing the current behavior. @Jakub, as driver maintainer, do you have any preference? > Cheers > -Nathan > > [0] 2f865ed07b > > Le mer. 7 déc. 2022 à 16:14, Ferruh Yigit > a écrit : > > On 10/17/2022 1:12 PM, Nathan Skrzypczak wrote: > > This patch changes the default value of the memif abstract > > socket flag to false. The implementation of memif with > > abstract sockets made abstract-socket=yes the > > default in [0] which might confuse users. > > > > Hi Nathan, > > OK to update logs to clarify nature of the socket, > > but why do you think making abstract socket default socket type confuses > the users? > > > This patches makes 'socket-abstract=no' the new default, > > and adds warnings mentioning the nature of the socket > > concerned in an attempt to avoid future foot-gunning. > > > > [0] commit 2f865ed07bb6 ("net/memif: use abstract socket address") > > > > Signed-off-by: Nathan Skrzypczak > > > --- > >  doc/guides/nics/memif.rst         | 2 +- > >  drivers/net/memif/memif_socket.c  | 7 +++++-- > >  drivers/net/memif/rte_eth_memif.c | 3 --- > >  3 files changed, 6 insertions(+), 6 deletions(-) > > > > diff --git a/doc/guides/nics/memif.rst b/doc/guides/nics/memif.rst > > index aca843640b..43d1cd1b38 100644 > > --- a/doc/guides/nics/memif.rst > > +++ b/doc/guides/nics/memif.rst > > @@ -43,7 +43,7 @@ client. > >     "bsize=1024", "Size of single packet buffer", "2048", "uint16_t" > >     "rsize=11", "Log2 of ring size. If rsize is 10, actual ring > size is 1024", "10", "1-14" > >     "socket=/tmp/memif.sock", "Socket filename", > "/tmp/memif.sock", "string len 108" > > -   "socket-abstract=no", "Set usage of abstract socket address", > "yes", "yes|no" > > +   "socket-abstract=no", "Is the socket an abstract socket", > "no", "yes|no" > >     "mac=01:23:45:ab:cd:ef", "Mac address", "01:ab:23:cd:45:ef", "" > >     "secret=abc123", "Secret is an optional security option, which > if specified, must be matched by peer", "", "string len 24" > >     "zero-copy=yes", "Enable/disable zero-copy client mode. Only > relevant to client, requires '--single-file-segments' eal argument", > "no", "yes|no" > > diff --git a/drivers/net/memif/memif_socket.c > b/drivers/net/memif/memif_socket.c > > index 4700ce2e77..5344e60147 100644 > > --- a/drivers/net/memif/memif_socket.c > > +++ b/drivers/net/memif/memif_socket.c > > @@ -939,7 +939,8 @@ memif_socket_create(char *key, uint8_t > listener, bool is_abstract) > >               if (ret < 0) > >                       goto error; > >  > > -             MIF_LOG(DEBUG, "Memif listener socket %s created.", > sock->filename); > > +             MIF_LOG(DEBUG, "Memif listener %s socket %s created.", > > +                     is_abstract ? "abstract" : "", sock->filename); > >  > >               /* Allocate interrupt instance */ > >               sock->intr_handle = > > @@ -1139,7 +1140,9 @@ memif_connect_client(struct rte_eth_dev *dev) > >  > >       ret = connect(sockfd, (struct sockaddr *)&sun, sunlen); > >       if (ret < 0) { > > -             MIF_LOG(ERR, "Failed to connect socket: %s.", > pmd->socket_filename); > > +             MIF_LOG(ERR, "Failed to connect %s socket: %s.", > > +                 pmd->flags & ETH_MEMIF_FLAG_SOCKET_ABSTRACT ? > "abstract" : "", > > +                 pmd->socket_filename); > >               goto error; > >       } > >  > > diff --git a/drivers/net/memif/rte_eth_memif.c > b/drivers/net/memif/rte_eth_memif.c > > index 5b5cae34ea..81e502ccaf 100644 > > --- a/drivers/net/memif/rte_eth_memif.c > > +++ b/drivers/net/memif/rte_eth_memif.c > > @@ -1823,9 +1823,6 @@ rte_pmd_memif_probe(struct rte_vdev_device > *vdev) > >               MIF_LOG(WARNING, "Failed to register mp action > callback: %s", > >                       strerror(rte_errno)); > >  > > -     /* use abstract address by default */ > > -     flags |= ETH_MEMIF_FLAG_SOCKET_ABSTRACT; > > - > >       kvlist = rte_kvargs_parse(rte_vdev_device_args(vdev), > valid_arguments); > >  > >       /* parse parameters */ >