[<prev] [next>] [day] [month] [year] [list]
Message-ID: <CA+t96KDs8_4DcY-RuhX9L9r2LuES_8Cqihe3gCfnOhK8ffMkZg@mail.gmail.com>
Date: Thu, 24 Oct 2024 22:18:49 -0400
From: Sanjay Rao <srao@...tly.com>
To: netdev@...r.kernel.org
Subject: Question about mpls_gso_segment() and skb->encapsulation behavior
Hi,
I have a question regarding the behavior of mpls_gso_segment().
In the code snippet below:
segs = skb_mac_gso_segment(skb, mpls_features);
if (IS_ERR_OR_NULL(segs)) {
skb_gso_error_unwind(skb, mpls_protocol, mpls_hlen, mac_offset, mac_len);
goto out;
}
The issue I'm encountering is that skb_gso_error_unwind() sets
skb->encapsulation = 1, but it does so without setting the inner
transport header (inner_transport_header). This leads to a kernel
crash within the driver code, specifically in
mlx5e_sq_calc_wqe_attr().
I'm wondering:
Is setting skb->encapsulation = 1 correct in all cases for MPLS packets?
If not, are there specific scenarios where this should not be set,
especially when the inner headers are not explicitly defined?
Any insights or suggestions on handling this situation would be
greatly appreciated.
Thanks,
Sanjay
--
Sanjay Rao | Principal Engineer | Ashburn, Virginia
Tel: 703-869-1461
fastly.com | @fastly | LinkedIn
Fastly Global HQ: 475 Brannan St. Ste 300, San Francisco, CA 94107, USA
Powered by blists - more mailing lists