/** * Copyright (C) 2008, Creative Technology Ltd. All Rights Reserved. * * This source file is released under GPL v2 license (no other versions). * See the COPYING file included in the main directory of this source * distribution for the license terms and conditions. * * @File ctresource.h * * @Brief * This file contains the definition of generic hardware resources for * resource management. * * @Author Liu Chun * @Date May 13 2008 * */ #ifndef CTRESOURCE_H #define CTRESOURCE_H #include enum RSCTYP { SRC, SRCIMP, AMIXER, SUM, DAIO, NUM_RSCTYP /* This must be the last one and less than 16 */ }; struct rsc_ops; struct rsc { u32 idx:12; /* The index of a resource */ u32 type:4; /* The type (RSCTYP) of a resource */ u32 conj:12; /* Current conjugate index */ u32 msr:4; /* The Master Sample Rate a resource working on */ void *ctrl_blk; /* Chip specific control info block for a resource */ struct hw *hw; /* Chip specific object for hardware access means */ const struct rsc_ops *ops; /* Generic resource operations */ }; struct rsc_ops { int (*master)(struct rsc *rsc); /* Move to master resource */ int (*next_conj)(struct rsc *rsc); /* Move to next conjugate resource */ int (*index)(const struct rsc *rsc); /* Return the index of resource */ /* Return the output slot number */ int (*output_slot)(const struct rsc *rsc); }; int rsc_init(struct rsc *rsc, u32 idx, enum RSCTYP type, u32 msr, struct hw *hw); int rsc_uninit(struct rsc *rsc); struct rsc_mgr { enum RSCTYP type; /* The type (RSCTYP) of resource to manage */ unsigned int amount; /* The total amount of a kind of resource */ unsigned int avail; /* The amount of currently available resources */ unsigned char *rscs; /* The bit-map for resource allocation */ void *ctrl_blk; /* Chip specific control info block */ struct hw *hw; /* Chip specific object for hardware access */ }; /* Resource management is based on bit-map mechanism */ int rsc_mgr_init(struct rsc_mgr *mgr, enum RSCTYP type, unsigned int amount, struct hw *hw); int rsc_mgr_uninit(struct rsc_mgr *mgr); int mgr_get_resource(struct rsc_mgr *mgr, unsigned int n, unsigned int *ridx); int mgr_put_resource(struct rsc_mgr *mgr, unsigned int n, unsigned int idx); #endif /* CTRESOURCE_H */ s'>
path: root/drivers
diff options
context:
space:
mode:
authorJulian Anastasov <ja@ssi.bg>2017-02-06 23:14:12 +0200
committerDavid S. Miller <davem@davemloft.net>2017-02-07 13:07:46 -0500
commit4ff0620354f2b39b9fe2a91c22c4de9d1fba0c8e (patch)
tree1d29569c1059553f11c2da53df68f3698df92906 /drivers
parent9b8805a325591cf5b6b9df71200de25a2bd721fd (diff)
net: add dst_pending_confirm flag to skbuff
Add new skbuff flag to allow protocols to confirm neighbour. When same struct dst_entry can be used for many different neighbours we can not use it for pending confirmations. Add sock_confirm_neigh() helper to confirm the neighbour and use it for IPv4, IPv6 and VRF before dst_neigh_output. Signed-off-by: Julian Anastasov <ja@ssi.bg> Acked-by: Eric Dumazet <edumazet@google.com> Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers')
-rw-r--r--drivers/net/vrf.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/drivers/net/vrf.c b/drivers/net/vrf.c