rocker: introduce worlds infrastructure

This is another step on the way to per-world clean cut. Introduce world
ops hooks which each world can implement in world-specific way.
Also introduce world infrastructure along with OF-DPA world stub.

Signed-off-by: Jiri Pirko <jiri@mellanox.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
This commit is contained in:
Jiri Pirko
2016-02-16 15:14:45 +01:00
committed by David S. Miller
parent 0514c4e809
commit e420114eef
4 changed files with 545 additions and 3 deletions

View File

@@ -0,0 +1,27 @@
/*
* drivers/net/ethernet/rocker/rocker_ofdpa.c - Rocker switch OF-DPA-like
* implementation
* Copyright (c) 2014 Scott Feldman <sfeldma@gmail.com>
* Copyright (c) 2014-2016 Jiri Pirko <jiri@mellanox.com>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*/
#include <linux/kernel.h>
#include "rocker.h"
struct ofdpa {
};
struct ofdpa_port {
};
struct rocker_world_ops rocker_ofdpa_ops = {
.kind = "ofdpa",
.priv_size = sizeof(struct ofdpa),
.port_priv_size = sizeof(struct ofdpa_port),
.mode = ROCKER_PORT_MODE_OF_DPA,
};