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 626EF430C3; Mon, 21 Aug 2023 18:09:53 +0200 (CEST) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id 521AA42FB2; Mon, 21 Aug 2023 18:09:53 +0200 (CEST) Received: from mail-pf1-f180.google.com (mail-pf1-f180.google.com [209.85.210.180]) by mails.dpdk.org (Postfix) with ESMTP id 1799042B8B for ; Mon, 21 Aug 2023 18:09:51 +0200 (CEST) Received: by mail-pf1-f180.google.com with SMTP id d2e1a72fcca58-68a3de5f231so815009b3a.0 for ; Mon, 21 Aug 2023 09:09:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20221208.gappssmtp.com; s=20221208; t=1692634191; x=1693238991; 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=Suq377ScWFNdfhIOulqEfgLCI5YfcDwNmnL57CqcQUu4Hhjo2CxbdHdqm6URlJe4PC 2/rATEHZCpSMIlMbLuiGau+6CoEVw8DB0QUePZroLlZ1ot/8lc5rVu86SQlFiqyMF9IX dpmiPXUJIJWINReHYYLXk1u3tdPS+gVVO6ag7AlGTq093iHkRBA5rU4J6XVT9HpaS4RW GiK1FtPbhaAZRxVlA4kZPICQCn5rI5uJ4i0c60FtymkklUF5I5Q3IDn3ObatdOzJYAT6 ywE7iGQ1URXp2aJyKlmJEubD9V6Ez0JZVp720qzxkrI3pyavCK0PCCzcXSx24YIX2agP K5DQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1692634191; x=1693238991; 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=ljaGNlk4QKRD5ahNoBSS3aCn4SZ4va14guLl0kJgHfPIUaUnl4tkjYB4gEp2HMnGff 3CFVPn5etaRbpt3wdaQDP+jarzf0LEeTUzkMzWAUuaErei3jTT08QSC+RTEBQ0IdOO5g sWIDb4+1S/n3fgB5IgVUzKbbiPLccAuCNHIJoqcShfBK7P4h+uOvLuWe+KznU2HPWRkn OWCJ6H4UI/Kv3mW+8Q6mxJbDdjojzHf/C87IizHS1jQVs80j8dDDXVw3IRvkeQw35L8n 0INFOI7klSK4JQlUCSix9WYCNXCNndytsbaym+FaRKt0xYI09khUrQ2j70l5R4DjDJjV U5Kw== X-Gm-Message-State: AOJu0Yx1Pu8wwWJ9XfY20+p1SqiGpTJEYH/L6DIdpzYpRQpwJZf6f2w/ 2H+AHxs9Pg6YizwpbqdieMePLp7rmonYRgiAQkhJSrmX X-Google-Smtp-Source: AGHT+IHiQUhPfesXdIZ6FkAqZz5d9EJhAiVeVsSwktlP9StRvj3R0kxbaCwHj2ieWkjyuNYfsqZYhA== X-Received: by 2002:a05:6a20:969a:b0:147:d309:be7b with SMTP id hp26-20020a056a20969a00b00147d309be7bmr4474251pzc.62.1692634190811; Mon, 21 Aug 2023 09:09:50 -0700 (PDT) Received: from hermes.local (204-195-127-207.wavecable.com. [204.195.127.207]) by smtp.gmail.com with ESMTPSA id i1-20020a17090332c100b001bf2dcfe352sm7208159plr.234.2023.08.21.09.09.50 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 21 Aug 2023 09:09:50 -0700 (PDT) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Jiayu Hu , Mark Kavanagh Subject: [PATCH v13 01/21] gso: don't log message on non TCP/UDP Date: Mon, 21 Aug 2023 09:09:01 -0700 Message-Id: <20230821160921.383832-2-stephen@networkplumber.org> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230821160921.383832-1-stephen@networkplumber.org> References: <20230329234049.11071-1-stephen@networkplumber.org> <20230821160921.383832-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