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 D572C42868; Thu, 30 Mar 2023 01:40:58 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 12B2F42B71; Thu, 30 Mar 2023 01:40:58 +0200 (CEST) Received: from mail-pl1-f174.google.com (mail-pl1-f174.google.com [209.85.214.174]) by mails.dpdk.org (Postfix) with ESMTP id 1E16E41138 for ; Thu, 30 Mar 2023 01:40:57 +0200 (CEST) Received: by mail-pl1-f174.google.com with SMTP id ja10so16487848plb.5 for ; Wed, 29 Mar 2023 16:40:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20210112.gappssmtp.com; s=20210112; t=1680133256; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=22sb9KeaWCIHf//+hSXs7eWusMhXwHuF7sjijeI+aRE=; b=unxZs94JjtRtjLD/agARiK/DjnEnz3wdbp3vV06jQc297wzO4zKVUlDQyhLKeTBDlX l0gO68KteWc2/VRBJKJsnxqASTd4G5yg8NtfUConjMh0G7yXRVomnHJRj3x1qcDNDBNH fA86/37DQUulhny4tdbGbLTbYNP4QXrlmX5nBGjXrhw00X61FzjdwCds5j2ufTubmXKx h0KXIU2EyqadtdagY6VpffeaGQDEm+iHvPABNV56kJllsUCLVIzEsWEboanggToAE6UC GgG64Qi7dPJ+haWGX5BaDWU2YZCukDfJ3qcfiTDg/dJxEgTk7tZ0hap2uinM+1TXXNNs n3sA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680133256; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=22sb9KeaWCIHf//+hSXs7eWusMhXwHuF7sjijeI+aRE=; b=Yi6fXAYwYzNcGwVz1ngsDfOso1DE4Wb8e63NQb3/fE3sYoANqNwJigACsFjy+Fdfq7 2PQQ9WpmhxKgvk7ejmNMOQe50lxHL2dJ529fATHr31LTvZ1W/FY9iuak7JlMe6EU8xK3 9MSOKUe2xIUknbrM6rI5fSg+wfzWp1gmU7eJ2Cj4NUWCkCLzKSQpigX/SZr3n/vCjiev cys7uRoSMn4tYIkzMTADT72SoVCwQyT/Naz/hQt21pK+5mBcq+jL9Fn4kiBngjAJRn5y K1vpz5NXi0ejpWTSEZBK8ef25SMxomXFxHghfO8T8R7HBDi00/KRhUlhKwKFZpYjLHUW mzdQ== X-Gm-Message-State: AAQBX9foD7oEYE6AXZdDclmHEqXb+jAlQRjVzWzTnWqVx9r3y9+0bALx dTHjLHMOJVffsKQ4VW43cOUTdBOCk7fukb9PzeFtgg== X-Google-Smtp-Source: AKy350YZ5Fdcbji9+72mcn3Eq83iH259aFfux8II74kF3k2iwiaqbJKX0Ov6RxKEwjGQOHsq1uxNNQ== X-Received: by 2002:a17:90b:33c7:b0:23f:35c8:895 with SMTP id lk7-20020a17090b33c700b0023f35c80895mr22002166pjb.32.1680133255963; Wed, 29 Mar 2023 16:40:55 -0700 (PDT) Received: from hermes.local (204-195-120-218.wavecable.com. [204.195.120.218]) by smtp.gmail.com with ESMTPSA id f10-20020a17090274ca00b0019c2b1c4db1sm23360095plt.239.2023.03.29.16.40.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 29 Mar 2023 16:40:55 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Jiayu Hu , Mark Kavanagh Subject: [PATCH v12 01/22] gso: don't log message on non TCP/UDP Date: Wed, 29 Mar 2023 16:40:28 -0700 Message-Id: <20230329234049.11071-2-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230329234049.11071-1-stephen@networkplumber.org> References: <20230329234049.11071-1-stephen@networkplumber.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 If a large packet is passed into GSO routines of unknown protocol then library would log a message. Better to tell the application instead of logging. Fixes: 119583797b6a ("gso: support TCP/IPv4 GSO") Reviewed-by: Jiayu Hu Signed-off-by: Stephen Hemminger --- lib/gso/rte_gso.c | 4 +--- lib/gso/rte_gso.h | 1 + 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/gso/rte_gso.c b/lib/gso/rte_gso.c index 4b59217c16ee..e29c7d884aed 100644 --- a/lib/gso/rte_gso.c +++ b/lib/gso/rte_gso.c @@ -80,9 +80,7 @@ rte_gso_segment(struct rte_mbuf *pkt, ret = gso_udp4_segment(pkt, gso_size, direct_pool, indirect_pool, pkts_out, nb_pkts_out); } else { - /* unsupported packet, skip */ - RTE_LOG(DEBUG, GSO, "Unsupported packet type\n"); - ret = 0; + ret = -ENOTSUP; /* only UDP or TCP allowed */ } if (ret < 0) { diff --git a/lib/gso/rte_gso.h b/lib/gso/rte_gso.h index 40922524df42..c0f9a1b66ff2 100644 --- a/lib/gso/rte_gso.h +++ b/lib/gso/rte_gso.h @@ -114,6 +114,7 @@ struct rte_gso_ctx { * - The number of GSO segments filled in pkts_out on success. * - Return 0 if it does not need to be GSO'd. * - Return -ENOMEM if run out of memory in MBUF pools. + * - Return -ENOTSUP for protocols that can not be segmented * - Return -EINVAL for invalid parameters. */ int rte_gso_segment(struct rte_mbuf *pkt, -- 2.39.2