lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <CAHsH6GthPu2w8F+jqbeMt9kano6uHdicrmMhsLugLt-0exLVUw@mail.gmail.com>
Date:	Wed, 25 Feb 2015 16:10:29 +0200
From:	Eyal Birger <eyal.birger@...il.com>
To:	Eric Dumazet <eric.dumazet@...il.com>
Cc:	David Miller <davem@...emloft.net>,
	Shmulik Ladkani <shmulik.ladkani@...il.com>,
	Eric Dumazet <edumazet@...gle.com>, netdev@...r.kernel.org
Subject: Re: [PATCH net-next v3 3/4] net: use skb->priority for overloading
 skb->dropcount and skb->reserved_tailroom instead of skb->mark

>>
>> bluetooth : Whole struct rxrpc_skb_priv is not used when packet is
>> stored in receive queue.
>>
>> We only need bt_cb(skb)->psm & bt_cb(skb)->bdaddr according to
>> l2cap_skb_msg_name()
>>
>> An union will be possible.
>>
>
> I can look into that.

Another approach is to get rid struct_req_ctrl defintion -
It is never used as a separate object outside of struct bt_skb_cb and inlining
it saves 8 bytes on a 64 bit machine, i.e.:

 typedef void (*hci_req_complete_t)(struct hci_dev *hdev, u8 status,
u16 opcode);

-struct hci_req_ctrl {
-       bool                    start;
-       u8                      event;
-       hci_req_complete_t      complete;
-};
-
 struct bt_skb_cb {
        __u8 pkt_type;
        __u8 incoming;
        __u16 opcode;
        __u16 expect;
        __u8 force_active;
+       bool req_start;
+       u8 req_event;
+       hci_req_complete_t req_complete;
        struct l2cap_chan *chan;
        struct l2cap_ctrl control;
-       struct hci_req_ctrl req;
        bdaddr_t bdaddr;
        __le16 psm;
 };

Would you prefer this approach?
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

Powered by blists - more mailing lists