[PATCH v6 01/22] gso: don't log message on non TCP/UDP
Hu, Jiayu
jiayu.hu at intel.com
Wed Feb 15 08:26:22 CET 2023
> -----Original Message-----
> From: Stephen Hemminger <stephen at networkplumber.org>
> Sent: Wednesday, February 15, 2023 6:47 AM
> To: dev at dpdk.org
> Cc: Stephen Hemminger <stephen at networkplumber.org>; Hu, Jiayu
> <jiayu.hu at intel.com>; Konstantin Ananyev
> <konstantin.v.ananyev at yandex.ru>; Mark Kavanagh
> <mark.b.kavanagh at intel.com>
> Subject: [PATCH v6 01/22] gso: don't log message on non TCP/UDP
>
> 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")
> Cc: jiayu.hu at intel.com
> Signed-off-by: Stephen Hemminger <stephen at networkplumber.org>
> ---
> lib/gso/rte_gso.c | 5 ++---
> 1 file changed, 2 insertions(+), 3 deletions(-)
>
> diff --git a/lib/gso/rte_gso.c b/lib/gso/rte_gso.c index
> 4b59217c16ee..c8e67c2d4b48 100644
> --- a/lib/gso/rte_gso.c
> +++ b/lib/gso/rte_gso.c
> @@ -80,9 +80,8 @@ 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 */
> +
The function signature annotation in rte_gso.h also needs update for ENOTSUP.
In addition, will it break ABI?
Thanks,
Jiayu
> }
>
> if (ret < 0) {
> --
> 2.39.1
More information about the dev
mailing list