diff options
author | Varun Prakash <varun@chelsio.com> | 2016-09-13 17:53:59 +0200 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2016-09-16 02:49:19 +0200 |
commit | b65eef0a5b1a635f9b056cf74d3ef778f3794a75 (patch) | |
tree | d3aa3cd881f9079fd6b5c0a15462a608407e1c62 /drivers/net/ethernet/chelsio/libcxgb | |
parent | libcxgb,iw_cxgb4,cxgbit: add cxgb_find_route6() (diff) | |
download | linux-b65eef0a5b1a635f9b056cf74d3ef778f3794a75.tar.xz linux-b65eef0a5b1a635f9b056cf74d3ef778f3794a75.zip |
libcxgb,iw_cxgb4,cxgbit: add cxgb_is_neg_adv()
Add cxgb_is_neg_adv() in libcxgb_cm.h to remove
it's duplicate definitions from cxgb4/cm.c and
cxgbit/cxgbit_cm.c.
Signed-off-by: Varun Prakash <varun@chelsio.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'drivers/net/ethernet/chelsio/libcxgb')
-rw-r--r-- | drivers/net/ethernet/chelsio/libcxgb/libcxgb_cm.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/drivers/net/ethernet/chelsio/libcxgb/libcxgb_cm.h b/drivers/net/ethernet/chelsio/libcxgb/libcxgb_cm.h index c4df04a4a323..57fcc9899234 100644 --- a/drivers/net/ethernet/chelsio/libcxgb/libcxgb_cm.h +++ b/drivers/net/ethernet/chelsio/libcxgb/libcxgb_cm.h @@ -47,4 +47,13 @@ struct dst_entry * cxgb_find_route6(struct cxgb4_lld_info *, struct net_device *(*)(struct net_device *), __u8 *, __u8 *, __be16, __be16, u8, __u32); + +/* Returns whether a CPL status conveys negative advice. + */ +static inline bool cxgb_is_neg_adv(unsigned int status) +{ + return status == CPL_ERR_RTX_NEG_ADVICE || + status == CPL_ERR_PERSIST_NEG_ADVICE || + status == CPL_ERR_KEEPALV_NEG_ADVICE; +} #endif |