From: Horatiu Vultur <horatiu.vultur@microchip.com>
To: David Miller <davem@davemloft.net>
Cc: <nikolay@cumulusnetworks.com>, <roopa@cumulusnetworks.com>,
<kuba@kernel.org>, <jiri@resnulli.us>, <ivecera@redhat.com>,
<andrew@lunn.ch>, <UNGLinuxDriver@microchip.com>,
<netdev@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
<bridge@lists.linux-foundation.org>
Subject: Re: [PATCH net-next 01/12] switchdev: mrp: Extend switchdev API for MRP Interconnect
Date: Tue, 7 Jul 2020 12:38:06 +0200 [thread overview]
Message-ID: <20200707103806.wlocq6aasbaf4pty@soft-dev3.localdomain> (raw)
In-Reply-To: <20200706.122626.2248567362397969247.davem@davemloft.net>
The 07/06/2020 12:26, David Miller wrote:
> EXTERNAL EMAIL: Do not click links or open attachments unless you know the content is safe
>
> From: Horatiu Vultur <horatiu.vultur@microchip.com>
> Date: Mon, 6 Jul 2020 11:18:31 +0200
>
> > +/* SWITCHDEV_OBJ_ID_IN_TEST_MRP */
> > +struct switchdev_obj_in_test_mrp {
> > + struct switchdev_obj obj;
> > + /* The value is in us and a value of 0 represents to stop */
> > + u32 interval;
> > + u8 max_miss;
> > + u32 in_id;
> > + u32 period;
> > +};
> ...
> > +#define SWITCHDEV_OBJ_IN_TEST_MRP(OBJ) \
> > + container_of((OBJ), struct switchdev_obj_in_test_mrp, obj)
> > +
> > +/* SWICHDEV_OBJ_ID_IN_ROLE_MRP */
> > +struct switchdev_obj_in_role_mrp {
> > + struct switchdev_obj obj;
> > + u16 in_id;
> > + u32 ring_id;
> > + u8 in_role;
> > + struct net_device *i_port;
> > +};
> ...
> > +#define SWITCHDEV_OBJ_IN_ROLE_MRP(OBJ) \
> > + container_of((OBJ), struct switchdev_obj_in_role_mrp, obj)
> > +
> > +struct switchdev_obj_in_state_mrp {
> > + struct switchdev_obj obj;
> > + u8 in_state;
> > + u32 in_id;
> > +};
>
> Please arrange these structure members in a more optimal order so that
> the resulting object is denser. For example, in switchdev_obj_in_role_mrp
> if you order it such that:
>
> > + u32 ring_id;
> > + u16 in_id;
> > + u8 in_role;
>
> You'll have less wasted space from padding.
>
> Use 'pahole' or similar tools to guide you.
Thanks, I will try to use 'pahole' and see how they need to be arranged.
--
/Horatiu
next prev parent reply other threads:[~2020-07-07 10:38 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-07-06 9:18 [PATCH net-next 00/12] bridge: mrp: Add support for interconnect ring Horatiu Vultur
2020-07-06 9:18 ` [PATCH net-next 01/12] switchdev: mrp: Extend switchdev API for MRP Interconnect Horatiu Vultur
2020-07-06 19:26 ` David Miller
2020-07-07 10:38 ` Horatiu Vultur [this message]
2020-07-06 9:18 ` [PATCH net-next 02/12] bridge: uapi: mrp: Extend MRP attributes for MRP interconnect Horatiu Vultur
2020-07-06 19:27 ` David Miller
2020-07-07 10:39 ` Horatiu Vultur
2020-07-06 9:18 ` [PATCH net-next 03/12] bridge: mrp: Extend bridge interface Horatiu Vultur
2020-07-06 9:18 ` [PATCH net-next 04/12] bridge: mrp: Extend br_mrp for MRP interconnect Horatiu Vultur
2020-07-06 9:18 ` [PATCH net-next 05/12] bridge: mrp: Rename br_mrp_port_open to br_mrp_ring_port_open Horatiu Vultur
2020-07-06 9:18 ` [PATCH net-next 06/12] bridge: mrp: Add br_mrp_in_port_open function Horatiu Vultur
2020-07-06 9:18 ` [PATCH net-next 07/12] bridge: switchdev: mrp: Extend MRP API for switchdev for MRP Interconnect Horatiu Vultur
2020-07-06 9:18 ` [PATCH net-next 08/12] bridge: mrp: Implement the MRP Interconnect API Horatiu Vultur
2020-07-07 13:27 ` Nikolay Aleksandrov
2020-07-07 14:11 ` Horatiu Vultur
2020-07-06 9:18 ` [PATCH net-next 09/12] bridge: mrp: Extend MRP netlink interface for configuring MRP interconnect Horatiu Vultur
2020-07-06 9:18 ` [PATCH net-next 10/12] bridge: uapi: mrp: Extend MRP_INFO attributes for interconnect status Horatiu Vultur
2020-07-06 9:18 ` [PATCH net-next 11/12] bridge: mrp: Extend br_mrp_fill_info Horatiu Vultur
2020-07-06 9:18 ` [PATCH net-next 12/12] net: bridge: Add port attribute IFLA_BRPORT_MRP_IN_OPEN Horatiu Vultur
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200707103806.wlocq6aasbaf4pty@soft-dev3.localdomain \
--to=horatiu.vultur@microchip.com \
--cc=UNGLinuxDriver@microchip.com \
--cc=andrew@lunn.ch \
--cc=bridge@lists.linux-foundation.org \
--cc=davem@davemloft.net \
--cc=ivecera@redhat.com \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=nikolay@cumulusnetworks.com \
--cc=roopa@cumulusnetworks.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox