On Fri, Aug 15, 2014 at 04:56:08PM +0200, Phoebe Buckheister wrote: > > This patch removes the kmalloc allocation for workqueue data. This patch > > replace the kmalloc and use the control block of skb. The control block > > have enough space and isn't use by any other layer in this case. > > > > Signed-off-by: Alexander Aring <alex.aring@xxxxxxxxx> > > --- > > net/mac802154/tx.c | 51 > > ++++++++++++++++++++++++--------------------------- > > 1 file changed, 24 insertions(+), 27 deletions(-) > > > > diff --git a/net/mac802154/tx.c b/net/mac802154/tx.c > > index d99e4f5..b6776ee 100644 > > --- a/net/mac802154/tx.c > > +++ b/net/mac802154/tx.c > > @@ -34,7 +34,7 @@ > > /* IEEE 802.15.4 transceivers can sleep during the xmit session, so > > process > > * packets through the workqueue. > > */ > > -struct xmit_work { > > +struct wpan_xmit_cb { > > struct sk_buff *skb; > > struct work_struct work; > > struct ieee802154_local *local; > > @@ -42,43 +42,46 @@ struct xmit_work { > > u8 page; > > }; > > > > +static struct wpan_xmit_cb *wpan_xmit_cb(struct sk_buff *skb) > > +{ > > Do add a BUILD_BUG_ON(sizeof(struct wpan_xmit_cb) > sizeof(skb->cb)) to > make sure the struct will *always* fit, even if we choose to resize it for > whatever reason. Ok, thanks. I also add a inline to this function. Thanks. - Alex -- To unsubscribe from this list: send the line "unsubscribe linux-wpan" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html