[PATCH net-next 5/9] ipvlan: improve and uniform naming

2017-04-27 Thread Marco Chiappero
Rename a few functions to make them more descriptive. Also rename a couple of variables to make them consistent with similar ones in other functions. Signed-off-by: Marco Chiappero Tested-by: Marco Chiappero --- drivers/net/ipvlan/ipvlan_core.c | 29 ++--- 1 file

[PATCH net-next 9/9] ipvlan: introduce individual MAC addresses

2017-04-27 Thread Marco Chiappero
belonging to the destination slave device (as for L2 mode) * Every other path behaves as before. Being a significant behavioral change, version number has been increased. Signed-off-by: Marco Chiappero Tested-by: Marco Chiappero --- drivers/net/ipvlan/ipvlan.h | 2 +- drivers/net/ipvlan

[PATCH net-next 7/9] ipvlan: relocate ipvlan_skb_crossing_ns calls

2017-04-27 Thread Marco Chiappero
Relocate ipvlan_skb_crossing_ns invocations across the code to reduce duplications and improve readability. Additionally introduce ipvlan_process_l2_outbound for the purpose, similarly to ipvlan_process_l3_outbound. Signed-off-by: Marco Chiappero --- drivers/net/ipvlan/ipvlan_core.c | 25

[PATCH net-next 4/9] ipvlan: rework the IP lookup function

2017-04-27 Thread Marco Chiappero
ipvlan_get_slave_addr function and refactor caller functions, streamlining code and improving readability. A ipvlan_get_slave_addr_dst utility function is also provided as most lookups are based on the destination IP address. Signed-off-by: Marco Chiappero Tested-by: Marco Chiappero --- drivers

[PATCH net-next 6/9] ipvlan: reposition three functions

2017-04-27 Thread Marco Chiappero
Move ipvlan_multicast_enqueue, ipvlan_skb_crossing_ns and ipvlan_mac_hash close to their related siblings. Signed-off-by: Marco Chiappero --- drivers/net/ipvlan/ipvlan_core.c | 80 1 file changed, 40 insertions(+), 40 deletions(-) diff --git a/drivers

[PATCH net-next 1/9] ipvlan: fix coding style for the ipvlan tree

2017-04-27 Thread Marco Chiappero
Update the ipvlan and ipvtap drivers to comply to the Linux coding style, fixing errors and warnings reported by checkpatch. Signed-off-by: Marco Chiappero --- drivers/net/ipvlan/ipvlan_core.c | 29 - drivers/net/ipvlan/ipvlan_main.c | 31

[PATCH net-next 8/9] ipvlan: improve compiler hints

2017-04-27 Thread Marco Chiappero
Extend inlining and branch prediction hints. Signed-off-by: Marco Chiappero --- drivers/net/ipvlan/ipvlan_core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/net/ipvlan/ipvlan_core.c b/drivers/net/ipvlan/ipvlan_core.c index a9fc1b5..67e342d 100644 --- a

[PATCH net-next 3/9] ipvlan: replace ipvlan_rcv_frame

2017-04-27 Thread Marco Chiappero
only, renaming it to ipvlan_rcv_int_frame, and introduces a new ipvlan_rcv_ext_frame function for externally originated ones. Signed-off-by: Marco Chiappero Tested-by: Marco Chiappero --- drivers/net/ipvlan/ipvlan_core.c | 58 +--- 1 file changed, 30 insertions

[PATCH net-next 2/9] ipvlan: refactor ipvlan_process_multicast for readability

2017-04-27 Thread Marco Chiappero
The function ipvlan_process_multicast both dequeues and dispatches packets from/to ipvlan slaves. Decouple these two steps by introducing ipvlan_dispatch_multicast, in order to reduce indentation and improve the overall readability. Signed-off-by: Marco Chiappero Tested-by: Marco Chiappero

[PATCH net-next 0/9] support unique MAC addresses for slave devices

2017-04-27 Thread Marco Chiappero
egressing from master are now effectively masquerated when working in L2 mode. Marco Chiappero (9): ipvlan: fix coding style for the ipvlan tree ipvlan: refactor ipvlan_process_multicast for readability ipvlan: replace ipvlan_rcv_frame ipvlan: rework the IP lookup function ipvlan: improve