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 73A76A0544; Tue, 11 Oct 2022 03:51:13 +0200 (CEST) Received: from [217.70.189.124] (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 8BA8242BC0; Tue, 11 Oct 2022 03:51:10 +0200 (CEST) Received: from aer-iport-4.cisco.com (aer-iport-4.cisco.com [173.38.203.54]) by mails.dpdk.org (Postfix) with ESMTP id 6EC4D42802 for ; Mon, 10 Oct 2022 12:40:44 +0200 (CEST) X-IPAS-Result: =?us-ascii?q?A0DHAwCa9UNjlxbLJq1agliDeiwSRY1MiBeDFogtkVWBf?= =?us-ascii?q?AsBAQENAQFCBAEBPgGERoR3JjYHDgECBAEBAQEDAgMBAQEBAQEDAQEFAQEBA?= =?us-ascii?q?gEHBBQBAQECAjcFEDWFdYZwCwEpBBkmXAJNgn2CbQEDMAOteRYFAhaBAYRwg?= =?us-ascii?q?W4KGSgNaAOBYoE9hHiCDgGDdYVrgVVEglGCLIIgiGEEg3+OIodyBAUjAwMCI?= =?us-ascii?q?QMJAwcFSQIJAyMPAwsQCAcMARYkBgYFAQEKAgEEAQUDAQQFAwcCAQUGAgkDC?= =?us-ascii?q?QMBAQUBAwQDAwMCBwMBAgwECAMDAgMEAgICAgEDAgcFCAQCBwICAgECAgYCA?= =?us-ascii?q?QMJAQIDBQICCQsBBAICAwEDAQECCAQJBAIDBAIBAQMCAQICAQUCDAUBAQEBA?= =?us-ascii?q?gUBAgMBBgcCCAIODgoBAwQCAgUCAgECAw0BAQQCAQIBAgYBAwECAgMBAwECA?= =?us-ascii?q?gMCBgkCBAEFAwMCAgMBAQUPBQIEAgECBgUCAQEBBAEDBAQGAgIBAwMCDgIEA?= =?us-ascii?q?QQBAgEBIwMEAgMBAxcBAgECAwMDBAYHBQIBAhMBAgEBAQUBAgEBAwQEBwkDA?= =?us-ascii?q?gIEAwMFAQECAwIBAQEHDAICAhICEwMBBgEOBRQDAgQCAgECAgoDAQICAQMCC?= =?us-ascii?q?QIBAgEFIAMBAQ8kAQECAgIDBAcCAQQGAw0CAgEBAQUGDQMCAwgNAgcDAgEDB?= =?us-ascii?q?QICBAECBAoJAQICAQIEBQcCAQgGBQ0FCQsBAQIBAwcEAxECBQMFBQMDAgEGB?= =?us-ascii?q?AUCAwECAQEDBAMEBAEBAgMCAgEGAgIBAQMDBAMBAgYCAgcCAwIBBAIDAwEBA?= =?us-ascii?q?QICAgICAgMDCQIIBwUBBgECAQQDAgIBAgcBBAEIAwMFBQEKDwMFAwEDAwIUC?= =?us-ascii?q?gUBAwgGCQIEBQIFAwIEAgMCAggDAgQDCwMFBAIHEwcCAwICBQICAgICBQQDA?= =?us-ascii?q?QICAgICAgUCAwIBBQECAgECAgIEAQICBwQCAwEDBA4EAwICAgUBAgIBBgIHA?= =?us-ascii?q?wECAQQDAQEEAgQBAgUCBAEDBgIEAwoCAwICAgYFAwMKCAIDBQIEAQECBwQCA?= =?us-ascii?q?gsBBgIHAgIDEAEDAQQFBQMDAwkCAgMCBAICCQEBAQECAgEHAgQHDwICAgQCA?= =?us-ascii?q?gIBAwICAQECAgULEgEBAgMGBAYFAwIIGAEGAgEBAgIDAwIGAgECCAIEAQQFA?= =?us-ascii?q?gECAgICBAEDBgIDAQECAQICAwMCAQQCBAMDAQIBAgICAwICAgMCAgEPAgYGA?= =?us-ascii?q?QICAgICAgICAgYBAgECBAIHAgQDAgECAgUCAgIDAQEGAgQLAQMCBwYBAwIHB?= =?us-ascii?q?QIDAQQDBAMDBQYFDAgBBQEDASEDAgIIAgcCAQYFAQ8DAgIDAgIBBAoCAwUCB?= =?us-ascii?q?AIBBAkHAgQBAgkDAgYCBwUYAQICBwQMCgICAgUGAgQBAQIDAQIBAQIDBAIDA?= =?us-ascii?q?gQFAQUCAQIFBAICAQECBQIMAQIBBwYCBwMCAgIDAQQCAQIBAwMCAwEBAQMGB?= =?us-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tRAQNwJRhaKm+K/xvSgSfN+l9woPsDoFIwas3BkizreCJ7KRLifGPyWtIEFtNs2rpFLG+vFa c0eVTt+V0XjTRETF1sKT41ryY9EgVGmI2EH9zp5v5Ef72XN5ABp3LurN8DaEuFmXu1ck1zdp 3rB5Xi8BBgGctee0jGCtHmrg4cjgB8XRqoxO5+87M4tr2ej4UBOBzIUVn2DrtW23xvWt81kF 2QY/S8nrK4X/UOtT8XgUxDQnENoriLwSPILTLJnsFDlJr78plfGVjJdH1atffR/7JduLQHGw GNliD8AONCOjFF3YS/Gnlt3hWrsUcTwEYPlTXVYJTbpG/G5/OkOYuvnF76P6pKdgNzvAi3Xy DuXtiU4jLh7pZdVifjgoQid2GLz/sWhousJCuP/AzzNAuRROd7NWmBUwQOzAQtoddzAFQDR4 BDoZeDBvb5m4W6xeNylGbVRQ+7BCwetOzzHilknBIg66zmo4BaekXN4vllDyLNSGp9cI1fBO RaL0SsIvc87AZdfRfIuC25HI59xlvaI+BWMfq28U+eilbArKFLZoX82OxfAt40v+WB1+ZwC1 V6gWZ7EJR4n5W5PlVJam891PWcX+x0D IronPort-HdrOrdr: A9a23:8KgW4KhG57DySy31+EvxLGZO/HBQXukji2hC6mlwRA09TyVXra yTdZMgpH3JYVkqNk3I9errBEDiewK+yXcK2+gs1N6ZNWGMhILCFu5fBOXZrgHIKmnX6vNd2a B8c6J3FdH8SWRhgd2S2njcLz9Z+rm6GGTCv5a485+rJjsaD51d0w== X-IronPort-Anti-Spam-Filtered: true X-IronPort-AV: E=Sophos;i="5.95,173,1661817600"; d="scan'208";a="4314965" Received: from aer-iport-nat.cisco.com (HELO aer-core-3.cisco.com) ([173.38.203.22]) by aer-iport-4.cisco.com with ESMTP/TLS/DHE-RSA-SEED-SHA; 10 Oct 2022 10:40:41 +0000 Received: from NSKRZYPC-M-J01W.cisco.com (ams3-vpn-dhcp1455.cisco.com [10.61.69.175]) (authenticated bits=0) by aer-core-3.cisco.com (8.15.2/8.15.2) with ESMTPSA id 29AAeeHH017211 (version=TLSv1.2 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Mon, 10 Oct 2022 10:40:40 GMT From: Nathan Skrzypczak To: dev@dpdk.org Cc: jgrajcia@cisco.com Subject: [PATCH] net/memif: default to physical socket Date: Mon, 10 Oct 2022 12:40:38 +0200 Message-Id: <20221010104038.15867-1-nathan.skrzypczak@gmail.com> X-Mailer: git-send-email 2.37.3 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Authenticated-User: nskrzypc X-Outbound-SMTP-Client: 10.61.69.175, ams3-vpn-dhcp1455.cisco.com X-Outbound-Node: aer-core-3.cisco.com X-Mailman-Approved-At: Tue, 11 Oct 2022 03:51:08 +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 mentionning 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.37.3