From patchwork Tue Sep 10 15:11:36 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Kevin Traynor X-Patchwork-Id: 1983285 X-Patchwork-Delegate: echaudro@redhat.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@legolas.ozlabs.org Authentication-Results: legolas.ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=MwlchM5i; dkim-atps=neutral Authentication-Results: legolas.ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=openvswitch.org (client-ip=2605:bc80:3010::138; helo=smtp1.osuosl.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver=patchwork.ozlabs.org) Received: from smtp1.osuosl.org (smtp1.osuosl.org [IPv6:2605:bc80:3010::138]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (secp384r1) server-digest SHA384) (No client certificate requested) by legolas.ozlabs.org (Postfix) with ESMTPS id 4X36cf37ZHz1y1S for ; Wed, 11 Sep 2024 01:12:00 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by smtp1.osuosl.org (Postfix) with ESMTP id 8CE4980BC7; Tue, 10 Sep 2024 15:11:58 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp1.osuosl.org ([127.0.0.1]) by localhost (smtp1.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id s4QjwsusAhzI; Tue, 10 Sep 2024 15:11:57 +0000 (UTC) X-Comment: SPF check N/A for local connections - client-ip=2605:bc80:3010:104::8cd3:938; helo=lists.linuxfoundation.org; envelope-from=ovs-dev-bounces@openvswitch.org; receiver= DKIM-Filter: OpenDKIM Filter v2.11.0 smtp1.osuosl.org 7284D80AF2 Authentication-Results: smtp1.osuosl.org; dkim=fail reason="signature verification failed" (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=MwlchM5i Received: from lists.linuxfoundation.org (lf-lists.osuosl.org [IPv6:2605:bc80:3010:104::8cd3:938]) by smtp1.osuosl.org (Postfix) with ESMTPS id 7284D80AF2; Tue, 10 Sep 2024 15:11:57 +0000 (UTC) Received: from lf-lists.osuosl.org (localhost [127.0.0.1]) by lists.linuxfoundation.org (Postfix) with ESMTP id 55044C0012; Tue, 10 Sep 2024 15:11:57 +0000 (UTC) X-Original-To: dev@openvswitch.org Delivered-To: ovs-dev@lists.linuxfoundation.org Received: from smtp2.osuosl.org (smtp2.osuosl.org [IPv6:2605:bc80:3010::133]) by lists.linuxfoundation.org (Postfix) with ESMTP id A6E66C0011 for ; Tue, 10 Sep 2024 15:11:55 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by smtp2.osuosl.org (Postfix) with ESMTP id 958B240AD5 for ; Tue, 10 Sep 2024 15:11:55 +0000 (UTC) X-Virus-Scanned: amavis at osuosl.org Received: from smtp2.osuosl.org ([127.0.0.1]) by localhost (smtp2.osuosl.org [127.0.0.1]) (amavis, port 10024) with ESMTP id TTx197LSKCi6 for ; Tue, 10 Sep 2024 15:11:54 +0000 (UTC) Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=170.10.133.124; helo=us-smtp-delivery-124.mimecast.com; envelope-from=ktraynor@redhat.com; receiver= DMARC-Filter: OpenDMARC Filter v1.4.2 smtp2.osuosl.org 6C3CC4012B Authentication-Results: smtp2.osuosl.org; dmarc=pass (p=none dis=none) header.from=redhat.com DKIM-Filter: OpenDKIM Filter v2.11.0 smtp2.osuosl.org 6C3CC4012B Authentication-Results: smtp2.osuosl.org; dkim=pass (1024-bit key, unprotected) header.d=redhat.com header.i=@redhat.com header.a=rsa-sha256 header.s=mimecast20190719 header.b=MwlchM5i Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.133.124]) by smtp2.osuosl.org (Postfix) with ESMTPS id 6C3CC4012B for ; Tue, 10 Sep 2024 15:11:53 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1725981112; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=Z4uD4JX4tFVyMAAkhlG89nDSRHO8eqdH9Aaev/rYw7w=; b=MwlchM5iWTgVPVF5fMp8Owaoa3d5qMsUF01ANj3FpNJnLJ7EL/dMktD6IOvQNt23nR/2Tc E6ES9rzkigoB99k661yq6c2kYmjZmRjgGaISkJF3xmKQa5GwbJSCiy4R5FnpL3XwErGOrh cx9A4C2zJ9uL/9vMQnwfWMXlR3oE44Y= Received: from mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (ec2-54-186-198-63.us-west-2.compute.amazonaws.com [54.186.198.63]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-524-S73m69ebPmGru1vpoVnMXA-1; Tue, 10 Sep 2024 11:11:49 -0400 X-MC-Unique: S73m69ebPmGru1vpoVnMXA-1 Received: from mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.17]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-02.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id C97421953940 for ; Tue, 10 Sep 2024 15:11:48 +0000 (UTC) Received: from rh.Home (unknown [10.39.192.55]) by mx-prod-int-05.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id CD2391956052; Tue, 10 Sep 2024 15:11:46 +0000 (UTC) From: Kevin Traynor To: dev@openvswitch.org Date: Tue, 10 Sep 2024 16:11:36 +0100 Message-ID: <20240910151136.4010739-1-ktraynor@redhat.com> MIME-Version: 1.0 X-Scanned-By: MIMEDefang 3.0 on 10.30.177.17 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Subject: [ovs-dev] [PATCH] netdev-offload-dpdk: Change log level on flow offload failure. X-BeenThere: ovs-dev@openvswitch.org X-Mailman-Version: 2.1.30 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: david.marchand@redhat.com Errors-To: ovs-dev-bounces@openvswitch.org Sender: "dev" Previously when a flow was attempted to be offloaded, if it could not be offloaded and did not return an actions error, a warning was logged. The reason there was an exception for an actions error was to allow for failure for full offload of a flow because it will fallback to partial offload. There are some issues with this approach to logging. Some NICs do not specify an actions error, because other config in the NIC may be checked first. e.g. In the case of Mellanox CX-5, there can be different types of offload configured, so an unspecified error may be returned. More generally, enabling hw-offload is best effort per datapath/NIC/flow as full and partial offload support in NICs is variable and there is always fallback to software. So there is likely to be repeated logging about offloading of flows failing. With this in mind, change the log level to debug. The status of the offload can still be seen with below command: $ ovs-appctl dpctl/dump-flows -m ... offloaded:partial ... Also, remove some duplicated rate limiting. Signed-off-by: Kevin Traynor --- lib/netdev-offload-dpdk.c | 23 +++++++++-------------- 1 file changed, 9 insertions(+), 14 deletions(-) diff --git a/lib/netdev-offload-dpdk.c b/lib/netdev-offload-dpdk.c index 623005b1c..378bee161 100644 --- a/lib/netdev-offload-dpdk.c +++ b/lib/netdev-offload-dpdk.c @@ -920,22 +920,17 @@ netdev_offload_dpdk_flow_create(struct netdev *netdev, dump_flow(&s, &s_extra, attr, flow_patterns, flow_actions); extra_str = ds_cstr(&s_extra); - VLOG_DBG_RL(&rl, "%s: rte_flow 0x%"PRIxPTR" %s flow create %d %s", - netdev_get_name(netdev), (intptr_t) flow, extra_str, - netdev_dpdk_get_port_id(netdev), ds_cstr(&s)); + VLOG_DBG("%s: rte_flow 0x%"PRIxPTR" %s flow create %d %s", + netdev_get_name(netdev), (intptr_t) flow, extra_str, + netdev_dpdk_get_port_id(netdev), ds_cstr(&s)); } } else { - enum vlog_level level = VLL_WARN; - - if (error->type == RTE_FLOW_ERROR_TYPE_ACTION) { - level = VLL_DBG; - } - VLOG_RL(&rl, level, "%s: rte_flow creation failed: %d (%s).", - netdev_get_name(netdev), error->type, error->message); - if (!vlog_should_drop(&this_module, level, &rl)) { + if (!VLOG_DROP_DBG(&rl)) { + VLOG_DBG("%s: rte_flow creation failed: %d (%s).", + netdev_get_name(netdev), error->type, error->message); dump_flow(&s, &s_extra, attr, flow_patterns, flow_actions); extra_str = ds_cstr(&s_extra); - VLOG_RL(&rl, level, "%s: Failed flow: %s flow create %d %s", - netdev_get_name(netdev), extra_str, - netdev_dpdk_get_port_id(netdev), ds_cstr(&s)); + VLOG_DBG("%s: Failed flow: %s flow create %d %s", + netdev_get_name(netdev), extra_str, + netdev_dpdk_get_port_id(netdev), ds_cstr(&s)); } }