Follow @Openwall on Twitter for new release announcements and other news
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Date: Sun, 29 Sep 2019 18:30:17 +0200
From: Romain Perier <>
Cc: Kees Cook <>,
	Romain Perier <>
Subject: [PRE-REVIEW PATCH 05/16] chelsio: Prepare to use the new tasklet API

The future tasklet API will no longer allow to pass an arbitrary
"unsigned long" data parameter. The tasklet data structure will need to
be embedded into a data structure that will be retrieved from the tasklet
handler. Currently, there are no ways to get the sge data structure from
a given "struct sched *". This commits adds a field to store the pointer
of "the parent sge" into the context of each sched, so future tasklet
handlers will retrieve the "struct sched *" of the corresponding tasklet
and its "struct sge *".

Signed-off-by: Romain Perier <>
 drivers/net/ethernet/chelsio/cxgb/sge.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/chelsio/cxgb/sge.c b/drivers/net/ethernet/chelsio/cxgb/sge.c
index 47b5c8e2104b..b6c656e15801 100644
--- a/drivers/net/ethernet/chelsio/cxgb/sge.c
+++ b/drivers/net/ethernet/chelsio/cxgb/sge.c
@@ -239,6 +239,7 @@ struct sched {
 	unsigned int	num;		/* num skbs in per port queues */
 	struct sched_port p[MAX_NPORTS];
 	struct tasklet_struct sched_tsk;/* tasklet used to run scheduler */
+	struct sge *sge;
 static void restart_sched(unsigned long);
@@ -379,6 +380,7 @@ static int tx_sched_init(struct sge *sge)
 	tasklet_init(&s->sched_tsk, restart_sched, (unsigned long) sge);
+	s->sge = sge;
 	sge->tx_sched = s;
 	for (i = 0; i < MAX_NPORTS; i++) {

Powered by blists - more mailing lists

Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.