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 BF214433FD; Tue, 5 Dec 2023 03:13:51 +0100 (CET) Received: from mails.dpdk.org (localhost [127.0.0.1]) by mails.dpdk.org (Postfix) with ESMTP id AF61B427DF; Tue, 5 Dec 2023 03:13:51 +0100 (CET) Received: from mail-pf1-f169.google.com (mail-pf1-f169.google.com [209.85.210.169]) by mails.dpdk.org (Postfix) with ESMTP id 02ADD427DC for ; Tue, 5 Dec 2023 03:13:50 +0100 (CET) Received: by mail-pf1-f169.google.com with SMTP id d2e1a72fcca58-6cc02e77a9cso5028987b3a.0 for ; Mon, 04 Dec 2023 18:13:49 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=networkplumber-org.20230601.gappssmtp.com; s=20230601; t=1701742429; x=1702347229; darn=dpdk.org; 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=E49niAugGEAMLV8Z1NsCKtuhfBRzu0ptaCY90g32kqY=; b=aG+LdMAhqmuoG8nLkl6Ki8rj+ejZg0q94+ydinjF3N3MPT7DJ6Hmwk5yKQVDLLttvn TSqOTTOXGlHGIXNKOy0RTnWV/Iy2kXPrkMzLCADjnjeqax3mrbvBT1Si8XFtSpLpOErV jPwVJgPu6EmMJ2zx2HeSGxJqD+H/W9h4vVgk1ckq40dHaGlaJYdYDHSKCubjc3+zzpLv eycGJ9zi0enOz+0WU4UmeD9Xox+Vnn8j4gnpU7uUKktygRUpWbFvWc/DNxnjD7/h4b9o Q8bNTPiz3A461k/IuxNLXxmk4id0b6Iz3xtDzT39K3El/PcuzsO/7qTXWKMGEA9A2Aay l9kA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701742429; x=1702347229; 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=E49niAugGEAMLV8Z1NsCKtuhfBRzu0ptaCY90g32kqY=; b=SbXH1B3X/oCAKrKLFzemwAanrmli10bNn+hr2rcxI4B2RtY7cVVcegJd5qqnXDDZrO 7ErM6FFWTZu1o3msES3+O7Ao9EQxqiiYRMdxqlaCs2OPpD84S0R/sKUbZvRENOO+5JSK mWbEpOY3pnhkd6VneuFsOiA+swctifU45wH4YpJZycP6L/6VYN7P5OjZgSDG4YFYVlvN D4BqS+vOakZFEMzsIw7yvDpfQfaH2POqKJyOiEz/bPny0b2/konfyYh/uW+JgpHjTTFC 1Bou+k23T+O37ohJorUZIQkHt2c53fRq+9AntDOuUf4e9oGlTo2FsZoqskkw0kVUdBYR 2m1Q== X-Gm-Message-State: AOJu0Yx1GXyVlHA8F2JKxKz5gdMZ2ErFNJr65lZkfmTsa/HP7d0UjuRL fy8V5iZQzUUycDt+YNkOMSjjtpZfypxvrvEUQh0= X-Google-Smtp-Source: AGHT+IHCL9wo1jwv0Y6ubPRr/rhGu9rGgsqura3JQk3OEPCrvMl0LalX8ZeQDyXgBZ0jaulyMBs3KA== X-Received: by 2002:a05:6a00:1812:b0:6ce:6420:e174 with SMTP id y18-20020a056a00181200b006ce6420e174mr769078pfa.36.1701742429167; Mon, 04 Dec 2023 18:13:49 -0800 (PST) Received: from hermes.local (204-195-123-141.wavecable.com. [204.195.123.141]) by smtp.gmail.com with ESMTPSA id p26-20020a62b81a000000b0069346777241sm355958pfe.97.2023.12.04.18.13.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 04 Dec 2023 18:13:48 -0800 (PST) From: Stephen Hemminger To: dev@dpdk.org Cc: Stephen Hemminger , Jiayu Hu , Jiayu Hu , Mark Kavanagh Subject: [PATCH 01/18] gso: don't log message on non TCP/UDP Date: Mon, 4 Dec 2023 18:09:39 -0800 Message-ID: <20231205021330.260017-2-stephen@networkplumber.org> X-Mailer: git-send-email 2.42.0 In-Reply-To: <20231205021330.260017-1-stephen@networkplumber.org> References: <20230329234049.11071-1-stephen@networkplumber.org> <20231205021330.260017-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.42.0