| Age | Commit message (Collapse) | Author |
|
sk_alloc_slab becomes proto_register, that receives a struct proto not necessarily
completely filled, but at least with the proto name, owner and obj_size (aka proto
specific sock size), with this we can remove the struct sock sk_owner and sk_slab,
using sk->sk_prot->{owner,slab} instead.
This patch also makes sk_set_owner not necessary anymore, as at sk_alloc time we
have now access to the struct proto onwer and slab members, so we can bump the
module refcount exactly at sock allocation time.
Another nice "side effect" is that this patch removes the generic sk_cachep slab
cache, making the only last two protocols that used it use just kmalloc, informing
a struct proto obj_size equal to sizeof(struct sock).
Ah, almost forgot that with this patch it is very easy to use a slab cache, as it is
now created at proto_register time, and all protocols need to use proto_register,
so its just a matter of switching the second parameter of proto_register to '1', heck,
this can be done even at module load time with some small additional patch.
Another optimization that will be possible in the future is to move the sk_protocol
and sk_type struct sock members to struct proto, but this has to wait for all protocols
to move completely to sk_prot.
This changeset also introduces /proc/net/protocols, that lists the registered protocols
details, some may seem excessive, but I'd like to keep them while working on further
struct sock hierarchy work and also to realize which protocols are old ones, i.e. that
still use struct proto_ops, etc, yeah, this is a bit of an exaggeration, as all protos
still use struct proto_ops, but in time the idea is to move all to use sk->sk_prot and
make the proto_ops infrastructure be shared among all protos, reducing one level of
indirection.
Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
Signed-off-by: Thomas Graf <tgraf@suug.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
Required to introduce struct connection_sock.
Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
Use the new lock initializers DEFINE_SPIN_LOCk and DEFINE_RW_LOCK
Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
For the case where CONFIG_LLC2 is modular and thus
llc_proc.c needs to get at this symbol.
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
The patch below contains the following possible cleanups:
- make some needlessly global code static
- remove the following unused global functions:
- lc_c_ac.c: llc_conn_ac_report_status
- lc_c_ac.c: llc_conn_ac_send_dm_rsp_f_set_f_flag
- lc_c_ac.c: llc_conn_ac_resend_i_cmd_p_set_1
- lc_c_ac.c: llc_conn_ac_resend_i_cmd_p_set_1_or_send_rr
- lc_c_ac.c: llc_conn_ac_send_ack_cmd_p_set_1
- lc_c_ac.c: llc_conn_ac_send_ua_rsp_f_set_f_flag
- lc_c_ac.c: llc_conn_ac_set_f_flag_p
- llc_c_ev.c: llc_conn_ev_conn_resp
- llc_c_ev.c: llc_conn_ev_rst_resp
- llc_c_ev.c: llc_conn_ev_rx_xxx_cmd_pbit_set_0
- llc_c_ev.c: llc_conn_ev_rx_xxx_yyy
- llc_c_ev.c: llc_conn_ev_any_tmr_exp
- llc_c_ev.c: llc_conn_ev_qlfy_init_p_f_cycle
- llc_c_ev.c: llc_conn_ev_qlfy_set_status_impossible
- llc_c_ev.c: llc_conn_ev_qlfy_set_status_received
- llc_if.c: llc_build_and_send_reset_pkt
- llc_pdu.c: llc_pdu_decode_cr_bit
- remove the following unneeded EXPORT_SYMBOL:
- llc_core.c: llc_sap_list_lock
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Signed-off-by: David S. Miller <davem@davemloft.net>
|
|
Thanks to Thomas Graf for spotting this.
Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
Signed-off-by: David S. Miller <davem@redhat.com>
|
|
The token ring code in the kernel is bitrotting (no surprise :) ),
it uses skb->data all around... I have an assortment of token ring
cards but no MAU, can anybody send me one, please? I promise to
make ssh work over LLC over Token Ring networks! Duh... :o)
Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
Signed-off-by: David S. Miller <davem@redhat.com>
|
|
Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
Signed-off-by: David S. Miller <davem@redhat.com>
|
|
Added ->peer to struct unix_sock
Signed-off-by: Arnaldo Carvalho de Melo <acme@conectiva.com.br>
Signed-off-by: David S. Miller <davem@redhat.com>
|
|
dev_ioctl() has a __user pointer argument; however, its declaration
lacks that and callers are also wrong. Declaration fixed, callers updated.
|
|
optval (and in case of getsockopt - optlen) made __user, changes
percolated down into the instances.
|
|
|
|
|
|
|
|
|
|
|
|
autobind
Other protocols do this as soon as they discover over what interface the
packet will be routed, but LLC isn't routable, so, to provide similar
semantics to the other protocols, I'm just binding it to the first interface
of the type specified, perhaps we'll need a tunable for this or some sort of
routing table done manually by the admin, later we'll see, for now this
allows an application like openssh, with patched getaddrinfo/getnameinfo to
use PF_LLC sockets with a very small patch.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
into nuts.ninka.net:/disk1/davem/BK/net-2.5
|
|
Now all is in llc2.ko, so no need for exporting those symbols.
Also llc_build_and_send_ui_pkt is now in llc_output.c, where it
is being exported.
|
|
|
|
|
|
Some defines had no place in this header, moved to llc_conn.h,
the struct llc_station, that probably will disappear in the near
future, is used only in llc_station.c, so remove one more
file from the include forest.
|
|
Deleting llc_actn.[ch], llc_evnt.[ch] & llc_stat.[ch], now it is
clearly separated from the rest and lots of previously externally
visible thru headers stuff is nicely restrained in this file.
Also remove the silly passing around of pointers to llc_main_station,
use it directly.
|
|
|
|
First step at coalescing the station handling into just one file,
killing some useless headers in the process.
|
|
Renaming the basic support module to llc.ko and introducing llc_core.c,
that has just the basic output path for llc_build_and_send_ui_pkt.
Next step will be to rename llc_main.c to llc_station.c, then consolidate
all the llc station code in this file, removing all the not needed
llc_station parameters and killing struct llc_station altogether,
no sense in having it as there is just one station, always. BTW in
this changeset parts of llc_main_station was already moved to llc_core.c,
namely the sap list and lock.
|
|
Next step: to have llc_build_and_send_ui_pkt in llc_output.c, not
using the silly sap state machinery.
|
|
|
|
Renaming lan_hdrs_init to llc_mac_hdr_init and making all places
check if it fails.
|
|
Also rename fix_up_incoming_skb to llc_fixup_skb, to be more
namespace friendly. Ah, make it inline too.
|
|
For this some more functions had to be moved around, now one doesn't
have to explicitely select LLC to have access in the menu to ipx,
appletalk, token ring, etc.
This is not yet as good as I want it to be, but at least makes it
easier for the hordes of users to select stuff, making it look more
like how it was in 2.4.
In the next changesets I'll fix the fact that CONFIG_TR is a bool
and makes psnap, p8022 and llc_core to be built statically even tho
the token ring drivers are being build as modules.
|
|
|
|
Making them inline, as they are small enough and some very seldomly
used.
|
|
Also move llc_save_primitive to llc_sap, almost untangling the
LLC2 stack from the core.
|
|
|
|
|
|
|
|
|