netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
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 1/8] net: wangxun: libwx add tx offload functions
Date: Tue, 23 May 2023 21:06:59 -0700	[thread overview]
Message-ID: <20230523210659.11304cce@kernel.org> (raw)
In-Reply-To: <20230523030658.17738-2-mengyuanlou@net-swift.com>

On Tue, 23 May 2023 11:06:51 +0800 Mengyuan Lou wrote:
> +	if (skb->encapsulation) {
> +		union network_header hdr;
> +
> +		switch (first->protocol) {
> +		case htons(ETH_P_IP):
> +			tun_prot = ip_hdr(skb)->protocol;
> +			if (ip_is_fragment(ip_hdr(skb)))
> +				return WX_PTYPE_PKT_IP | WX_PTYPE_TYP_IPFRAG;
> +			ptype = WX_PTYPE_TUN_IPV4;
> +			break;
> +		case htons(ETH_P_IPV6):
> +			wx_get_ipv6_proto(skb, skb_network_offset(skb), &tun_prot);
> +			if (tun_prot == NEXTHDR_FRAGMENT)
> +				return WX_PTYPE_PKT_IP | WX_PTYPE_PKT_IPV6 |
> +				       WX_PTYPE_TYP_IPFRAG;
> +			ptype = WX_PTYPE_TUN_IPV6;

Why does the HW care about fragmented packets?
AFAIU fragmented packets won't have any offloads enabled.

  reply	other threads:[~2023-05-24  4:07 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 [this message]
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
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=20230523210659.11304cce@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).