netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v2 0/7] net: move skb->dropcount to skb->cb[]
@ 2015-02-26 19:06 Eyal Birger
  2015-02-26 19:06 ` [PATCH net-next v2 1/7] net: bluetooth: compact struct bt_skb_cb by inlining struct hci_req_ctrl Eyal Birger
                   ` (5 more replies)
  0 siblings, 6 replies; 16+ messages in thread
From: Eyal Birger @ 2015-02-26 19:06 UTC (permalink / raw)
  To: davem
  Cc: willemb, edumazet, shmulik.ladkani, linux-bluetooth, marcel,
	netdev, Eyal Birger

Commit 977750076d98 ("af_packet: add interframe drop cmsg (v6)")
unionized skb->mark and skb->dropcount in order to allow recording
of the socket drop count while maintaining struct sk_buff size.

skb->dropcount was introduced since there was no available room
in skb->cb[] in packet sockets. However, its introduction led to
the inability to export skb->mark to userspace.

It was considered to alias skb->priority instead of skb->mark.
However, that would lead to the inabilty to export skb->priority
to userspace if desired. Such change may also lead to hard-to-find
issues as skb->priority is assumed to be alias free, and, as noted
by Shmulik Ladkani, is not 'naturally orthogonal' with other skb
fields.

This patch series follows the suggestions made by Eric Dumazet moving
the dropcount metric to skb->cb[], eliminating this problem
at the expense of 4 bytes less in skb->cb[] for protocol families
using it.

The patch series include compactization of bluetooth and packet
use of skb->cb[] as well as the infrastructure for placing dropcount
in skb->cb[].

---
Changes in v2:
- Rebase
- Receive const struct sock * in sock_skb_set_dropcount()
  per Eric Dumazet's suggestion
- struct bt_skb_cb compactization code improvements following
  suggestions from Shmulik Landani and David Laight
- Fix incorrect asignment to skb->dev in packet_rcv()
---

Eyal Birger (7):
  net: bluetooth: compact struct bt_skb_cb by inlining struct
    hci_req_ctrl
  net: bluetooth: compact struct bt_skb_cb by converting boolean fields
    to bit fields
  net: rxrpc: change call to sock_recv_ts_and_drops() on rxrpc recvmsg
    to sock_recv_timestamp()
  net: packet: use skb->dev as storage for skb orig len instead of
    skb->cb[]
  net: use common macro for assering skb->cb[] available size in
    protocol families
  net: add common accessor for setting dropcount on packets
  net: move skb->dropcount to skb->cb[]

 include/linux/skbuff.h            |  2 --
 include/net/bluetooth/bluetooth.h | 14 +++++---------
 include/net/sock.h                | 23 +++++++++++++++++++++++
 net/bluetooth/af_bluetooth.c      |  3 +--
 net/bluetooth/hci_core.c          | 12 ++++++------
 net/bluetooth/hci_event.c         |  4 ++--
 net/bluetooth/hci_request.c       |  6 +++---
 net/bluetooth/hci_sock.c          |  2 +-
 net/can/bcm.c                     |  2 +-
 net/can/raw.c                     |  6 +++---
 net/core/sock.c                   |  2 +-
 net/ipv4/af_inet.c                |  2 +-
 net/ipv4/tcp.c                    |  3 +--
 net/ipv6/af_inet6.c               |  2 +-
 net/packet/af_packet.c            | 15 +++++++--------
 net/rxrpc/ar-recvmsg.c            |  2 +-
 net/sctp/protocol.c               |  3 +--
 net/socket.c                      |  4 ++--
 18 files changed, 60 insertions(+), 47 deletions(-)

-- 
2.1.4

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2015-03-01  5:35 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-02-26 19:06 [PATCH net-next v2 0/7] net: move skb->dropcount to skb->cb[] Eyal Birger
2015-02-26 19:06 ` [PATCH net-next v2 1/7] net: bluetooth: compact struct bt_skb_cb by inlining struct hci_req_ctrl Eyal Birger
2015-02-26 19:06 ` [PATCH net-next v2 2/7] net: bluetooth: compact struct bt_skb_cb by converting boolean fields to bit fields Eyal Birger
2015-02-26 19:07 ` [PATCH net-next v2 3/7] net: rxrpc: change call to sock_recv_ts_and_drops() on rxrpc recvmsg to sock_recv_timestamp() Eyal Birger
2015-02-26 19:07 ` [PATCH net-next v2 5/7] net: use common macro for assering skb->cb[] available size in protocol families Eyal Birger
     [not found] ` <1424977624-649-1-git-send-email-eyal.birger-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2015-02-26 19:07   ` [PATCH net-next v2 4/7] net: packet: use skb->dev as storage for skb orig len instead of skb->cb[] Eyal Birger
2015-02-28 19:21     ` David Miller
     [not found]       ` <20150228.142135.470339626705046722.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2015-02-28 19:39         ` Eyal Birger
2015-02-28 20:08           ` David Miller
     [not found]             ` <20150228.150830.1726900309943339124.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2015-02-28 20:38               ` Eyal Birger
2015-02-28 21:00                 ` David Miller
2015-03-01  5:09                   ` Eyal Birger
     [not found]                     ` <CAHsH6Gv8Dh3RQ0V7KURcca9bzZGY0FwiqGj-mP9oKA_Vv72nUA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2015-03-01  5:31                       ` David Miller
     [not found]                         ` <20150301.003143.1281961486875434872.davem-fT/PcQaiUtIeIZ0/mPfg9Q@public.gmane.org>
2015-03-01  5:35                           ` Eyal Birger
2015-02-26 19:07   ` [PATCH net-next v2 6/7] net: add common accessor for setting dropcount on packets Eyal Birger
2015-02-26 19:07 ` [PATCH net-next v2 7/7] net: move skb->dropcount to skb->cb[] Eyal Birger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).