* Re: [PATCH 6/7 v2] fs_enet: Be an of_platform device when CONFIG_PPC_CPM_NEW_BINDING is set.
From: Scott Wood @ 2007-08-22 21:16 UTC (permalink / raw)
To: Vitaly Bordug; +Cc: jgarzik, netdev, linuxppc-dev
In-Reply-To: <20070823010057.74e1355a@localhost.localdomain>
Vitaly Bordug wrote:
> yes, wrong snippet what about
>
>
>> #ifdef CONFIG_CPM2 + r = fs_enet_mdio_bb_init(); + if (r != 0) +
>> goto out_mdio_bb; +#endif +#ifdef CONFIG_8xx + r =
>> fs_enet_mdio_fec_init(); + if (r != 0) + goto out_mdio_fec;
>> +#endif
>
>
> We had to pray and hope that 8xx would only have fec, and cpm2 has
> some bitbanged stuff. now we can inquire dts and know for sure, at
> least it seems so.
Yeah, that sucks. We should add kconfig options for each mii type, and
let them have their own init functions.
That only affects the initcalls (and kernel size), though; it still uses
the phy-handle to decide what mdio controller to actually talk to.
>> How is that different from the old code, where you're hosed without
>> fep->fpi->bus_id?
>>
>
>
> I wasn't defending old code, and consider "old code is POS, new one
> is just great" game meaningless. I am just stating the problem, that
> we'll have to address later. On 8xx even reference boards may be
> without phy at all.
OK -- would it suffice to just never call any phylib functions and
always assume the link is up if the phy-handle property is undefined?
> ok, agreed, size is most serious judge here. we'll definitely have to
> revisit pin problem later too (because custom designs sometimes
> switch contradictory devices on-the-fly, disable soc parts for
> alternative function, etc.)
If it's really on-the-fly (and not jumpered/once-per-boot), then board
code should expose some kind of API to switch the functions, acting like
a hotplug bus. Associating it with open/close of the device won't work
if one of the devices is something like USB which needs to start working
without any internal open()-like action.
-Scott
^ permalink raw reply
* net-2.6.24 rebased
From: David Miller @ 2007-08-22 21:10 UTC (permalink / raw)
To: netdev
I needed to pull out the xfrm auditing patch, and I had been
meaning to combine the NAPI struct patch with all the little
bug fixes we've accumulated.
Also, as mentioned here throughout the day, I've also added
Thomas Graf's xfrm_user cleanups and Stephen Hemminger's
netdevice docbook additions.
Enjoy.
^ permalink raw reply
* Re: [PATCH 4/7] fs_enet: mac-fcc: Eliminate __fcc-* macros.
From: Vitaly Bordug @ 2007-08-22 21:08 UTC (permalink / raw)
To: Scott Wood; +Cc: netdev, jgarzik, linuxppc-dev
In-Reply-To: <20070817175402.GD9218@ld0162-tx32.am.freescale.net>
On Fri, 17 Aug 2007 12:54:02 -0500
Scott Wood wrote:
> These macros accomplish nothing other than defeating type checking.
>
> This patch also fixes one instance of the wrong register size being
> used that was revealed by enabling type checking.
>
> Signed-off-by: Scott Wood <scottwood@freescale.com>
> ---
> drivers/net/fs_enet/mac-fcc.c | 25 ++++++++-----------------
> 1 files changed, 8 insertions(+), 17 deletions(-)
>
> diff --git a/drivers/net/fs_enet/mac-fcc.c
> b/drivers/net/fs_enet/mac-fcc.c index ad3c5fa..8b30361 100644
> --- a/drivers/net/fs_enet/mac-fcc.c
> +++ b/drivers/net/fs_enet/mac-fcc.c
> @@ -48,28 +48,19 @@
>
> /* FCC access macros */
>
> -#define __fcc_out32(addr, x) out_be32((unsigned *)addr, x)
> -#define __fcc_out16(addr, x) out_be16((unsigned short *)addr,
> x) -#define __fcc_out8(addr, x) out_8((unsigned char *)addr, x)
> -#define __fcc_in32(addr) in_be32((unsigned *)addr)
> -#define __fcc_in16(addr) in_be16((unsigned short *)addr)
> -#define __fcc_in8(addr) in_8((unsigned char *)addr)
> -
> -/* parameter space */
> -
> /* write, read, set bits, clear bits */
> -#define W32(_p, _m, _v) __fcc_out32(&(_p)->_m, (_v))
> -#define R32(_p, _m) __fcc_in32(&(_p)->_m)
> +#define W32(_p, _m, _v) out_be32(&(_p)->_m, (_v))
> +#define R32(_p, _m) in_be32(&(_p)->_m)
> #define S32(_p, _m, _v) W32(_p, _m, R32(_p, _m) | (_v))
> #define C32(_p, _m, _v) W32(_p, _m, R32(_p, _m) & ~(_v))
>
> -#define W16(_p, _m, _v) __fcc_out16(&(_p)->_m, (_v))
> -#define R16(_p, _m) __fcc_in16(&(_p)->_m)
> +#define W16(_p, _m, _v) out_be16(&(_p)->_m, (_v))
> +#define R16(_p, _m) in_be16(&(_p)->_m)
> #define S16(_p, _m, _v) W16(_p, _m, R16(_p, _m) | (_v))
> #define C16(_p, _m, _v) W16(_p, _m, R16(_p, _m) & ~(_v))
>
> -#define W8(_p, _m, _v) __fcc_out8(&(_p)->_m, (_v))
> -#define R8(_p, _m) __fcc_in8(&(_p)->_m)
> +#define W8(_p, _m, _v) out_8(&(_p)->_m, (_v))
> +#define R8(_p, _m) in_8(&(_p)->_m)
> #define S8(_p, _m, _v) W8(_p, _m, R8(_p, _m) | (_v))
> #define C8(_p, _m, _v) W8(_p, _m, R8(_p, _m) & ~(_v))
>
> @@ -290,7 +281,7 @@ static void restart(struct net_device *dev)
>
> /* clear everything (slow & steady does it) */
> for (i = 0; i < sizeof(*ep); i++)
> - __fcc_out8((char *)ep + i, 0);
> + out_8((char *)ep + i, 0);
>
Perhaps W8() here, to keep consistency?
> /* get physical address */
> rx_bd_base_phys = fep->ring_mem_addr;
> @@ -495,7 +486,7 @@ static void tx_kickstart(struct net_device *dev)
> struct fs_enet_private *fep = netdev_priv(dev);
> fcc_t *fccp = fep->fcc.fccp;
>
> - S32(fccp, fcc_ftodr, 0x80);
> + S16(fccp, fcc_ftodr, 0x8000);
> }
>
> static u32 get_int_events(struct net_device *dev)
--
Sincerely, Vitaly
^ permalink raw reply
* Re: [RFC] Wild and crazy ideas involving struct sk_buff
From: David Miller @ 2007-08-22 21:08 UTC (permalink / raw)
To: paul.moore; +Cc: netdev, jmorris
In-Reply-To: <200708221631.34234.paul.moore@hp.com>
From: Paul Moore <paul.moore@hp.com>
Date: Wed, 22 Aug 2007 16:31:34 -0400
> We're currently talking about several different ideas to solve the problem,
> including leveraging the sk_buff.secmark field, and one of the ideas was to
> add an additional field to the sk_buff structure. Knowing how well that idea
> would go over (lead balloon is probably an understatement at best) I started
> looking at what I might be able to remove from the sk_buff struct to make
> room for a new field (the new field would be a u32). Looking at the sk_buff
> structure it appears that the sk_buff.dev and sk_buff.iif fields are a bit
> redundant and removing the sk_buff.dev field could free 32/64 bits depending
> on the platform. Is there any reason (performance?) for keeping the
> sk_buff.dev field around? Would the community be open to patches which
> removed it and transition users over to the sk_buff.iif field? Finally,
> assuming the sk_buff.dev field was removed, would the community be open to
> adding a new LSM/SELinux related u32 field to the sk_buff struct?
It's there for performance, and I bet there might be some semantic
issues involved.
And ironically James Morris still owes me a struct sk_buff removal
from when I let him put the "secmark" thing in there!
Stop spending money you guys haven't earned yet :-)
^ permalink raw reply
* Re: [PATCH 2/7] fs_enet: Whitespace cleanup.
From: Vitaly Bordug @ 2007-08-22 21:04 UTC (permalink / raw)
To: Scott Wood; +Cc: jgarzik, netdev, linuxppc-dev
In-Reply-To: <20070817175359.GB9218@ld0162-tx32.am.freescale.net>
On Fri, 17 Aug 2007 12:53:59 -0500
Scott Wood wrote:
> Signed-off-by: Scott Wood <scottwood@freescale.com>
Acked-by: Vitaly Bordug <vitb@kernel.crashing.org>
> ---
> drivers/net/fs_enet/fs_enet-main.c | 85
> ++++++++++++++++-------------------
> drivers/net/fs_enet/fs_enet.h | 4 +-
> drivers/net/fs_enet/mac-fcc.c | 1 -
> drivers/net/fs_enet/mii-fec.c | 1 - 4 files changed, 41
> insertions(+), 50 deletions(-)
>
> diff --git a/drivers/net/fs_enet/fs_enet-main.c
> b/drivers/net/fs_enet/fs_enet-main.c index a4a2a0e..f261b90 100644
> --- a/drivers/net/fs_enet/fs_enet-main.c
> +++ b/drivers/net/fs_enet/fs_enet-main.c
> @@ -353,7 +353,6 @@ static void fs_enet_tx(struct net_device *dev)
>
> do_wake = do_restart = 0;
> while (((sc = CBDR_SC(bdp)) & BD_ENET_TX_READY) == 0) {
> -
> dirtyidx = bdp - fep->tx_bd_base;
>
> if (fep->tx_free == fep->tx_ring)
> @@ -454,7 +453,6 @@ fs_enet_interrupt(int irq, void *dev_id)
>
> nr = 0;
> while ((int_events = (*fep->ops->get_int_events)(dev)) != 0)
> { -
> nr++;
>
> int_clr_events = int_events;
> @@ -710,45 +708,43 @@ static void fs_timeout(struct net_device *dev)
> *-----------------------------------------------------------------------------*/
> static void generic_adjust_link(struct net_device *dev)
> {
> - struct fs_enet_private *fep = netdev_priv(dev);
> - struct phy_device *phydev = fep->phydev;
> - int new_state = 0;
> -
> - if (phydev->link) {
> -
> - /* adjust to duplex mode */
> - if (phydev->duplex != fep->oldduplex){
> - new_state = 1;
> - fep->oldduplex = phydev->duplex;
> - }
> -
> - if (phydev->speed != fep->oldspeed) {
> - new_state = 1;
> - fep->oldspeed = phydev->speed;
> - }
> -
> - if (!fep->oldlink) {
> - new_state = 1;
> - fep->oldlink = 1;
> - netif_schedule(dev);
> - netif_carrier_on(dev);
> - netif_start_queue(dev);
> - }
> -
> - if (new_state)
> - fep->ops->restart(dev);
> -
> - } else if (fep->oldlink) {
> - new_state = 1;
> - fep->oldlink = 0;
> - fep->oldspeed = 0;
> - fep->oldduplex = -1;
> - netif_carrier_off(dev);
> - netif_stop_queue(dev);
> - }
> -
> - if (new_state && netif_msg_link(fep))
> - phy_print_status(phydev);
> + struct fs_enet_private *fep = netdev_priv(dev);
> + struct phy_device *phydev = fep->phydev;
> + int new_state = 0;
> +
> + if (phydev->link) {
> + /* adjust to duplex mode */
> + if (phydev->duplex != fep->oldduplex) {
> + new_state = 1;
> + fep->oldduplex = phydev->duplex;
> + }
> +
> + if (phydev->speed != fep->oldspeed) {
> + new_state = 1;
> + fep->oldspeed = phydev->speed;
> + }
> +
> + if (!fep->oldlink) {
> + new_state = 1;
> + fep->oldlink = 1;
> + netif_schedule(dev);
> + netif_carrier_on(dev);
> + netif_start_queue(dev);
> + }
> +
> + if (new_state)
> + fep->ops->restart(dev);
> + } else if (fep->oldlink) {
> + new_state = 1;
> + fep->oldlink = 0;
> + fep->oldspeed = 0;
> + fep->oldduplex = -1;
> + netif_carrier_off(dev);
> + netif_stop_queue(dev);
> + }
> +
> + if (new_state && netif_msg_link(fep))
> + phy_print_status(phydev);
> }
>
>
> @@ -792,7 +788,6 @@ static int fs_init_phy(struct net_device *dev)
> return 0;
> }
>
> -
> static int fs_enet_open(struct net_device *dev)
> {
> struct fs_enet_private *fep = netdev_priv(dev);
> @@ -978,7 +973,7 @@ static struct net_device *fs_init_instance(struct
> device *dev, #endif
>
> #ifdef CONFIG_FS_ENET_HAS_SCC
> - if (fs_get_scc_index(fpi->fs_no) >=0 )
> + if (fs_get_scc_index(fpi->fs_no) >= 0)
> fep->ops = &fs_scc_ops;
> #endif
>
> @@ -1069,9 +1064,8 @@ static struct net_device
> *fs_init_instance(struct device *dev,
> return ndev;
>
> - err:
> +err:
> if (ndev != NULL) {
> -
> if (registered)
> unregister_netdev(ndev);
>
> @@ -1262,7 +1256,6 @@ static int __init fs_init(void)
> err:
> cleanup_immap();
> return r;
> -
> }
>
> static void __exit fs_cleanup(void)
> diff --git a/drivers/net/fs_enet/fs_enet.h
> b/drivers/net/fs_enet/fs_enet.h index 569be22..72a61e9 100644
> --- a/drivers/net/fs_enet/fs_enet.h
> +++ b/drivers/net/fs_enet/fs_enet.h
> @@ -15,8 +15,8 @@
> #include <asm/commproc.h>
>
> struct fec_info {
> - fec_t* fecp;
> - u32 mii_speed;
> + fec_t *fecp;
> + u32 mii_speed;
> };
> #endif
>
> diff --git a/drivers/net/fs_enet/mac-fcc.c
> b/drivers/net/fs_enet/mac-fcc.c index 5603121..ad3c5fa 100644
> --- a/drivers/net/fs_enet/mac-fcc.c
> +++ b/drivers/net/fs_enet/mac-fcc.c
> @@ -86,7 +86,6 @@
> static inline int fcc_cr_cmd(struct fs_enet_private *fep, u32 mcn,
> u32 op) {
> const struct fs_platform_info *fpi = fep->fpi;
> -
> cpm2_map_t *immap = fs_enet_immap;
> cpm_cpm2_t *cpmp = &immap->im_cpm;
> u32 v;
> diff --git a/drivers/net/fs_enet/mii-fec.c
> b/drivers/net/fs_enet/mii-fec.c index 0a563a8..53db696 100644
> --- a/drivers/net/fs_enet/mii-fec.c
> +++ b/drivers/net/fs_enet/mii-fec.c
> @@ -113,7 +113,6 @@ static int fs_enet_fec_mii_read(struct mii_bus
> *bus , int phy_id, int location) }
>
> return ret;
> -
> }
>
> static int fs_enet_fec_mii_write(struct mii_bus *bus, int phy_id,
> int location, u16 val)
--
Sincerely, Vitaly
^ permalink raw reply
* Re: [PATCH 16/16] [XFRM] netlink: Inline attach_encap_tmpl(), attach_sec_ctx(), and attach_one_addr()
From: David Miller @ 2007-08-22 21:03 UTC (permalink / raw)
To: tgraf; +Cc: netdev
In-Reply-To: <20070822145632.087638328@lsx.localdomain>
From: Thomas Graf <tgraf@suug.ch>
Date: Wed, 22 Aug 2007 16:55:54 +0200
> These functions are only used once and are a lot easier to understand if
> inlined directly into the function.
>
> Signed-off-by: Thomas Graf <tgraf@suug.ch>
Also applied.
Thanks for doing all of this work Thomas! :)
^ permalink raw reply
* Re: [PATCH 15/16] [XFRM] netlink: Remove dependency on rtnetlink
From: David Miller @ 2007-08-22 21:02 UTC (permalink / raw)
To: tgraf; +Cc: netdev
In-Reply-To: <20070822145631.932930745@lsx.localdomain>
From: Thomas Graf <tgraf@suug.ch>
Date: Wed, 22 Aug 2007 16:55:53 +0200
> Signed-off-by: Thomas Graf <tgraf@suug.ch>
Applied.
^ permalink raw reply
* Re: [PATCH 14/16] [XFRM] netlink: Use nla_memcpy() in xfrm_update_ae_params()
From: David Miller @ 2007-08-22 21:02 UTC (permalink / raw)
To: tgraf; +Cc: netdev
In-Reply-To: <20070822145631.785314805@lsx.localdomain>
From: Thomas Graf <tgraf@suug.ch>
Date: Wed, 22 Aug 2007 16:55:52 +0200
> Signed-off-by: Thomas Graf <tgraf@suug.ch>
Applied.
^ permalink raw reply
* Re: [PATCH 13/16] [XFRM] netlink: Use nlattr instead of rtattr
From: David Miller @ 2007-08-22 21:01 UTC (permalink / raw)
To: tgraf; +Cc: netdev
In-Reply-To: <20070822145631.637380607@lsx.localdomain>
From: Thomas Graf <tgraf@suug.ch>
Date: Wed, 22 Aug 2007 16:55:51 +0200
> Signed-off-by: Thomas Graf <tgraf@suug.ch>
Applied.
^ permalink raw reply
* Re: [PATCH 6/7 v2] fs_enet: Be an of_platform device when CONFIG_PPC_CPM_NEW_BINDING is set.
From: Vitaly Bordug @ 2007-08-22 21:00 UTC (permalink / raw)
To: Scott Wood; +Cc: jgarzik, netdev, linuxppc-dev
In-Reply-To: <46CB172D.9010807@freescale.com>
On Tue, 21 Aug 2007 11:47:41 -0500
Scott Wood <scottwood@freescale.com> wrote:
> Vitaly Bordug wrote:
> > On Fri, 17 Aug 2007 13:17:18 -0500
> > Scott Wood wrote:
> >
> >
> >>The existing OF glue code was crufty and broken. Rather than fix
> >>it, it will be removed, and the ethernet driver now talks to the
> >>device tree directly.
> >>
> >
> > A bit short description, I'd rather expect some specific
> > improvements list, that are now up and running using device tree.
> > Or if it is just move to new infrastucture, let's state that, too.
>
> Some of specific binding changes (there are too many to exhaustively
> list) are enumerated in the "new CPM binding" patch, which I'll send
> after Kumar's include/asm-ppc patch goes in (since it modifies one of
> those files).
>
ok
> >>+#ifdef CONFIG_PPC_CPM_NEW_BINDING
> >>+static int __devinit find_phy(struct device_node *np,
> >>+ struct fs_platform_info *fpi)
> >>+{
> >>+ struct device_node *phynode, *mdionode;
> >>+ struct resource res;
> >>+ int ret = 0, len;
> >>+
> >>+ const u32 *data = of_get_property(np, "phy-handle", &len);
> >>+ if (!data || len != 4)
> >>+ return -EINVAL;
> >>+
> >>+ phynode = of_find_node_by_phandle(*data);
> >>+ if (!phynode)
> >>+ return -EINVAL;
> >>+
> >>+ mdionode = of_get_parent(phynode);
> >>+ if (!phynode)
> >>+ goto out_put_phy;
> >>+
> >>+ ret = of_address_to_resource(mdionode, 0, &res);
> >>+ if (ret)
> >>+ goto out_put_mdio;
> >>+
> >>+ data = of_get_property(phynode, "reg", &len);
> >>+ if (!data || len != 4)
> >>+ goto out_put_mdio;
> >>+
> >>+ snprintf(fpi->bus_id, 16, PHY_ID_FMT, res.start, *data);
> >>+
> >>+out_put_mdio:
> >>+ of_node_put(mdionode);
> >>+out_put_phy:
> >>+ of_node_put(phynode);
> >>+ return ret;
> >>+}
> >
> > And without phy node?
>
> It returns -EINVAL. :-)
>
> >>+#ifdef CONFIG_FS_ENET_HAS_FEC
> >>+#define IS_FEC(match) ((match)->data == &fs_fec_ops)
> >>+#else
> >>+#define IS_FEC(match) 0
> >>+#endif
> >>+
> >
> > Since we're talking directly with device tree, why bother with
> > CONFIG_ stuff? We are able to figure it out from dts..
>
> We are figuring it out from the DTS (that's what match->data is). I
> just didn't want boards without a FEC to have to build in support for
> it and waste memory.
yes, wrong snippet
what about
> #ifdef CONFIG_CPM2
> + r = fs_enet_mdio_bb_init();
> + if (r != 0)
> + goto out_mdio_bb;
> +#endif
> +#ifdef CONFIG_8xx
> + r = fs_enet_mdio_fec_init();
> + if (r != 0)
> + goto out_mdio_fec;
> +#endif
We had to pray and hope that 8xx would only have fec, and cpm2 has some bitbanged stuff. now we can inquire dts and know for sure, at least it seems so.
>
> >>+ fpi->rx_ring = 32;
> >>+ fpi->tx_ring = 32;
> >>+ fpi->rx_copybreak = 240;
> >>+ fpi->use_napi = 0;
> >>+ fpi->napi_weight = 17;
> >>+
> >
> >
> > move params over to dts?
>
> No. These aren't attributes of the hardware, they're choices the
> driver makes about how much memory to use and how to interact with
> the rest of the kernel.
>
> >>+ ret = find_phy(ofdev->node, fpi);
> >>+ if (ret)
> >>+ goto out_free_fpi;
> >>+
> >
> > so we're hosed without phy node.
>
> How is that different from the old code, where you're hosed without
> fep->fpi->bus_id?
>
I wasn't defending old code, and consider "old code is POS, new one is just great" game meaningless.
I am just stating the problem, that we'll have to address later. On 8xx even reference boards may be
without phy at all.
> >>+static struct of_device_id fs_enet_match[] = {
> >>+#ifdef CONFIG_FS_ENET_HAS_SCC
> >
> >
> > same nagging. Are we able to get rid of Kconfig arcane defining
> > which SoC currently plays the game for fs_enet?
>
> No, it's still needed for mpc885ads to determine pin setup and
> conflicting device tree node removal (though that could go away if
> the device tree is changed to reflect the jumper settings).
>
> It's also useful for excluding unwanted code. I don't like using
> 8xx/CPM2 as the decision point for that -- why should I build in
> mac-scc.c if I have no intention of using an SCC ethernet (either
> because my board doesn't have one, or because it's slow and conflicts
> with other devices)?
ok, agreed, size is most serious judge here. we'll definitely have to revisit pin problem later too
(because custom designs sometimes switch contradictory devices on-the-fly, disable soc parts for alternative function, etc.) QE-like pin encoding may be an option for this or not- I'm inclined to look at
most resource-safe approach.
>
> -Scott
--
Sincerely, Vitaly
^ permalink raw reply
* Re: [PATCH 12/16] [XFRM] netlink: Rename attribyte array from xfrma[] to attrs[]
From: David Miller @ 2007-08-22 21:01 UTC (permalink / raw)
To: tgraf; +Cc: netdev
In-Reply-To: <20070822145631.500935706@lsx.localdomain>
From: Thomas Graf <tgraf@suug.ch>
Date: Wed, 22 Aug 2007 16:55:50 +0200
> Increases readability a lot.
>
> Signed-off-by: Thomas Graf <tgraf@suug.ch>
Applied.
I named it like this to mean "XFRM Attributes" :-)
^ permalink raw reply
* Re: [PATCH 11/16] [XFRM] netlink: Enhance indexing of the attribute array
From: David Miller @ 2007-08-22 20:59 UTC (permalink / raw)
To: tgraf; +Cc: netdev
In-Reply-To: <20070822145631.348072934@lsx.localdomain>
From: Thomas Graf <tgraf@suug.ch>
Date: Wed, 22 Aug 2007 16:55:49 +0200
> nlmsg_parse() puts attributes at array[type] so the indexing
> method can be simpilfied by removing the obscuring "- 1".
>
> Signed-off-by: Thomas Graf <tgraf@suug.ch>
Applied.
^ permalink raw reply
* Re: [PATCH 10/16] [XFRM] netlink: Establish an attribute policy
From: David Miller @ 2007-08-22 20:59 UTC (permalink / raw)
To: tgraf; +Cc: netdev
In-Reply-To: <20070822145631.206110433@lsx.localdomain>
From: Thomas Graf <tgraf@suug.ch>
Date: Wed, 22 Aug 2007 16:55:48 +0200
> Adds a policy defining the minimal payload lengths for all the attributes
> allowing for most attribute validation checks to be removed from in
> the middle of the code path. Makes updates more consistent as many format
> errors are recognised earlier, before any changes have been attempted.
>
> Signed-off-by: Thomas Graf <tgraf@suug.ch>
Applied.
^ permalink raw reply
* Re: [PATCH 09/16] [XFRM] netlink: Use nlmsg_parse() to parse attributes
From: David Miller @ 2007-08-22 20:58 UTC (permalink / raw)
To: tgraf; +Cc: netdev
In-Reply-To: <20070822145631.073291531@lsx.localdomain>
From: Thomas Graf <tgraf@suug.ch>
Date: Wed, 22 Aug 2007 16:55:47 +0200
> Uses nlmsg_parse() to parse the attributes. This actually changes
> behaviour as unknown attributes (type > MAXTYPE) no longer cause
> an error. Instead unknown attributes will be ignored henceforth
> to keep older kernels compatible with more recent userspace tools.
>
> Signed-off-by: Thomas Graf <tgraf@suug.ch>
Applied.
^ permalink raw reply
* Re: [PATCH 08/16] [XFRM] netlink: Use nlmsg_new() and type-safe size calculation helpers
From: David Miller @ 2007-08-22 20:57 UTC (permalink / raw)
To: tgraf; +Cc: netdev
In-Reply-To: <20070822145630.911737091@lsx.localdomain>
From: Thomas Graf <tgraf@suug.ch>
Date: Wed, 22 Aug 2007 16:55:46 +0200
> Moves all complex message size calculation into own inlined helper
> functions and makes use of the type-safe netlink interface.
>
> Using nlmsg_new() simplifies the calculation itself as it takes care
> of the netlink header length by itself.
>
> Signed-off-by: Thomas Graf <tgraf@suug.ch>
Applied.
^ permalink raw reply
* Re: [PATCH 07/16] [XFRM] netlink: Clear up some of the CONFIG_XFRM_SUB_POLICY ifdef mess
From: David Miller @ 2007-08-22 20:57 UTC (permalink / raw)
To: tgraf; +Cc: netdev
In-Reply-To: <20070822145630.772409495@lsx.localdomain>
From: Thomas Graf <tgraf@suug.ch>
Date: Wed, 22 Aug 2007 16:55:45 +0200
> Moves all of the SUB_POLICY ifdefs related to the attribute size
> calculation into a function.
>
> Signed-off-by: Thomas Graf <tgraf@suug.ch>
Applied.
^ permalink raw reply
* Re: [PATCH 06/16] [XFRM] netlink: Move algorithm length calculation to its own function
From: David Miller @ 2007-08-22 20:56 UTC (permalink / raw)
To: tgraf; +Cc: netdev
In-Reply-To: <20070822145630.629135129@lsx.localdomain>
From: Thomas Graf <tgraf@suug.ch>
Date: Wed, 22 Aug 2007 16:55:44 +0200
> Adds alg_len() to calculate the properly padded length of an
> algorithm attribute to simplify the code.
>
> Signed-off-by: Thomas Graf <tgraf@suug.ch>
Applied.
^ permalink raw reply
* Re: [PATCH 05/16] [XFRM] netlink: Use nla_put()/NLA_PUT() variantes
From: David Miller @ 2007-08-22 20:55 UTC (permalink / raw)
To: tgraf; +Cc: netdev
In-Reply-To: <20070822145630.481426233@lsx.localdomain>
From: Thomas Graf <tgraf@suug.ch>
Date: Wed, 22 Aug 2007 16:55:43 +0200
> Also makes use of copy_sec_ctx() in another place and removes
> duplicated code.
>
> Signed-off-by: Thomas Graf <tgraf@suug.ch>
Applied.
^ permalink raw reply
* Re: [PATCH 04/16] [XFRM] netlink: Use nlmsg_broadcast() and nlmsg_unicast()
From: David Miller @ 2007-08-22 20:54 UTC (permalink / raw)
To: tgraf; +Cc: netdev
In-Reply-To: <20070822145630.343335774@lsx.localdomain>
From: Thomas Graf <tgraf@suug.ch>
Date: Wed, 22 Aug 2007 16:55:42 +0200
> This simplifies successful return codes from >0 to 0.
>
> Signed-off-by: Thomas Graf <tgraf@suug.ch>
Applied, thanks.
^ permalink raw reply
* [RFC] Wild and crazy ideas involving struct sk_buff
From: Paul Moore @ 2007-08-22 20:31 UTC (permalink / raw)
To: netdev
Over in LSM/SELinux land there has been a lot of talk recently about how to
deal with loopback and forwarded traffic, specifically, how to preserve the
sender's security label on those two types of traffic. Yes, there is the
existing sk_buff.secmark field but that is already being used for something
else and utilizing it for this purpose has it's pros/cons.
We're currently talking about several different ideas to solve the problem,
including leveraging the sk_buff.secmark field, and one of the ideas was to
add an additional field to the sk_buff structure. Knowing how well that idea
would go over (lead balloon is probably an understatement at best) I started
looking at what I might be able to remove from the sk_buff struct to make
room for a new field (the new field would be a u32). Looking at the sk_buff
structure it appears that the sk_buff.dev and sk_buff.iif fields are a bit
redundant and removing the sk_buff.dev field could free 32/64 bits depending
on the platform. Is there any reason (performance?) for keeping the
sk_buff.dev field around? Would the community be open to patches which
removed it and transition users over to the sk_buff.iif field? Finally,
assuming the sk_buff.dev field was removed, would the community be open to
adding a new LSM/SELinux related u32 field to the sk_buff struct?
Thanks.
--
paul moore
linux security @ hp
^ permalink raw reply
* [PATCH 2/2] Net: ath5k, remove sysctls
From: Jiri Slaby @ 2007-08-22 20:54 UTC (permalink / raw)
To: Andrew Morton
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
netdev-u79uwXL29TY76Z2rM5mHXA, linville-2XuSBdqkA4R54TAoqtyWWQ,
linux-wireless-u79uwXL29TY76Z2rM5mHXA,
jeff-o2qLIJkoznsdnm+yROfE0A
In-Reply-To: <2698018635706419125-2EuRcrBQ8V0@public.gmane.org>
ath5k, remove sysctls
Syscalls were buggy and defunct in later kernels (due to sysctl check).
Signed-off-by: Jiri Slaby <jirislaby-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
commit 069bfbe93facb3468f579568434d18f1268a487c
tree 87c19ebf2c91d9fb07f1847adcb6098f2235eaaa
parent b01c0e9a02b248c3e2f2923da9728ba2c3961dee
author Jiri Slaby <jirislaby-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> Wed, 22 Aug 2007 22:48:41 +0200
committer Jiri Slaby <jirislaby-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> Wed, 22 Aug 2007 22:48:41 +0200
drivers/net/wireless/ath5k_base.c | 23 ++++++++---------------
1 files changed, 8 insertions(+), 15 deletions(-)
diff --git a/drivers/net/wireless/ath5k_base.c b/drivers/net/wireless/ath5k_base.c
index 2ce82ed..7f938c4 100644
--- a/drivers/net/wireless/ath5k_base.c
+++ b/drivers/net/wireless/ath5k_base.c
@@ -2440,21 +2440,13 @@ static struct pci_driver ath_pci_drv_id = {
.resume = ath_pci_resume,
};
-/*
- * Static (i.e. global) sysctls. Note that the hal sysctls
- * are located under ours by sharing the setting for DEV_ATH.
- */
-enum {
- DEV_ATH = 9, /* XXX known by hal */
-};
-
static int mincalibrate = 1;
static int maxcalibrate = INT_MAX / 1000;
#define CTL_AUTO -2 /* cannot be CTL_ANY or CTL_NONE */
static ctl_table ath_static_sysctls[] = {
#if AR_DEBUG
- { .ctl_name = CTL_AUTO,
+ {
.procname = "debug",
.mode = 0644,
.data = &ath_debug,
@@ -2462,28 +2454,28 @@ static ctl_table ath_static_sysctls[] = {
.proc_handler = proc_dointvec
},
#endif
- { .ctl_name = CTL_AUTO,
+ {
.procname = "countrycode",
.mode = 0444,
.data = &countrycode,
.maxlen = sizeof(countrycode),
.proc_handler = proc_dointvec
},
- { .ctl_name = CTL_AUTO,
+ {
.procname = "outdoor",
.mode = 0444,
.data = &outdoor,
.maxlen = sizeof(outdoor),
.proc_handler = proc_dointvec
},
- { .ctl_name = CTL_AUTO,
+ {
.procname = "xchanmode",
.mode = 0444,
.data = &xchanmode,
.maxlen = sizeof(xchanmode),
.proc_handler = proc_dointvec
},
- { .ctl_name = CTL_AUTO,
+ {
.procname = "calibrate",
.mode = 0644,
.data = &ath_calinterval,
@@ -2495,14 +2487,15 @@ static ctl_table ath_static_sysctls[] = {
{ 0 }
};
static ctl_table ath_ath_table[] = {
- { .ctl_name = DEV_ATH,
+ {
.procname = "ath",
.mode = 0555,
.child = ath_static_sysctls
}, { 0 }
};
static ctl_table ath_root_table[] = {
- { .ctl_name = CTL_DEV,
+ {
+ .ctl_name = CTL_DEV,
.procname = "dev",
.mode = 0555,
.child = ath_ath_table
^ permalink raw reply related
* [PATCH 1/2] Net: ath5k, no printk after STA->IBSS switch
From: Jiri Slaby @ 2007-08-22 20:53 UTC (permalink / raw)
To: Andrew Morton
Cc: linux-kernel-u79uwXL29TY76Z2rM5mHXA,
netdev-u79uwXL29TY76Z2rM5mHXA, linville-2XuSBdqkA4R54TAoqtyWWQ,
linux-wireless-u79uwXL29TY76Z2rM5mHXA,
jeff-o2qLIJkoznsdnm+yROfE0A
ath5k, no printk after STA->IBSS switch
If STA->IBSS switch was done, but beacon_update weas not called so far, do
not emit a warning about non-existent skbuf.
Signed-off-by: Jiri Slaby <jirislaby-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
---
commit b01c0e9a02b248c3e2f2923da9728ba2c3961dee
tree c3e10a57aed39698f20c346679854aa3a9a54639
parent 8c5f91fb39c6208b23306687343cc5fbf830fa17
author Jiri Slaby <jirislaby-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> Wed, 22 Aug 2007 22:47:06 +0200
committer Jiri Slaby <jirislaby-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> Wed, 22 Aug 2007 22:47:06 +0200
drivers/net/wireless/ath5k_base.c | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/drivers/net/wireless/ath5k_base.c b/drivers/net/wireless/ath5k_base.c
index 847218b..2ce82ed 100644
--- a/drivers/net/wireless/ath5k_base.c
+++ b/drivers/net/wireless/ath5k_base.c
@@ -655,7 +655,9 @@ static void ath_beacon_config(struct ath_softc *sc)
DPRINTF(sc, ATH_DEBUG_BEACON, "%s: intval %u hw tsftu %u\n", __func__,
intval, tsftu);
- if (sc->opmode == IEEE80211_IF_TYPE_STA) {
+ if (sc->opmode == IEEE80211_IF_TYPE_STA ||
+ (sc->opmode == IEEE80211_IF_TYPE_IBSS &&
+ !sc->bbuf->skb)) {
ath5k_hw_set_intr(ah, 0);
sc->imask |= AR5K_INT_BMISS;
sc->bmisscount = 0;
^ permalink raw reply related
* Re: [PATCH] netdevice: kernel docbook addition
From: Randy Dunlap @ 2007-08-22 20:42 UTC (permalink / raw)
To: Stephen Hemminger; +Cc: David S. Miller, netdev
In-Reply-To: <20070822123314.785dea2a@freepuppy.rosehill.hemminger.net>
On Wed, 22 Aug 2007 12:33:14 -0700 Stephen Hemminger wrote:
> Add more kernel doc's for part of the network device API.
> This is only a start, and needs more work.
>
> Applies against net-2.6.24
Thanks!
---
~Randy
*** Remember to use Documentation/SubmitChecklist when testing your code ***
^ permalink raw reply
* Re: [PATCH 0/9 Rev3] Implement batching skb API and support in IPoIB
From: David Miller @ 2007-08-22 20:21 UTC (permalink / raw)
To: rick.jones2
Cc: krkumar2, gaagaan, general, hadi, herbert, jagana, jeff, johnpol,
kaber, kumarkr, mcarlson, mchan, netdev, peter.p.waskiewicz.jr,
rdreier, Robert.Olsson, shemminger, sri, tgraf, xma
In-Reply-To: <46CC6DD1.5020105@hp.com>
From: Rick Jones <rick.jones2@hp.com>
Date: Wed, 22 Aug 2007 10:09:37 -0700
> Should it be any more or less worrysome than small packet
> performance (eg the TCP_RR stuff I posted recently) being rather
> worse with TSO enabled than with it disabled?
That, like any such thing shown by the batching changes, is a bug
to fix.
^ permalink raw reply
* Re: [PATCH] improved xfrm_audit_log() patch
From: David Miller @ 2007-08-22 19:51 UTC (permalink / raw)
To: latten; +Cc: netdev, linux-audit
In-Reply-To: <20070821.002405.88473654.davem@davemloft.net>
From: David Miller <davem@davemloft.net>
Date: Tue, 21 Aug 2007 00:24:05 -0700 (PDT)
> Looks good, applied to net-2.6.24, thanks Joy.
Something is still buggered up in this patch, you can't add this local
"audit_info" variable unconditionally to these functions, and
alternatively you also can't add a bunch of ifdefs to xfrm_user.c to
cover it up either.
CC [M] net/xfrm/xfrm_user.o
net/xfrm/xfrm_user.c: In function ^[$,1rx^[(Bxfrm_add_sa^[$,1ry^[(B:
net/xfrm/xfrm_user.c:450: warning: unused variable ^[$,1rx^[(Baudit_info^[$,1ry^[(B
net/xfrm/xfrm_user.c: In function ^[$,1rx^[(Bxfrm_del_sa^[$,1ry^[(B:
net/xfrm/xfrm_user.c:525: warning: unused variable ^[$,1rx^[(Baudit_info^[$,1ry^[(B
net/xfrm/xfrm_user.c: In function ^[$,1rx^[(Bxfrm_add_policy^[$,1ry^[(B:
net/xfrm/xfrm_user.c:1140: warning: unused variable ^[$,1rx^[(Baudit_info^[$,1ry^[(B
net/xfrm/xfrm_user.c: In function ^[$,1rx^[(Bxfrm_get_policy^[$,1ry^[(B:
net/xfrm/xfrm_user.c:1404: warning: unused variable ^[$,1rx^[(Baudit_info^[$,1ry^[(B
net/xfrm/xfrm_user.c: In function ^[$,1rx^[(Bxfrm_add_pol_expire^[$,1ry^[(B:
net/xfrm/xfrm_user.c:1651: warning: unused variable ^[$,1rx^[(Baudit_info^[$,1ry^[(B
net/xfrm/xfrm_user.c: In function ^[$,1rx^[(Bxfrm_add_sa_expire^[$,1ry^[(B:
net/xfrm/xfrm_user.c:1688: warning: unused variable ^[$,1rx^[(Baudit_info^[$,1ry^[(B
So I'm going to revert for now. Let me know when you have
a fixed version of the patch.
Thanks.
^ permalink raw reply
page: next (older) | prev (newer) | latest
- recent:[subjects (threaded)|topics (new)|topics (active)]
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox