[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <09cdc1990818a26fd0e3514b7619261ebc0da50f.camel@redhat.com>
Date: Thu, 09 Mar 2023 11:31:12 +0100
From: Paolo Abeni <pabeni@...hat.com>
To: Xin Long <lucien.xin@...il.com>,
network dev <netdev@...r.kernel.org>,
linux-sctp@...r.kernel.org
Cc: davem@...emloft.net, kuba@...nel.org,
Eric Dumazet <edumazet@...gle.com>,
Marcelo Ricardo Leitner <marcelo.leitner@...il.com>,
Neil Horman <nhorman@...driver.com>
Subject: Re: [PATCH net-next 1/2] sctp: add fair capacity stream scheduler
On Tue, 2023-03-07 at 16:23 -0500, Xin Long wrote:
> diff --git a/net/sctp/stream_sched_fc.c b/net/sctp/stream_sched_fc.c
> new file mode 100644
> index 000000000000..b336c2f5486b
> --- /dev/null
> +++ b/net/sctp/stream_sched_fc.c
> @@ -0,0 +1,183 @@
> +// SPDX-License-Identifier: GPL-2.0-or-later
> +/* SCTP kernel implementation
> + * (C) Copyright Red Hat Inc. 2022
> + *
> + * This file is part of the SCTP kernel implementation
> + *
> + * These functions manipulate sctp stream queue/scheduling.
> + *
> + * Please send any bug reports or fixes you make to the
> + * email addresched(es):
> + * lksctp developers <linux-sctp@...r.kernel.org>
> + *
> + * Written or modified by:
> + * Xin Long <lucien.xin@...il.com>
> + */
> +
> +#include <linux/list.h>
> +#include <net/sctp/sctp.h>
Note that the above introduces a new compile warning:
../net/sctp/stream_sched_fc.c: note: in included file (through ../include/net/sctp/sctp.h):
../include/net/sctp/structs.h:335:41: warning: array of flexible structures
that is not really a fault of the new code, it's due to:
struct sctp_init_chunk peer_init[];
struct sctp_init_chunk {
struct sctp_chunkhdr chunk_hdr;
struct sctp_inithdr init_hdr;
};
struct sctp_inithdr {
__be32 init_tag;
__be32 a_rwnd;
__be16 num_outbound_streams;
__be16 num_inbound_streams;
__be32 initial_tsn;
__u8 params[]; // <- this!
};
Any chance a future patch could remove the 'params' field from the
struct included by sctp_init_chunk?
e.g.
struct sctp_inithdr_base {
__be32 init_tag;
__be32 a_rwnd;
__be16 num_outbound_streams;
__be16 num_inbound_streams;
__be32 initial_tsn;
};
struct sctp_init_chunk {
struct sctp_chunkhdr chunk_hdr;
struct sctp_inithdr_base init_hdr;
};
and then cast 'init_hdr' to 'struct sctp_inithdr' if/where needed.
In any case, the above is not blocking this series.
Cheers,
Paolo
Powered by blists - more mailing lists