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 682E2A00C3; Wed, 7 Dec 2022 16:14:12 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 0964640F17; Wed, 7 Dec 2022 16:14:12 +0100 (CET) Received: from NAM12-DM6-obe.outbound.protection.outlook.com (mail-dm6nam12on2052.outbound.protection.outlook.com [40.107.243.52]) by mails.dpdk.org (Postfix) with ESMTP id CAFBF40156 for ; Wed, 7 Dec 2022 16:14:09 +0100 (CET) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=gNGW6cGWVibHOr6KyXTskTnfCtbpeennZBFd4jFs9w4syumLoc/M77anBkckB61pgJ2ney5+z/aq1ifUfrW4D3bS96an6N+zZ4YeeGge/NCKyvnZoLIoCFmauEG9Q02eF9mxSFf2WOKZSbezERvNyXqkq+MKsWpHGAlIwffI6wYPiL08gWJ8Rcsumf3gY83Se4fxypUUUBSnTnGAqoh4G2aLYP7cMg/dwHVIbu/RqnN7/LUZSmQI4qn1se1EOP1yX20ImFeQlFFzbZxEFEBcfzkByPQht75nDoxEp/D693S5Mx/UugA/7d6/UH+BGm0CGv0IqWTwQA+uEMkLSxSVpg== 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=414vMxL3SPtHtwwSVzIRVajoYyNHf9KiJJQOKFwDL10=; b=D+F591BjQ17txYGg0wKw5rcKXLwga+hjmmxs6kcZdy/FkwqfhHvKney/tl2OFXASjDvsp+GBiXMAlCA4kJhT/7IvRsUPBxjtV7PNgUNmI2uHDKaQ3HQOsJ9isiMRmoAKHebxNg80dTrYQKbfbS1pqx3X8U9/Jx18gHGqLkwkp+zO0Hndvn7BOAnZP8uNzfkbsDmGuyx3ZdjvoK9N6ee3Dx1XBF1Re7EXqdNXpmI1FvYkff+njFeDEcWKXAPZv9/vBg7fmzQUlijtAJI5ft8uybGNmpQVNEmlP6dCJvnApcV4m+U+AFIPjExlPwgXKoQUiZ5eAFCOrXeRP7jT9sbkzw== 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=414vMxL3SPtHtwwSVzIRVajoYyNHf9KiJJQOKFwDL10=; b=SIuk+81P70v7rRIBLzkL30nLMAMWGzmIhb9pwH0y1FlliBGm5mw/6bVvAAXL5098uCVueK0GBzt1itHpQDRkue09UPGoz40zfcsEmEoqQNmc0qAJVIAo5ydtBz/K38kSBvjK9XozcNF09WUQTJaWvKsjH4wQCHVfDOGGhLzjSuU= 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 DM6PR12MB4466.namprd12.prod.outlook.com (2603:10b6:5:2ae::10) 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 15:14:08 +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 15:14:07 +0000 Message-ID: <1520db83-9e0f-9973-f2e1-d2a91a3b3104@amd.com> Date: Wed, 7 Dec 2022 15:14:03 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:102.0) Gecko/20100101 Thunderbird/102.5.1 Subject: Re: [PATCH v2] net/memif: default to physical socket 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> From: Ferruh Yigit In-Reply-To: <20221017121246.9721-1-nathan.skrzypczak@gmail.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-ClientProxiedBy: LO4P265CA0153.GBRP265.PROD.OUTLOOK.COM (2603:10a6:600:2c7::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_|DM6PR12MB4466:EE_ X-MS-Office365-Filtering-Correlation-Id: 7c53f65b-a6e5-4236-e53b-08dad865afa3 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: +GxbAyOLCA1bxrqyY9rdVxaxPe837gxrV422QVbhtCi+piRAav0qsiGXBWMPStvW5qc0tfPWMe+pW8j67LyH0s0vNcR2LFD2lg1w6Ls/hwALqmVZq4Ke7Nd1lSWMKgB45g6B2wH8KsSGl0K2FsYRS/lcCVsA9oPgumMHKdp6JYj/4F3hJWuB0DlbK2fprvPCb0KSdx5BMFNQy+33uLD5ZViE5DjGnL6It+O77n6Zc1VWmwqXZCT2IVBmwP6dc/oFJiHGb8nMsI5fiktHadnin5+dTnxTtpqYCv0tfQkwyaNW2HFfH/2tXheUJp4u/yTYqt+5sJzX5bk50bt5KHPxmKGetNbfAId1SjcnTTq84aoPuCzgyaTvvI0aw3/vXyi7bksya1e82f8g4pFzfPhW83iaOlB+7/lQ7g6UfG/mJegycVeBjojNr7gvh6QSzoXS0Yegp4g7tULKLNsXptTWeYSwy/LcQXhyU9yojxGGNjTxOUHoeEm6IeWqrTUz3VfkdOXUlg0jPEF/BEsRFjbNwN+b3q6TCOtOH6T660J+VDpPBP9x0oCRb173EZeI4PJTjuav4tQBMSGWwGGihD0qrkXhQndyQwcKGdjXLb4XTF9v+Il9aNnOpa0hWXPtnXSXlAURrbqDTOATv0G38FXF9TBnsQBE8PXpYeEtp0p7ZdmYRDgKs2HsbtiRAsmo6kLwrTRN2tEtI/vLBzJGvPbJrC+2afdsQIfh9KSfumPbSfA= 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)(396003)(346002)(376002)(366004)(136003)(39860400002)(451199015)(83380400001)(38100700002)(31696002)(8936002)(4326008)(66946007)(66476007)(6916009)(86362001)(44832011)(2906002)(41300700001)(66556008)(8676002)(478600001)(6666004)(5660300002)(53546011)(6506007)(186003)(26005)(6512007)(316002)(2616005)(6486002)(31686004)(36756003)(43740500002)(45980500001); DIR:OUT; SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?NE8ydDlCSzg5VjcyZWs5NGJIbUgwcFJyMSt1SzZxdHdQc3k3MnJPWUoxa0sw?= =?utf-8?B?YnJVQ2oyQUgyMlBIWTNsSkVPdzQ5YkRONVJVTnhtZEJDcWRVYmlKUGlOdDg4?= =?utf-8?B?ZGpyVUZxUU5NWnByRjZvczlJL3BSUlFDdUl2Z3JFbFc2S2JOR3ZvTXZUWGxU?= =?utf-8?B?Z01zbVZHckVpc2tTSVdPNFpRTUxab21Db1lKd1BXb1lhUk5EMUZLYzdmTFho?= =?utf-8?B?cnMwNlY5MmlzSkxPcHBDUHd5Q3ZSZDNZRWlpR1JwU2F1VmdHeS9uajZtSmcx?=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g3UUh4aHEvNVN6UVpacW5CSHRx?= =?utf-8?Q?7CLxx/Yp2MdslGKUVRtiIRN4y?= X-OriginatorOrg: amd.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7c53f65b-a6e5-4236-e53b-08dad865afa3 X-MS-Exchange-CrossTenant-AuthSource: CH2PR12MB4294.namprd12.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 07 Dec 2022 15:14:07.8583 (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: VYil8lN/f4De4Q7YbFccl45KeCoNcyv6x6/YGfQvUnMcAWc24hctcZ1NHf4Hg6Yy X-MS-Exchange-Transport-CrossTenantHeadersStamped: DM6PR12MB4466 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 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 */