SAI 3.7.5.1 (#4710)

This commit is contained in:
judyjoseph 2020-06-07 20:45:12 -07:00 committed by GitHub
parent e73a5f1375
commit ccf12d2ff7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 25 additions and 10 deletions

View File

@ -1,7 +1,7 @@
# Broadcom SAI modules # Broadcom SAI modules
KVERSION = 4.9.0-11-2-amd64 KVERSION = 4.9.0-11-2-amd64
BRCM_OPENNSL_KERNEL_VERSION = 3.7.3.3-1 BRCM_OPENNSL_KERNEL_VERSION = 3.7.5.1
BRCM_OPENNSL_KERNEL = opennsl-modules_$(BRCM_OPENNSL_KERNEL_VERSION)_amd64.deb BRCM_OPENNSL_KERNEL = opennsl-modules_$(BRCM_OPENNSL_KERNEL_VERSION)_amd64.deb
$(BRCM_OPENNSL_KERNEL)_SRC_PATH = $(PLATFORM_PATH)/saibcm-modules $(BRCM_OPENNSL_KERNEL)_SRC_PATH = $(PLATFORM_PATH)/saibcm-modules

View File

@ -1,8 +1,8 @@
BRCM_SAI = libsaibcm_3.7.3.3-4_amd64.deb BRCM_SAI = libsaibcm_3.7.5.1_amd64.deb
$(BRCM_SAI)_URL = "https://sonicstorage.blob.core.windows.net/packages/bcmsai/3.7/libsaibcm_3.7.3.3-4_amd64.deb?sv=2015-04-05&sr=b&sig=9z7vLhweD%2B%2FZylkr9XsDAJ3DdE5NJlcPTslFYyBuAXU%3D&se=2033-12-25T14%3A52%3A25Z&sp=r" $(BRCM_SAI)_URL = "https://sonicstorage.blob.core.windows.net/packages/bcmsai/3.7/libsaibcm_3.7.5.1_amd64.deb?sv=2015-04-05&sr=b&sig=baLk8LLHxk9CN%2Fu0rOar5ELvojYxD00DEcFcbCnFD%2BA%3D&se=2034-02-12T01%3A20%3A05Z&sp=r"
BRCM_SAI_DEV = libsaibcm-dev_3.7.3.3-4_amd64.deb BRCM_SAI_DEV = libsaibcm-dev_3.7.5.1_amd64.deb
$(eval $(call add_derived_package,$(BRCM_SAI),$(BRCM_SAI_DEV))) $(eval $(call add_derived_package,$(BRCM_SAI),$(BRCM_SAI_DEV)))
$(BRCM_SAI_DEV)_URL = "https://sonicstorage.blob.core.windows.net/packages/bcmsai/3.7/libsaibcm-dev_3.7.3.3-4_amd64.deb?sv=2015-04-05&sr=b&sig=SAOoGh2zdljiPuKeDoa%2B1lSJzZ8uXh2Irl2RZX1uAiA%3D&se=2033-12-25T14%3A53%3A44Z&sp=r" $(BRCM_SAI_DEV)_URL = "https://sonicstorage.blob.core.windows.net/packages/bcmsai/3.7/libsaibcm-dev_3.7.5.1_amd64.deb?sv=2015-04-05&sr=b&sig=28n0jOPdv6r%2FhyQNXtufNdd9PEoA3WT5e1rCXs5cE58%3D&se=2034-02-12T01%3A20%3A56Z&sp=r"
SONIC_ONLINE_DEBS += $(BRCM_SAI) SONIC_ONLINE_DEBS += $(BRCM_SAI)
$(BRCM_SAI_DEV)_DEPENDS += $(BRCM_SAI) $(BRCM_SAI_DEV)_DEPENDS += $(BRCM_SAI)

View File

@ -1,3 +1,10 @@
opennsl (3.7.5.1) unstable; urgency=medium
* Port Broadcom SAI 3.7.5.1
* Cherry-pick change from master branch, 3.7.5.1
-- Judy Joseph <jujoseph@microsoft.com> Fri, 25 MAY 2020 15:32:47 +0000
opennsl (3.7.3.3-1) unstable; urgency=medium opennsl (3.7.3.3-1) unstable; urgency=medium
* Port Broadcom SAI 3.7.3.3 * Port Broadcom SAI 3.7.3.3

View File

@ -64,6 +64,7 @@ extern int debug;
#define SOC_HIGIG_SRCPORT(x) ((x[1] >> 16) & 0x1f) #define SOC_HIGIG_SRCPORT(x) ((x[1] >> 16) & 0x1f)
#define SOC_HIGIG2_SOP (0xfb) //0xfc - TODO: how can we differentiate between Higig and higig2? #define SOC_HIGIG2_SOP (0xfb) //0xfc - TODO: how can we differentiate between Higig and higig2?
#define SOC_HIGIG2_START(x) ((x[0] >> 24) & 0xff) #define SOC_HIGIG2_START(x) ((x[0] >> 24) & 0xff)
#define SOC_HIGIG2_IS_MC(x) ((x[0] >> 20) & 0x1)
#define SOC_HIGIG2_DSTPORT(x) ((x[0] >> 0) & 0xff) #define SOC_HIGIG2_DSTPORT(x) ((x[0] >> 0) & 0xff)
#define SOC_HIGIG2_SRCPORT(x) ((x[1] >> 16) & 0xff) #define SOC_HIGIG2_SRCPORT(x) ((x[1] >> 16) & 0xff)
#define SOC_DCB32_HG_OFFSET (6) #define SOC_DCB32_HG_OFFSET (6)
@ -212,9 +213,16 @@ psample_meta_dstport_get(uint8_t *pkt, void *pkt_meta)
} }
if (SOC_HIGIG2_START(metadata) == SOC_HIGIG2_SOP) if (SOC_HIGIG2_START(metadata) == SOC_HIGIG2_SOP)
{
if (SOC_HIGIG2_IS_MC(metadata))
{
dstport = 0;
}
else
{ {
dstport = SOC_HIGIG2_DSTPORT(metadata); dstport = SOC_HIGIG2_DSTPORT(metadata);
} }
}
else if (SOC_HIGIG_START(metadata) == SOC_HIGIG_SOP) else if (SOC_HIGIG_START(metadata) == SOC_HIGIG_SOP)
{ {
dstport = SOC_HIGIG_DSTPORT(metadata); dstport = SOC_HIGIG_DSTPORT(metadata);
@ -427,7 +435,7 @@ psample_netif_create_cb(int unit, kcom_netif_t *netif, struct net_device *dev)
psample_netif_t *psample_netif, *lpsample_netif; psample_netif_t *psample_netif, *lpsample_netif;
unsigned long flags; unsigned long flags;
if ((psample_netif = kmalloc(sizeof(psample_netif_t), GFP_KERNEL)) == NULL) { if ((psample_netif = kmalloc(sizeof(psample_netif_t), GFP_ATOMIC)) == NULL) {
gprintk("%s: failed to alloc psample mem for netif '%s'\n", gprintk("%s: failed to alloc psample mem for netif '%s'\n",
__func__, dev->name); __func__, dev->name);
return (-1); return (-1);

View File

@ -35,7 +35,7 @@ static const struct genl_multicast_group psample_nl_mcgrps[] = {
[PSAMPLE_NL_MCGRP_SAMPLE] = { .name = PSAMPLE_NL_MCGRP_SAMPLE_NAME }, [PSAMPLE_NL_MCGRP_SAMPLE] = { .name = PSAMPLE_NL_MCGRP_SAMPLE_NAME },
}; };
static struct genl_family psample_nl_family __ro_after_init; static struct genl_family psample_nl_family;
static int psample_group_nl_fill(struct sk_buff *msg, static int psample_group_nl_fill(struct sk_buff *msg,
struct psample_group *group, struct psample_group *group,
@ -106,7 +106,7 @@ static const struct genl_ops psample_nl_ops[] = {
} }
}; };
static struct genl_family psample_nl_family __ro_after_init = { static struct genl_family psample_nl_family = {
.name = PSAMPLE_GENL_NAME, .name = PSAMPLE_GENL_NAME,
.version = PSAMPLE_GENL_VERSION, .version = PSAMPLE_GENL_VERSION,
.maxattr = PSAMPLE_ATTR_MAX, .maxattr = PSAMPLE_ATTR_MAX,
@ -224,7 +224,7 @@ void psample_sample_packet(struct psample_group *group, struct sk_buff *skb,
data_len = PSAMPLE_MAX_PACKET_SIZE - meta_len - NLA_HDRLEN data_len = PSAMPLE_MAX_PACKET_SIZE - meta_len - NLA_HDRLEN
- NLA_ALIGNTO; - NLA_ALIGNTO;
nl_skb = genlmsg_new(meta_len + data_len, GFP_ATOMIC); nl_skb = genlmsg_new(meta_len + nla_total_size(data_len), GFP_ATOMIC);
if (unlikely(!nl_skb)) if (unlikely(!nl_skb))
return; return;