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 C8445A0542; Mon, 24 Oct 2022 17:34:07 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id EBDBB42BEE; Mon, 24 Oct 2022 17:33:13 +0200 (CEST) Received: from aer-iport-3.cisco.com (aer-iport-3.cisco.com [173.38.203.53]) by mails.dpdk.org (Postfix) with ESMTP id 49B7B40143 for ; Mon, 17 Oct 2022 14:13:28 +0200 (CEST) X-IPAS-Result: =?us-ascii?q?A0B1BQCMRk1j/xbLJq1aHgEBCxIMggQLgiyBTywSRY1Mi?= =?us-ascii?q?BiDFogukVqBfAsBAQENAQFCBAEBPgGERgKEbSY2Bw4BAgQBAQEBAwIDAQEBA?= =?us-ascii?q?QEBAwEBBQEBAQIBBwSBCROFdYZDBicLASkEGRAWOyECNBmCfYJtAQMwA6wYF?= =?us-ascii?q?gUCFoEBhHCBbgoZKA1oA4FigT2EeIIOAYN2hTY3gVVEglGCLIIgiGEEg3mOF?= =?us-ascii?q?ogwBAUjAwMCIQMJAwcFSQIJAyMPAwsJCAcMARYpBgMBAQoCAQQBBQMBBAUDB?= =?us-ascii?q?wIBBQYCCQMJAwEBBQEDBAMDAwIHAwECDAQIAwMCAwQCAgICAQMCBwUIBAIHA?= =?us-ascii?q?gICAQICBgIBAwkBAgMFAgIJCwEEAgIDAQMBAQIIBAkEAgMEAgEBAwIBAgIBB?= =?us-ascii?q?QIMBQEBAQECBQECAwEGBwIIAg4OCgEDBAICBQICAQIDDQEBBAIBAgECBgEDA?= =?us-ascii?q?QICAwEDAQICAwIGCQIEAQUDAwICAwEBBQ8FAgQCAQIGBQIBAQEEAQMEBAYCA?= =?us-ascii?q?gEDAwIOAgQBBAECAQEjAwQCAwEDFwECAQIDAwMEBgcFAgECEwECAQEBBQECA?= =?us-ascii?q?QEDBAQHCQMCAgQDAwUBAQIDAgEBAQcMAgICEgITAwEGAQ4FFAMCBAICAQICC?= =?us-ascii?q?gMBAgIBAwIJAgECAQUgAwEBDyQBAQICAgMEBwIBBAYDDQICAQEBBQYNAwIDC?= =?us-ascii?q?AEMAgcDAgEDBQICBAECBAoJAQICAQIEBQcCAQgGBQ0FCQsBAQIBAwcEAxECB?= =?us-ascii?q?QMFBQMDAgEGBAUCAwECAQEDBAMEBAEBAgMCAgEGAgIBAQMDBAMBAgYCAgcCA?= =?us-ascii?q?wIBBAIDAwEBAQICAgICAgMDCQIIBwUBBgECAQQDAgIBAgcBBAEIAwMFBQEKD?= =?us-ascii?q?wMFAwEDAwIUCgUBAwgGCAIEBQIFAwIEAgMCAggDAgQDCwMFBAIHEwcCAwICB?= =?us-ascii?q?QICAgICBQQDAQICAgICAgUCAwIBBQECAgECAgIEAQICBwQCAwEDBA4EAwICA?= =?us-ascii?q?gUBAgIBBgIHAwECAQQDAQEEAgQBAgUCBAEDBgIEAwoCAgMCAgIGBQMDCggCA?= =?us-ascii?q?wUCBAEBAgcEAgILAQYCBwICAxABAwEEBQUDAwMJAgIDAgQCAgoBAQEBAgIBB?= =?us-ascii?q?wIEBw8CAgIEAgICAQMCAgEBAgIKEgEBAgMGBAYFAwIIGAEGAgEBAgIDAwIGA?= =?us-ascii?q?gECCAIEAQQFAgECAgICBAEDBgIDAQECAQICAwMCAQQCBAMDAQIBAgICAwICA?= =?us-ascii?q?gMCAgEPAgYGAQICAgICAgICAgEFAQIBAgQCBwIEAwIBAgIFAgICAwEBBgIEC?= =?us-ascii?q?wEDAgcGAQMCBwUCAwEEAwQDAwUGBQwIAQUBAwEeAwICCAIHAgEGBQEPAwICA?= =?us-ascii?q?wICAQQKAgMFAgQCAQQJBwIEAQIJAwIGAgcFGAECAgcEDAoCAgIFBgIEAQECA?= =?us-ascii?q?wECAQECAwQCAwIEBQEFAgECBQQCAgEBAgUCDAECAQcGAgcCAgICAwEEAgECA?= =?us-ascii?q?QMD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XCurgRqukoy2WF1hU1/011llPgpo DlBWADZpQoBZsXxdOohvxZwSWZkIPcB2I78cGWDv9HU5GToUUKyzKA7ZK02FdVwFudfCGxUs PcfMj1IMFaIhvm9x/SwTewEasYLdZawethP/Cs4lneDV57KQribK0nOzdlRwDc5gIZVHuzMd tISezNsRBvFahxLfFwQDfrSmc/02iKuK2YBwL6TjZMKxVj2zwhD7JTsPorZPfeMH9wWuH/N8 woq+Ey8WHn2Lue3wDyJ6H+zwPXelyj7VYQRE5W/9eJnnFmazHdVEgB+fVe2v9G1kkK9HdVFJ CQpFjEGpKUosU2zScPhGhuxvDiPvwUXXJxbFOhSBByx95c4Kj2xXgAsJgOtovR/3CPqbVTGD mO0ou4= IronPort-HdrOrdr: A9a23:+stNLaAa46RJuQXlHemD55DYdb4zR+YMi2TDGXocdfUzSL39qy nAppomPHPP4gr5HUtQ+uxoW5PwJE80i6QV3WB5B97LNzUO+lHYTr2KhrGM/9SPIUDD398Y/b t8cqR4Fd37BUV3gILH+gWieuxQp+VviJrJuQ8bpE0dND2DrMpbnmFENjo= X-IronPort-Anti-Spam-Filtered: true X-IronPort-AV: E=Sophos;i="5.95,191,1661817600"; d="scan'208";a="4439031" Received: from aer-iport-nat.cisco.com (HELO aer-core-6.cisco.com) ([173.38.203.22]) by aer-iport-3.cisco.com with ESMTP/TLS/DHE-RSA-SEED-SHA; 17 Oct 2022 12:13:18 +0000 Received: from NSKRZYPC-M-J01W.cisco.com (dhcp-10-61-101-141.cisco.com [10.61.101.141]) (authenticated bits=0) by aer-core-6.cisco.com (8.15.2/8.15.2) with ESMTPSA id 29HCD422117173 (version=TLSv1.2 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 17 Oct 2022 12:13:16 GMT From: Nathan Skrzypczak To: dev@dpdk.org Cc: andrew.rybchenko@oktetlabs.ru, Jakub Grajciar Subject: [PATCH v2] net/memif: default to physical socket Date: Mon, 17 Oct 2022 14:12:46 +0200 Message-Id: <20221017121246.9721-1-nathan.skrzypczak@gmail.com> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221010104038.15867-1-nathan.skrzypczak@gmail.com> References: <20221010104038.15867-1-nathan.skrzypczak@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Authenticated-User: nskrzypc X-Outbound-SMTP-Client: 10.61.101.141, dhcp-10-61-101-141.cisco.com X-Outbound-Node: aer-core-6.cisco.com X-Mailman-Approved-At: Mon, 24 Oct 2022 17:33:01 +0200 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 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. 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 */ -- 2.38.0