| To: | Jeff Garzik <jgarzik@xxxxxxxxx>, Dave Dillow <dave@xxxxxxxxxxxxxx> |
|---|---|
| Subject: | Re: [PATCH] reduce stack usage in ixgb_ethtool_ioctl |
| From: | Denis Vlasenko <vda@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> |
| Date: | Sun, 19 Sep 2004 21:47:28 +0300 |
| Cc: | linux-kernel@xxxxxxxxxxxxxxx, netdev@xxxxxxxxxxx |
| In-reply-to: | <414DCF60.1070104@xxxxxxxxx> |
| References: | <200409192033.56716.vda@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxx> <1095618283.4870.0.camel@xxxxxxxxxxxxxxxxxxx> <414DCF60.1070104@xxxxxxxxx> |
| Sender: | netdev-bounce@xxxxxxxxxxx |
| User-agent: | KMail/1.5.4 |
> >> case ETHTOOL_GSET:{
> >> struct ethtool_cmd ecmd = { ETHTOOL_GSET };
> >> ixgb_ethtool_gset(adapter, &ecmd);
> >> if (copy_to_user(addr, &ecmd, sizeof(ecmd)))
> >> return -EFAULT;
> >> return 0;
> >> }
> >> case ETHTOOL_SSET:{
> >> struct ethtool_cmd ecmd;
> >> if (copy_from_user(&ecmd, addr, sizeof(ecmd)))
> >> return -EFAULT;
> >> return ixgb_ethtool_sset(adapter, &ecmd);
> >> }
> >>
> >>There will be space for _two_ ecmd's on stack.
> >>
> >>Shall it be worked around with ugly union of structs
> >>or we'll just wait for better gcc?
> >
> > You could convert it to use ethtool_ops.
>
> Check -mm to make sure viro hasn't already converted it to ethtool_ops...
Admit it: it's a conspiracy. Whenever I take some code to hack on, somebody
else takes care of it before I do ;)
--
vda
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [PATCH] reduce stack usage in ixgb_ethtool_ioctl, Jeff Garzik |
|---|---|
| Next by Date: | Re: [PATCH] Improve behaviour of Netlink Sockets, Pablo Neira |
| Previous by Thread: | Re: [PATCH] reduce stack usage in ixgb_ethtool_ioctl, Jeff Garzik |
| Next by Thread: | [PATCH][NET] Calculate ipv6_pinfo offset from struct proto->slab_obj_size, Arnaldo Carvalho de Melo |
| Indexes: | [Date] [Thread] [Top] [All Lists] |