From: Jakub Kicinski <kuba@kernel.org>
To: Mengyuan Lou <mengyuanlou@net-swift.com>
Cc: netdev@vger.kernel.org, jiawenwu@trustnetic.com
Subject: Re: [PATCH net-next v6 2/8] net: wangxun: libwx add rx offload functions
Date: Tue, 23 May 2023 21:04:54 -0700 [thread overview]
Message-ID: <20230523210454.12963d67@kernel.org> (raw)
In-Reply-To: <20230523030658.17738-3-mengyuanlou@net-swift.com>
On Tue, 23 May 2023 11:06:52 +0800 Mengyuan Lou wrote:
> +static inline struct wx_dec_ptype wx_decode_ptype(const u8 ptype)
> +{
> + return wx_ptype_lookup[ptype];
> +}
No need for inline keyword here, compiler will definitely inline this.
> + /* If there is an outer header present that might contain a checksum
> + * we need to bump the checksum level by 1 to reflect the fact that
> + * we are indicating we validated the inner checksum.
> + */
> + if (dptype.etype >= WX_DEC_PTYPE_ETYPE_IG) {
> + skb->csum_level = 1;
> + skb->encapsulation = 1;
> + }
That's not right, you shouldn't set encapsulation, that field means skb
encap state / fields are valid. Just use
__skb_incr_checksum_unnecessary() please, it will do the right thing.
--
pw-bot: cr
next prev parent reply other threads:[~2023-05-24 4:04 UTC|newest]
Thread overview: 13+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-05-23 3:06 [PATCH net-next v6 0/8] Wangxun netdev features support Mengyuan Lou
2023-05-23 3:06 ` [PATCH net-next v6 1/8] net: wangxun: libwx add tx offload functions Mengyuan Lou
2023-05-24 4:06 ` Jakub Kicinski
2023-05-24 6:59 ` mengyuanlou
2023-05-24 15:30 ` Jakub Kicinski
2023-05-23 3:06 ` [PATCH net-next v6 2/8] net: wangxun: libwx add rx " Mengyuan Lou
2023-05-24 4:04 ` Jakub Kicinski [this message]
2023-05-23 3:06 ` [PATCH net-next v6 3/8] net: wangxun: Implement vlan add and kill functions Mengyuan Lou
2023-05-23 3:06 ` [PATCH net-next v6 4/8] net: libwx: Implement xx_set_features ops Mengyuan Lou
2023-05-23 3:06 ` [PATCH net-next v6 5/8] net: ngbe: Add netdev features support Mengyuan Lou
2023-05-23 3:06 ` [PATCH net-next v6 6/8] net: ngbe: Implement vlan add and remove ops Mengyuan Lou
2023-05-23 3:06 ` [PATCH net-next v6 7/8] net: txgbe: Add netdev features support Mengyuan Lou
2023-05-23 3:06 ` [PATCH net-next v6 8/8] net: txgbe: Implement vlan add and remove ops Mengyuan Lou
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20230523210454.12963d67@kernel.org \
--to=kuba@kernel.org \
--cc=jiawenwu@trustnetic.com \
--cc=mengyuanlou@net-swift.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.