Wang Zhan wrote:
> The GSO engine can now be asked to bound the number of MSS segments which
> go into each output skb.  Add KUnit coverage for it.
> 
> The parameterized GSO test gains a max_segs input and three cases: two
> bounds which cut the input into two and three output skbs, and a bound of
> one MSS, which must leave the ungrouped output of the unbounded path
> alone.  It drives skb_segment() directly, because the synthetic protocol
> it uses has no gso_segment callback, and stores the bound in the GSO
> control block itself.
> 
> The TCP test drives __skb_gso_segment() with a bound of two MSS and checks
> that every output skb stays GSO, keeps its gso_size, and stays within the
> bound.  The length test runs a 200 KiB TCP skb through
> validate_xmit_skb_list(), the caller which sets the bound, and checks that
> the length declared by every output matches the L3 length of that output.
> The limit test checks that the GSO size limit which netif_skb_features()
> applies follows the packet's L3 protocol, for an IPv4 and an IPv6 skb,
> also with the tag inside the frame.
> 
> Assisted-by: LLM
> Signed-off-by: Wang Zhan <[email protected]>
> 
> ---
> v3:
> - add cases for the length a bounded output declares and for a bound of one
>   MSS, which must leave the output ungrouped
> - cover the IPv4 half of the limit test, checking the protocol's own bit
> - skip the TCP cases without CONFIG_INET and bound the expected index in
>   the parameterized loop
> - free the skb and the device on the failure paths
> - reserve headroom so the VLAN step needs no atomic allocation
> - drop NETIF_F_TSO: the transmit path passes the features without it
> v2: https://lore.kernel.org/[email protected]/
> v1: https://lore.kernel.org/[email protected]/
> ---
>  net/core/net_test.c | 347 ++++++++++++++++++++++++++++++++++++++++++++
>  1 file changed, 347 insertions(+)
> 
> diff --git a/net/core/net_test.c b/net/core/net_test.c
> index 9c3a590865d26..a4f61398a90ab 100644
> --- a/net/core/net_test.c
> +++ b/net/core/net_test.c
> @@ -4,7 +4,14 @@
>  
>  /* GSO */
>  
> +#include <linux/if_ether.h>
> +#include <linux/if_vlan.h>
> +#include <linux/ip.h>
> +#include <linux/ipv6.h>
> +#include <linux/netdevice.h>
>  #include <linux/skbuff.h>
> +#include <linux/tcp.h>
> +#include <net/gso.h>
>  
>  static const char hdr[] = "abcdefgh";
>  #define GSO_TEST_SIZE 1000
> @@ -34,6 +41,9 @@ enum gso_test_nr {
>       GSO_TEST_FRAG_LIST_PURE,
>       GSO_TEST_FRAG_LIST_NON_UNIFORM,
>       GSO_TEST_GSO_BY_FRAGS,
> +     GSO_TEST_BOUNDED,
> +     GSO_TEST_BOUNDED_MULTI,
> +     GSO_TEST_BOUNDED_ONE_MSS,

nit: bound is not a helpful name for this feature.

The default segments to a stream of skbs of MSS 1, so segmenting to
a stream of skbs larger MSS to me is not bounding. Quite the opposite.

Not a comment only about this test patch.

Perhaps partial or re-segmentation better captures it.

> +     {
> +             /*
> +              * One MSS per skb is what the unbounded path produces, so a
> +              * bound of a single segment must not change the output.
> +              */

so setting max_segs = 0 is equivalent to setting max_segs = 1.
_______________________________________________
dev mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-dev

Reply via email to