lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220621221449.28c30caa@kernel.org>
Date:   Tue, 21 Jun 2022 22:14:49 -0700
From:   Jakub Kicinski <kuba@...nel.org>
To:     Richard Gobert <richardbgobert@...il.com>
Cc:     davem@...emloft.net, pabeni@...hat.com,
        steffen.klassert@...unet.com, herbert@...dor.apana.org.au,
        yoshfuji@...ux-ipv6.org, dsahern@...nel.org, edumazet@...gle.com,
        willemb@...gle.com, imagedong@...cent.com, talalahmad@...gle.com,
        kafai@...com, vasily.averin@...ux.dev, luiz.von.dentz@...el.com,
        jk@...econstruct.com.au, netdev@...r.kernel.org
Subject: Re: [PATCH v2] net: helper function for skb_shift

On Mon, 20 Jun 2022 17:56:48 +0200 Richard Gobert wrote:
> + * skb_update_len - Updates len fields of skb
> + * @skb: buffer to add len to
> + * @len: number of bytes to add
> + */
> +static inline void skb_update_len(struct sk_buff *skb, int len)
> +{
> +	skb->len += len;
> +	skb->data_len += len;
> +	skb->truesize += len;
> +}

On reflection, maybe skb_len_add() would be a better name?
"update" does not express what the meaning of the parameter is.
It could be delta it could be new length.

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ