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>
此提交包含在:
Varun Prakash
2016-09-13 21:23:59 +05:30
提交者 David S. Miller
父節點 95554761d1
當前提交 b65eef0a5b
共有 3 個檔案被更改,包括 13 行新增22 行删除

查看文件

@@ -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